Changeset 13055 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 16 Jun 2015, 11:28:07 (10 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r13050 r13055 36 36 from waeup.kofa.browser.layout import ( 37 37 KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage, 38 KofaForm, NullValidator, 39 jsaction, action, UtilityView) 38 NullValidator, jsaction, action, UtilityView) 40 39 from waeup.kofa.browser.breadcrumbs import Breadcrumb 41 from waeup.kofa.browser.pages import ContactAdminForm , ExportCSVView, doll_up40 from waeup.kofa.browser.pages import ContactAdminFormPage, ExportCSVView, doll_up 42 41 from waeup.kofa.browser.interfaces import ICaptchaManager 43 42 from waeup.kofa.hostels.hostel import NOT_OCCUPIED … … 445 444 return form_fields 446 445 447 class ContactStudentForm (ContactAdminForm):446 class ContactStudentFormPage(ContactAdminFormPage): 448 447 grok.context(IStudent) 449 448 grok.name('contactstudent') … … 453 452 454 453 def update(self, subject=u'', body=u''): 455 super(ContactStudentForm , self).update()454 super(ContactStudentFormPage, self).update() 456 455 self.form_fields.get('subject').field.default = subject 457 456 self.form_fields.get('body').field.default = body … … 483 482 return 484 483 485 class ExportPDFAdmissionSlip Page(UtilityView, grok.View):484 class ExportPDFAdmissionSlip(UtilityView, grok.View): 486 485 """Deliver a PDF Admission slip. 487 486 """ … … 586 585 return 587 586 588 class StudentActivate Page(UtilityView, grok.View):587 class StudentActivateView(UtilityView, grok.View): 589 588 """ Activate student account 590 589 """ … … 605 604 return 606 605 607 class StudentDeactivate Page(UtilityView, grok.View):606 class StudentDeactivateView(UtilityView, grok.View): 608 607 """ Deactivate student account 609 608 """ … … 748 747 return 749 748 750 class StudentClear Page(UtilityView, grok.View):749 class StudentClearView(UtilityView, grok.View): 751 750 """ Clear student by clearance officer 752 751 """ … … 1034 1033 1035 1034 class StudentTranscriptRequestPage(KofaPage): 1036 """ Page to transcript by student1035 """ Page to request transcript by student 1037 1036 """ 1038 1037 grok.context(IStudent) … … 1198 1197 'a':self.context.student.display_fullname}) 1199 1198 1200 class ExportPDFTranscript Page(UtilityView, grok.View):1199 class ExportPDFTranscriptSlip(UtilityView, grok.View): 1201 1200 """Deliver a PDF slip of the context. 1202 1201 """ … … 1217 1216 self.redirect(self.url(self.context)) 1218 1217 return 1219 super(ExportPDFTranscript Page, self).update()1218 super(ExportPDFTranscriptSlip, self).update() 1220 1219 self.semester_dict = getUtility(IKofaUtils).SEMESTER_DICT 1221 1220 self.level_dict = level_dict(self.context) … … 1347 1346 'b':level_title}) 1348 1347 1349 class ExportPDFCourseRegistrationSlip Page(UtilityView, grok.View):1348 class ExportPDFCourseRegistrationSlip(UtilityView, grok.View): 1350 1349 """Deliver a PDF slip of the context. 1351 1350 """ … … 1505 1504 return 1506 1505 1507 class ValidateCourses Page(UtilityView, grok.View):1506 class ValidateCoursesView(UtilityView, grok.View): 1508 1507 """ Validate course list by course adviser 1509 1508 """ … … 1531 1530 return 1532 1531 1533 class RejectCourses Page(UtilityView, grok.View):1532 class RejectCoursesView(UtilityView, grok.View): 1534 1533 """ Reject course list by course adviser 1535 1534 """ … … 1845 1844 'b':self.context.p_id}) 1846 1845 1847 class OnlinePaymentApprove Page(UtilityView, grok.View):1846 class OnlinePaymentApproveView(UtilityView, grok.View): 1848 1847 """ Callback view 1849 1848 """ … … 1870 1869 return 1871 1870 1872 class OnlinePaymentFakeApprove Page(OnlinePaymentApprovePage):1871 class OnlinePaymentFakeApproveView(OnlinePaymentApproveView): 1873 1872 """ Approval view for students. 1874 1873 … … 1876 1875 must be neutralized in custom pages! 1877 1876 """ 1878 1879 1877 grok.name('fake_approve') 1880 1878 grok.require('waeup.payStudent') 1881 1879 1882 class ExportPDFPaymentSlip Page(UtilityView, grok.View):1880 class ExportPDFPaymentSlip(UtilityView, grok.View): 1883 1881 """Deliver a PDF slip of the context. 1884 1882 """ … … 2146 2144 mapping = {'a':self.context.getSessionString()}) 2147 2145 2148 class ExportPDFBedTicketSlip Page(UtilityView, grok.View):2146 class ExportPDFBedTicketSlip(UtilityView, grok.View): 2149 2147 """Deliver a PDF slip of the context. 2150 2148 """ … … 2184 2182 omit_fields=self.omit_fields) 2185 2183 2186 class BedTicketRelocation Page(UtilityView, grok.View):2184 class BedTicketRelocationView(UtilityView, grok.View): 2187 2185 """ Callback view 2188 2186 """ … … 3033 3031 return list(set(hitlist)) 3034 3032 3035 class ClearAllStudentsInDepartment Page(UtilityView, grok.View):3033 class ClearAllStudentsInDepartmentView(UtilityView, grok.View): 3036 3034 """ Clear all students of a department in state 'clearance requested'. 3037 3035 """ -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r13050 r13055 944 944 logcontent = open(logfile).read() 945 945 self.assertTrue( 946 'zope.mgr - students.browser.OnlinePaymentApprove Page'946 'zope.mgr - students.browser.OnlinePaymentApproveView ' 947 947 '- K1000000 - schoolfee payment approved' 948 948 in logcontent) … … 1079 1079 logcontent = open(logfile).read() 1080 1080 self.assertTrue( 1081 'zope.mgr - students.browser.OnlinePaymentApprove Page'1081 'zope.mgr - students.browser.OnlinePaymentApproveView ' 1082 1082 '- K1000000 - schoolfee payment approved' 1083 1083 in logcontent) … … 1246 1246 # Relocation is properly logged 1247 1247 logcontent = open(logfile).read() 1248 self.assertTrue('zope.mgr - students.browser.BedTicketRelocation Page'1248 self.assertTrue('zope.mgr - students.browser.BedTicketRelocationView ' 1249 1249 '- K1000000 - relocated: hall-1_A_101_B' in logcontent) 1250 1250 # The payment object still shows the original payment item … … 1942 1942 self.app['datacenter'].storage, 'logs', 'students.log') 1943 1943 logcontent = open(logfile).read() 1944 self.assertTrue('zope.mgr - students.browser.StudentDeactivate Page- '1944 self.assertTrue('zope.mgr - students.browser.StudentDeactivateView - ' 1945 1945 'K1000000 - account deactivated' in logcontent) 1946 self.assertTrue('zope.mgr - students.browser.StudentActivate Page- '1946 self.assertTrue('zope.mgr - students.browser.StudentActivateView - ' 1947 1947 'K1000000 - account activated' in logcontent) 1948 1948
Note: See TracChangeset for help on using the changeset viewer.