Changeset 7256 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 3 Dec 2011, 05:46:52 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/accommodation.py
r7190 r7256 21 21 from datetime import datetime 22 22 import grok 23 from grok import index24 23 from zope.component.interfaces import IFactory 24 from zope.interface import implementedBy 25 25 from waeup.sirp.interfaces import academic_sessions_vocab 26 26 from waeup.sirp.students.interfaces import ( -
main/waeup.sirp/trunk/src/waeup/sirp/students/batching.py
r7191 r7256 26 26 import grok 27 27 import csv 28 import copy29 28 from zope.interface import Interface 30 29 from zope.schema import getFields … … 34 33 IBatchProcessor, FatalCSVError, IObjectConverter) 35 34 from waeup.sirp.students.interfaces import ( 36 IStudent, IStudentStudyCourse , IStudentStudyCourseImport,35 IStudent, IStudentStudyCourseImport, 37 36 IStudentUpdateByRegNo, IStudentUpdateByMatricNo) 38 37 from waeup.sirp.utils.batching import BatchProcessor … … 57 56 @property 58 57 def available_fields(self): 59 result = []60 58 return sorted(list(set( 61 59 ['student_id','reg_number','matric_number'] + getFields( … … 187 185 @property 188 186 def available_fields(self): 189 result = []190 187 return sorted(list(set( 191 188 ['student_id','reg_number','matric_number'] + getFields( -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7254 r7256 21 21 import grok 22 22 from time import time 23 from datetime import date , datetime23 from datetime import datetime 24 24 from zope.event import notify 25 25 from zope.catalog.interfaces import ICatalog … … 58 58 from waeup.sirp.authentication import get_principal_role_manager 59 59 from waeup.sirp.hostels.hostel import NOT_OCCUPIED 60 from waeup.sirp.utils.helpers import get_user_account,send_mail60 from waeup.sirp.utils.helpers import send_mail 61 61 62 62 def write_log_message(view, message): … … 67 67 # Save function used for save methods in pages 68 68 def msave(view, **data): 69 form = view.request.form70 69 changed_fields = view.applyData(view.context, **data) 71 70 # Turn list of lists into single list … … 1998 1997 @grok.action('Register course list') 1999 1998 def RegisterCourses(self, **data): 2000 state = IWorkflowState(self.context.getStudent()).getState()2001 1999 IWorkflowInfo(self.context.getStudent()).fireTransition('register_courses') 2002 2000 self.flash('Course list has been registered.') -
main/waeup.sirp/trunk/src/waeup/sirp/students/container.py
r7219 r7256 20 20 """ 21 21 import grok 22 import os23 22 from waeup.sirp.students.interfaces import ( 24 23 IStudentsContainer, IStudent) -
main/waeup.sirp/trunk/src/waeup/sirp/students/dynamicroles.py
r7220 r7256 23 23 """ 24 24 import grok 25 from zope.securitypolicy.interfaces import ( 26 IPrincipalRoleManager, IPrincipalPermissionManager,) 27 from zope.securitypolicy.principalrole import AnnotationPrincipalRoleManager 25 from zope.securitypolicy.interfaces import IPrincipalRoleManager 28 26 from zope.securitypolicy.principalpermission import ( 29 27 AnnotationPrincipalPermissionManager,) 30 from zope.securitypolicy. settings import Allow, Deny, Unset28 from zope.securitypolicy.principalrole import AnnotationPrincipalRoleManager 31 29 from waeup.sirp.students.interfaces import IStudent 32 30 -
main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py
r7240 r7256 17 17 ## 18 18 from datetime import datetime 19 from zope.interface import Attribute, invariant, Interface 20 from zope.interface.exceptions import Invalid 19 from zope.interface import Attribute, Interface 21 20 from zope import schema 22 21 from waeup.sirp.interfaces import ( -
main/waeup.sirp/trunk/src/waeup/sirp/students/payments.py
r7191 r7256 20 20 """ 21 21 import grok 22 from grok import index23 22 from zope.component.interfaces import IFactory 24 23 from zope.interface import implementedBy … … 51 50 def __init__(self): 52 51 super(StudentOnlinePayment, self).__init__() 53 p_id = None54 52 return 55 53 -
main/waeup.sirp/trunk/src/waeup/sirp/students/student.py
r7212 r7256 21 21 import os 22 22 import grok 23 from grok import index24 23 from zope.component.interfaces import IFactory 25 24 from zope.interface import implementedBy … … 253 252 """Create a browsable file-like object. 254 253 """ 255 ext = os.path.splitext(filename)[1].lower()256 254 # call super method to ensure that any old files with 257 255 # different filename extension are deleted. -
main/waeup.sirp/trunk/src/waeup/sirp/students/studycourse.py
r7191 r7256 21 21 """ 22 22 import grok 23 from grok import index24 23 from zope.component.interfaces import IFactory 25 from zope. securitypolicy.interfaces import IPrincipalRoleManager24 from zope.interface import implementedBy 26 25 from waeup.sirp.students.interfaces import ( 27 26 IStudentStudyCourse, IStudentNavigation, IStudentStudyLevel) -
main/waeup.sirp/trunk/src/waeup/sirp/students/studylevel.py
r7191 r7256 21 21 """ 22 22 import grok 23 from grok import index24 from zope.component.interfaces import IFactory25 23 from waeup.sirp.students.interfaces import ( 26 24 IStudentStudyLevel, IStudentNavigation, ICourseTicket) -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_batching.py
r7193 r7256 32 32 StudentProcessor, StudentStudyCourseProcessor) 33 33 from waeup.sirp.students.student import Student 34 from waeup.sirp.students.studycourse import StudentStudyCourse35 34 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase 36 35 from waeup.sirp.interfaces import IBatchProcessor … … 151 150 152 151 def test_delEntry(self): 153 self.importer.delEntry(154 dict(student_id=self.student.student_id), self.app)155 assert self.student.student_id not in self.app['students'].keys()156 157 def test_delEntry(self):158 152 assert self.student.student_id in self.app['students'].keys() 159 153 self.importer.delEntry( -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_container.py
r7193 r7256 19 19 Tests for students containers. 20 20 """ 21 import unittest22 21 import tempfile 23 22 import shutil 24 23 from zope.interface.verify import verifyClass, verifyObject 25 from zope.component.interfaces import IFactory26 24 from zope.component.hooks import setSite, clearSite 27 25 from waeup.sirp.app import University … … 34 32 ) 35 33 from waeup.sirp.testing import ( 36 FunctionalLayer, FunctionalTestCase, get_all_loggers, remove_new_loggers, 37 remove_logger) 34 FunctionalLayer, FunctionalTestCase, remove_logger) 38 35 39 36 class StudentsContainerTestCase(FunctionalTestCase): -
main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
r7191 r7256 20 20 import grok 21 21 from random import SystemRandom as r 22 from datetime import date , datetime22 from datetime import datetime 23 23 from reportlab.pdfgen import canvas 24 24 from reportlab.lib.units import cm … … 29 29 from reportlab.platypus.tables import TableStyle 30 30 from zope.formlib.form import setUpEditWidgets 31 from waeup.sirp.interfaces import academic_sessions_vocab32 31 from waeup.sirp.students.interfaces import IStudentsUtils 33 32 … … 112 111 d['booking_session'] = site_confoguration.accommodation_session 113 112 d['allowed_states'] = site_confoguration.accommodation_states 114 session = str(d['booking_session'])115 113 # Determine bed type 116 114 studycourse = student['studycourse']
Note: See TracChangeset for help on using the changeset viewer.