- Timestamp:
- 29 Sep 2020, 07:00:27 (4 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/locales/en/LC_MESSAGES/waeup.kofa.po
r16250 r16252 128 128 129 129 msgid "Your personal data record is outdated. Please update." 130 msgstr " "130 msgstr "Your personal/bio data record is outdated. Please update." 131 131 132 132 msgid "${a}: Personal Data" 133 msgstr "${a}: Personal /Bio Data"133 msgstr "${a}: Personal / Bio Data" 134 134 135 135 msgid "Manage personal data" 136 msgstr "Manage personal /bio data"136 msgstr "Manage personal / bio data" 137 137 138 138 msgid "Edit personal data" 139 msgstr "Edit personal /bio data"139 msgstr "Edit personal / bio data" 140 140 141 141 msgid "Personal Data" 142 msgstr "Personal/Bio Data" 142 msgstr "Personal / Bio Data" 143 144 msgid "Personal Data of" 145 msgstr "Personal / Bio Data of" -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py
r16249 r16252 33 33 CourseTicketDisplayFormPage, StudentTriggerTransitionFormPage, 34 34 StartClearancePage, BalancePaymentAddFormPage, 35 ExportPDFAdmissionSlip, 35 ExportPDFAdmissionSlip, ExportPDFPersonalDataSlip, 36 36 msave, emit_lock_message) 37 37 from waeup.kofa.students.interfaces import ( … … 129 129 'personal_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le') 130 130 131 class CustomExportPDFPersonalDataSlip(ExportPDFPersonalDataSlip): 132 """Deliver a PDF base and personal data slip. 133 """ 134 omit_fields = ( 135 'phone', 'email', 136 'suspended', 137 'adm_code', 'suspended_comment', 138 'current_level', 139 'flash_notice', 'entry_session', 140 'parents_email') 141 142 form_fields = grok.AutoFields(ICustomStudentPersonal) 143 131 144 class CustomAccommodationDisplayFormPage(NigeriaAccommodationDisplayFormPage): 132 145 """ Page to view bed tickets. -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/interfaces.py
r16249 r16252 55 55 56 56 class ICustomStudentPersonal(IStudentPersonal): 57 """Student bio data.57 """Student personal/bio data. 58 58 59 59 """ 60 60 61 61 is_foreigner = Attribute('True if student is non-Nigerian') 62 63 # Duplicated fields from the ICustomStudentBase 64 65 email = schema.ASCIILine( 66 title = _(u'Email'), 67 required = False, 68 constraint=validate_email, 69 ) 70 71 email2 = schema.ASCIILine( 72 title = _(u'Second Email'), 73 required = False, 74 constraint=validate_email, 75 ) 76 77 phone = PhoneNumber( 78 title = _(u'Phone'), 79 required = False, 80 ) 81 82 parents_email = schema.ASCIILine( 83 title = _(u"Parents' Email"), 84 required = False, 85 constraint=validate_email, 86 ) 87 88 # New fields 62 89 63 90 perm_address = schema.Text( … … 145 172 """ 146 173 147 148 174 class ICustomUGStudentClearance(INigeriaUGStudentClearance): 149 175 """Representation of ug student clearance data. -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py
r16238 r16252 123 123 self.assertFalse(self.student.library) 124 124 125 def test_student_ basedata_slip(self):125 def test_student_studycourse_slip(self): 126 126 IWorkflowState(self.student).setState('school fee paid') 127 127 self.browser.open(self.login_path) … … 131 131 # Students can open base data slip 132 132 # (no button available in base package) 133 pdf_url = '%s/ basedata_slip.pdf' % self.studycourse_path133 pdf_url = '%s/studycourse_slip.pdf' % self.studycourse_path 134 134 self.browser.open(pdf_url) 135 135 self.assertEqual(self.browser.headers['Status'], '200 Ok') 136 136 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 137 path = os.path.join(samples_dir(), ' basedata_slip.pdf')137 path = os.path.join(samples_dir(), 'studycourse_slip.pdf') 138 138 open(path, 'wb').write(self.browser.contents) 139 print "Sample PDF basedata_slip.pdf written to %s" % path 139 print "Sample PDF studycourse_slip.pdf written to %s" % path 140 141 def test_student_personal_slip(self): 142 IWorkflowState(self.student).setState('school fee paid') 143 self.browser.open(self.login_path) 144 self.browser.getControl(name="form.login").value = self.student_id 145 self.browser.getControl(name="form.password").value = 'spwd' 146 self.browser.getControl("Login").click() 147 # Students can open base data slip 148 # (no button available in base package) 149 pdf_url = '%s/personal_slip.pdf' % self.student_path 150 self.browser.open(pdf_url) 151 self.assertEqual(self.browser.headers['Status'], '200 Ok') 152 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 153 path = os.path.join(samples_dir(), 'personal_slip.pdf') 154 open(path, 'wb').write(self.browser.contents) 155 print "Sample PDF personal_slip.pdf written to %s" % path 140 156 141 157 def test_student_admission_letter(self): -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/viewlets.py
r16154 r16252 31 31 StudyLevelDisplayFormPage, StudentBaseDisplayFormPage) 32 32 from waeup.kofa.students.viewlets import ( 33 AddPreviousPaymentActionButton, AddBalancePaymentActionButton) 33 AddPreviousPaymentActionButton, AddBalancePaymentActionButton, 34 StudentPersonalEditActionButton) 34 35 35 36 from kofacustom.nigeria.interfaces import MessageFactory as _ 37 38 class StudentPersonalEditActionButton(StudentPersonalEditActionButton): 39 text = _('Edit personal / bio data') 36 40 37 41 class SwitchLibraryAccessActionButton(ManageActionButton): … … 53 57 icon = 'actionicon_pay.png' 54 58 55 class BaseDataSlipActionButton(ManageActionButton): 59 class EditPersonalActionButton(ManageActionButton): 60 grok.order(9) 61 grok.context(ICustomStudent) 62 grok.view(StudentBaseDisplayFormPage) 63 grok.require('waeup.handleStudent') 64 text = _('Edit personal/bio data now') 65 target = 'edit_personal' 66 #icon = 'actionicon_edit.png' 67 68 class PersonalDataSlipActionButton(ManageActionButton): 56 69 grok.order(10) 57 grok.context(ICustomStudent StudyCourse)58 grok.view(Stud yCourseDisplayFormPage)70 grok.context(ICustomStudent) 71 grok.view(StudentBaseDisplayFormPage) 59 72 grok.require('waeup.viewStudent') 60 text = _('Download basedata slip')61 target = ' basedata_slip.pdf'73 text = _('Download personal / bio data slip') 74 target = 'personal_slip.pdf' 62 75 icon = 'actionicon_pdf.png' 63 76 … … 67 80 class GetMatricNumberActionButton(ManageActionButton): 68 81 grok.order(10) 69 grok.context(I Student)82 grok.context(ICustomStudent) 70 83 grok.view(StudentBaseDisplayFormPage) 71 84 grok.require('waeup.manageStudent') … … 83 96 return '' 84 97 return self.view.url(self.view.context, 'get_matric_number') 98 99 class StudyCourseDataSlipActionButton(ManageActionButton): 100 grok.order(10) 101 grok.context(ICustomStudentStudyCourse) 102 grok.view(StudyCourseDisplayFormPage) 103 grok.require('waeup.viewStudent') 104 text = _('Download study course slip') 105 target = 'studycourse_slip.pdf' 106 icon = 'actionicon_pdf.png' 85 107 86 108 # Library
Note: See TracChangeset for help on using the changeset viewer.