Changeset 7321 for main/waeup.sirp/trunk/src/waeup/sirp/students
- Timestamp:
- 10 Dec 2011, 06:15:17 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7318 r7321 32 32 from waeup.sirp.accesscodes.workflow import USED 33 33 from waeup.sirp.browser import ( 34 WAeUPPage, WAeUPEditFormPage, WAeUPAddFormPage, WAeUPDisplayFormPage,34 SIRPPage, SIRPEditFormPage, SIRPAddFormPage, SIRPDisplayFormPage, 35 35 ContactAdminForm) 36 36 from waeup.sirp.browser.breadcrumbs import Breadcrumb … … 39 39 ManageActionButton, AddActionButton) 40 40 from waeup.sirp.interfaces import ( 41 I WAeUPObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm)41 ISIRPObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm) 42 42 from waeup.sirp.widgets.datewidget import ( 43 43 FriendlyDateWidget, FriendlyDateDisplayWidget, … … 155 155 return self.context.level_title 156 156 157 class StudentsContainerPage( WAeUPPage):157 class StudentsContainerPage(SIRPPage): 158 158 """The standard view for student containers. 159 159 """ … … 188 188 return 189 189 190 class SetPasswordPage( WAeUPPage):191 grok.context(I WAeUPObject)190 class SetPasswordPage(SIRPPage): 191 grok.context(ISIRPObject) 192 192 grok.name('setpassword') 193 193 grok.require('waeup.Public') … … 253 253 254 254 255 class StudentsContainerManagePage( WAeUPPage):255 class StudentsContainerManagePage(SIRPPage): 256 256 """The manage page for student containers. 257 257 """ … … 310 310 target = 'addstudent' 311 311 312 class StudentAddFormPage( WAeUPAddFormPage):312 class StudentAddFormPage(SIRPAddFormPage): 313 313 """Add-form to add a student. 314 314 """ … … 331 331 return 332 332 333 class StudentBaseDisplayFormPage( WAeUPDisplayFormPage):333 class StudentBaseDisplayFormPage(SIRPDisplayFormPage): 334 334 """ Page to display student base data 335 335 """ … … 406 406 target = 'manage_base' 407 407 408 class StudentBaseManageFormPage( WAeUPEditFormPage):408 class StudentBaseManageFormPage(SIRPEditFormPage): 409 409 """ View to manage student base data 410 410 """ … … 467 467 return 468 468 469 class StudentClearanceDisplayFormPage( WAeUPDisplayFormPage):469 class StudentClearanceDisplayFormPage(SIRPDisplayFormPage): 470 470 """ Page to display student clearance data 471 471 """ … … 552 552 self.context.getStudent(), studentview) 553 553 554 class StudentClearanceManageFormPage( WAeUPEditFormPage):554 class StudentClearanceManageFormPage(SIRPEditFormPage): 555 555 """ Page to edit student clearance data 556 556 """ … … 622 622 return 623 623 624 class StudentPersonalDisplayFormPage( WAeUPDisplayFormPage):624 class StudentPersonalDisplayFormPage(SIRPDisplayFormPage): 625 625 """ Page to display student personal data 626 626 """ … … 644 644 target = 'edit_personal' 645 645 646 class StudentPersonalManageFormPage( WAeUPEditFormPage):646 class StudentPersonalManageFormPage(SIRPEditFormPage): 647 647 """ Page to edit student clearance data 648 648 """ … … 660 660 return 661 661 662 class StudyCourseDisplayFormPage( WAeUPDisplayFormPage):662 class StudyCourseDisplayFormPage(SIRPDisplayFormPage): 663 663 """ Page to display the student study course data 664 664 """ … … 703 703 target = 'manage' 704 704 705 class StudyCourseManageFormPage( WAeUPEditFormPage):705 class StudyCourseManageFormPage(SIRPEditFormPage): 706 706 """ Page to edit the student study course data 707 707 """ … … 773 773 return 774 774 775 class StudyLevelDisplayFormPage( WAeUPDisplayFormPage):775 class StudyLevelDisplayFormPage(SIRPDisplayFormPage): 776 776 """ Page to display student study levels 777 777 """ … … 854 854 target = 'manage' 855 855 856 class StudyLevelManageFormPage( WAeUPEditFormPage):856 class StudyLevelManageFormPage(SIRPEditFormPage): 857 857 """ Page to edit the student study level data 858 858 """ … … 913 913 return 914 914 915 class CourseTicketAddFormPage( WAeUPAddFormPage):915 class CourseTicketAddFormPage(SIRPAddFormPage): 916 916 """Add a course ticket. 917 917 """ … … 956 956 self.redirect(self.url(self.context)) 957 957 958 class CourseTicketDisplayFormPage( WAeUPDisplayFormPage):958 class CourseTicketDisplayFormPage(SIRPDisplayFormPage): 959 959 """ Page to display course tickets 960 960 """ … … 983 983 target = 'manage' 984 984 985 class CourseTicketManageFormPage( WAeUPEditFormPage):985 class CourseTicketManageFormPage(SIRPEditFormPage): 986 986 """ Page to manage course tickets 987 987 """ … … 1007 1007 1008 1008 # We don't need the display form page yet 1009 #class PaymentsDisplayFormPage( WAeUPDisplayFormPage):1009 #class PaymentsDisplayFormPage(SIRPDisplayFormPage): 1010 1010 # """ Page to display the student payments 1011 1011 # """ … … 1028 1028 1029 1029 # This manage form page is for both students and students officers. 1030 class PaymentsManageFormPage( WAeUPEditFormPage):1030 class PaymentsManageFormPage(SIRPEditFormPage): 1031 1031 """ Page to manage the student payments 1032 1032 """ … … 1093 1093 # target = 'manage' 1094 1094 1095 class OnlinePaymentAddFormPage( WAeUPAddFormPage):1095 class OnlinePaymentAddFormPage(SIRPAddFormPage): 1096 1096 """ Page to add an online payment ticket 1097 1097 """ … … 1152 1152 return 1153 1153 1154 class OnlinePaymentDisplayFormPage( WAeUPDisplayFormPage):1154 class OnlinePaymentDisplayFormPage(SIRPDisplayFormPage): 1155 1155 """ Page to view an online payment ticket 1156 1156 """ … … 1279 1279 1280 1280 # We don't need the display form page yet 1281 #class AccommodationDisplayFormPage( WAeUPDisplayFormPage):1281 #class AccommodationDisplayFormPage(SIRPDisplayFormPage): 1282 1282 # """ Page to display the student accommodation data 1283 1283 # """ … … 1295 1295 1296 1296 # This manage form page is for both students and students officers. 1297 class AccommodationManageFormPage( WAeUPEditFormPage):1297 class AccommodationManageFormPage(SIRPEditFormPage): 1298 1298 """ Page to manage bed tickets. 1299 1299 """ … … 1358 1358 target = 'add' 1359 1359 1360 class BedTicketAddPage( WAeUPPage):1360 class BedTicketAddPage(SIRPPage): 1361 1361 """ Page to add an online payment ticket 1362 1362 """ … … 1449 1449 return 1450 1450 1451 class BedTicketDisplayFormPage( WAeUPDisplayFormPage):1451 class BedTicketDisplayFormPage(SIRPDisplayFormPage): 1452 1452 """ Page to display bed tickets 1453 1453 """ … … 1576 1576 return 1577 1577 1578 class StudentHistoryPage( WAeUPPage):1578 class StudentHistoryPage(SIRPPage): 1579 1579 """ Page to display student clearance data 1580 1580 """ … … 1624 1624 return self.view.url(self.view.context, self.target) 1625 1625 1626 class StudentBaseEditFormPage( WAeUPEditFormPage):1626 class StudentBaseEditFormPage(SIRPEditFormPage): 1627 1627 """ View to edit student base data 1628 1628 """ … … 1641 1641 return 1642 1642 1643 class StudentChangePasswordPage( WAeUPEditFormPage):1643 class StudentChangePasswordPage(SIRPEditFormPage): 1644 1644 """ View to manage student base data 1645 1645 """ … … 1668 1668 return 1669 1669 1670 class StudentFilesUploadPage( WAeUPPage):1670 class StudentFilesUploadPage(SIRPPage): 1671 1671 """ View to upload files by student 1672 1672 """ … … 1701 1701 return self.view.url(self.view.context, self.target) 1702 1702 1703 class StartClearancePage( WAeUPPage):1703 class StartClearancePage(SIRPPage): 1704 1704 grok.context(IStudent) 1705 1705 grok.name('start_clearance') … … 1823 1823 return 1824 1824 1825 class RequestClearancePage( WAeUPPage):1825 class RequestClearancePage(SIRPPage): 1826 1826 grok.context(IStudent) 1827 1827 grok.name('request_clearance') … … 1870 1870 return self.view.url(self.view.context, self.target) 1871 1871 1872 class StartCourseRegistrationPage( WAeUPPage):1872 class StartCourseRegistrationPage(SIRPPage): 1873 1873 grok.context(IStudentStudyCourse) 1874 1874 grok.name('start_course_registration') … … 1939 1939 return self.view.url(self.view.context, self.target) 1940 1940 1941 class AddStudyLevelFormPage( WAeUPEditFormPage):1941 class AddStudyLevelFormPage(SIRPEditFormPage): 1942 1942 """ Page for students to add current study levels 1943 1943 """ … … 1995 1995 return self.view.url(self.view.context, self.target) 1996 1996 1997 class StudyLevelEditFormPage( WAeUPEditFormPage):1997 class StudyLevelEditFormPage(SIRPEditFormPage): 1998 1998 """ Page to edit the student study level data by students 1999 1999 """ -
main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py
r7304 r7321 20 20 from zope import schema 21 21 from waeup.sirp.interfaces import ( 22 I WAeUPObject, academic_sessions_vocab, validate_email)22 ISIRPObject, academic_sessions_vocab, validate_email) 23 23 from waeup.sirp.schema import TextLineChoice 24 24 from waeup.sirp.university.vocabularies import CourseSource, study_modes … … 56 56 """ 57 57 58 class IStudentsContainer(I WAeUPObject):58 class IStudentsContainer(ISIRPObject): 59 59 """A students container contains university students. 60 60 … … 95 95 """ 96 96 97 class IStudentNavigation(I WAeUPObject):97 class IStudentNavigation(ISIRPObject): 98 98 """Interface needed for student navigation. 99 99 … … 104 104 """ 105 105 106 class IStudentBase(I WAeUPObject):106 class IStudentBase(ISIRPObject): 107 107 """Representation of student base data. 108 108 … … 173 173 ) 174 174 175 class IStudentClearance(I WAeUPObject):175 class IStudentClearance(ISIRPObject): 176 176 """Representation of student clearance data. 177 177 … … 194 194 ) 195 195 196 class IStudentPersonal(I WAeUPObject):196 class IStudentPersonal(ISIRPObject): 197 197 """Representation of student personal data. 198 198 … … 228 228 ) 229 229 230 class IStudentStudyCourse(I WAeUPObject):230 class IStudentStudyCourse(ISIRPObject): 231 231 """A container for student study levels. 232 232 … … 295 295 ) 296 296 297 class IStudentStudyLevel(I WAeUPObject):297 class IStudentStudyLevel(ISIRPObject): 298 298 """A container for course tickets. 299 299 … … 317 317 ) 318 318 319 class ICourseTicket(I WAeUPObject):319 class ICourseTicket(ISIRPObject): 320 320 """A course ticket. 321 321 … … 362 362 ) 363 363 364 class IStudentAccommodation(I WAeUPObject):364 class IStudentAccommodation(ISIRPObject): 365 365 """A container for student accommodation objects. 366 366 367 367 """ 368 368 369 class IBedTicket(I WAeUPObject):369 class IBedTicket(ISIRPObject): 370 370 """A ticket for accommodation booking. 371 371 -
main/waeup.sirp/trunk/src/waeup/sirp/students/student.py
r7256 r7321 27 27 from waeup.sirp.interfaces import ( 28 28 IObjectHistory, IUserAccount, IFileStoreNameChooser, IFileStoreHandler) 29 from waeup.sirp.image import WAeUPImageFile29 from waeup.sirp.image import SIRPImageFile 30 30 from waeup.sirp.imagestorage import DefaultFileStoreHandler 31 31 from waeup.sirp.students.interfaces import ( … … 257 257 StudentFileStoreHandler, self).createFile( 258 258 store, root, filename, file_id, file) 259 return file, path, WAeUPImageFile(259 return file, path, SIRPImageFile( 260 260 file_obj.filename, file_obj.data) -
main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
r7319 r7321 21 21 from zope.interface import Interface 22 22 from waeup.sirp.interfaces import ( 23 I WAeUPObject, IExtFileStore, IFileStoreNameChooser)23 ISIRPObject, IExtFileStore, IFileStoreNameChooser) 24 24 from waeup.sirp.utils.helpers import string_from_bytes, file_size 25 25 from waeup.sirp.browser import DEFAULT_IMAGE_PATH … … 32 32 from waeup.sirp.students.interfaces import IStudent, IStudentClearance 33 33 34 grok.context(I WAeUPObject) # Make IWAeUPObject the default context34 grok.context(ISIRPObject) # Make ISIRPObject the default context 35 35 grok.templatedir('browser_templates') 36 36 … … 47 47 grok.baseclass() 48 48 grok.viewletmanager(StudentManageSidebar) 49 grok.context(I WAeUPObject)49 grok.context(ISIRPObject) 50 50 grok.view(Interface) 51 51 grok.order(5) … … 108 108 grok.baseclass() 109 109 grok.viewletmanager(StudentMenu) 110 grok.context(I WAeUPObject)110 grok.context(ISIRPObject) 111 111 grok.view(Interface) 112 112 grok.order(5) … … 162 162 """ 163 163 164 grok.context(I WAeUPObject)164 grok.context(ISIRPObject) 165 165 grok.order(4) 166 166 grok.require('waeup.viewStudentsTab') -
main/waeup.sirp/trunk/src/waeup/sirp/students/vocabularies.py
r7214 r7321 25 25 from zc.sourcefactory.basic import BasicSourceFactory 26 26 from zc.sourcefactory.contextual import BasicContextualSourceFactory 27 from waeup.sirp.interfaces import Simple WAeUPVocabulary27 from waeup.sirp.interfaces import SimpleSIRPVocabulary 28 28 from waeup.sirp.students.lgas import LGAS 29 29 from waeup.sirp.university.vocabularies import course_levels 30 30 31 lgas_vocab = Simple WAeUPVocabulary(31 lgas_vocab = SimpleSIRPVocabulary( 32 32 *sorted([(x[1],x[0]) for x in LGAS])) 33 33 … … 71 71 return title 72 72 73 verdicts = Simple WAeUPVocabulary(73 verdicts = SimpleSIRPVocabulary( 74 74 ('not yet','0'), 75 75 ('Successful student','A'), -
main/waeup.sirp/trunk/src/waeup/sirp/students/workflow.py
r7133 r7321 5 5 from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent 6 6 from waeup.sirp.interfaces import ( 7 IObjectHistory, I WAeUPWorkflowInfo,7 IObjectHistory, ISIRPWorkflowInfo, 8 8 CREATED, ADMITTED, CLEARANCE, REQUESTED, CLEARED, PAID, RETURNING, 9 9 REGISTERED, VALIDATED) 10 from waeup.sirp.workflow import WAeUPWorkflow, WAeUPWorkflowInfo10 from waeup.sirp.workflow import SIRPWorkflow, SIRPWorkflowInfo 11 11 from waeup.sirp.utils.helpers import get_current_principal 12 12 from waeup.sirp.students.interfaces import IStudent … … 152 152 UNLOCK_CLEARANCE_TRANS = ('reset3', 'reset4', 'start_clearance') 153 153 154 registration_workflow = WAeUPWorkflow(REGISTRATION_TRANSITIONS)154 registration_workflow = SIRPWorkflow(REGISTRATION_TRANSITIONS) 155 155 156 156 class RegistrationWorkflowState(WorkflowState, grok.Adapter): … … 163 163 state_id = 'wf.registration.id' 164 164 165 class RegistrationWorkflowInfo( WAeUPWorkflowInfo, grok.Adapter):165 class RegistrationWorkflowInfo(SIRPWorkflowInfo, grok.Adapter): 166 166 """Adapter to adapt Student objects to workflow info objects. 167 167 """ 168 168 grok.context(IStudent) 169 grok.provides(I WAeUPWorkflowInfo)169 grok.provides(ISIRPWorkflowInfo) 170 170 171 171 def __init__(self, context):
Note: See TracChangeset for help on using the changeset viewer.