Changeset 16127
- Timestamp:
- 25 Jun 2020, 05:18:16 (4 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py
r16031 r16127 21 21 from zope.component import getUtility 22 22 from hurry.workflow.interfaces import IWorkflowInfo 23 from waeup.kofa.interfaces import REQUESTED, IExtFileStore, IKofaUtils 23 from waeup.kofa.interfaces import (REQUESTED, IExtFileStore, IKofaUtils, 24 academic_sessions_vocab) 24 25 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 25 26 from waeup.kofa.browser.layout import ( … … 30 31 CourseTicketDisplayFormPage, StudentTriggerTransitionFormPage, 31 32 StartClearancePage, BalancePaymentAddFormPage, 33 ExportPDFAdmissionSlip, 32 34 msave, emit_lock_message) 33 35 from waeup.kofa.students.interfaces import ( 34 36 IStudentsUtils, ICourseTicket, IStudent) 37 from waeup.kofa.students.vocabularies import StudyLevelSource 35 38 from waeup.kofa.students.workflow import FORBIDDEN_POSTGRAD_TRANS 36 39 from kofacustom.nigeria.students.browser import ( … … 219 222 class CustomBalancePaymentAddFormPage(BalancePaymentAddFormPage): 220 223 grok.require('waeup.payStudent') 224 225 class CustomExportPDFAdmissionSlip(ExportPDFAdmissionSlip): 226 """Deliver a PDF Admission slip. 227 """ 228 229 omit_fields = ('date_of_birth', 'current_level', 'current_mode', 230 'entry_session') 231 232 @property 233 def session(self): 234 return academic_sessions_vocab.getTerm( 235 self.context.entry_session).title 236 237 @property 238 def level(self): 239 studylevelsource = StudyLevelSource() 240 return studylevelsource.factory.getTitle( 241 self.context['studycourse'].certificate, self.context.current_level) 242 243 @property 244 def label(self): 245 return 'OFFER OF PROVISIONAL ADMISSION \nFOR %s SESSION' % self.session 246 247 @property 248 def pre_text(self): 249 return ( 250 'Following your performance in the screening exercise ' 251 'for the %s academic session, I am pleased to inform ' 252 'you that you have been offered provisional admission into the ' 253 'Igbinedion University, Okada as follows:' % self.session) 254 255 @property 256 def post_text(self): 257 return """ 258 Please note that at the point of registration for your programme of study (course), you will be required to present the following documents: Current UTME result slip, WAEC/NECO (0' Level) result, Birth certificate or sworn affidavit of age, and Health certificate from a recognized Medical Centre. 259 260 All credentials (orlglnal) will be checked during registration. This admission will be cancelled at any point in time it is found that your claims in the application form are false. 261 262 You are required to show evidence of the result / credentials you presented on application for admission. 263 264 Fees can be paid using any of the following options 265 266 1. Fees can be paid on through you portal page. INSTRUCTIONS can be found below "FEES PAYMENT PROCEDURE" for the options you have to make your payment, as well as instructions on how to use your preferred payment option. 267 2. If you choose to use the bank payment option, you can pay at any branch of the following banks through etranzact platform only: Access Bank, First Bank, Zenith Bank, and Keystone Bank 268 269 Kindly note the following: 270 271 1. Fees indicated on the Fee Structure page are valid for the current session only. 272 2. Your Student Id (indicated above) Is your logln to the University portal. 273 3. As an indication of your acceptance of this offer of admission, you should pay a non-refundable Acceptance deposit of 200,000. Further note that the 200,000 deposit is part of the tuition fee for the session. Failure to pay after the expiration of two weeks may lead to forfeiture of admission. 274 4. All fees must be paid in full at the beginning of the session, as basis for accommodation, registration and attendance of lectures. This is the rule for all students at all levels. Install mental payments of not more than two installments, may be allowed under exceptional circumstances 275 5. Fees once paid are not refundable. 276 6. It is advisable that you keep the original receipts of fees paid and present them on demand. 277 278 Accommodation: Accommodation in University hostels is compulsory for every student. No student Is allowed to live outside the hostels. Any student who does so will be expelled from the University. For further details, please refer to the Bursary for Information on fees. 279 280 Food: Food is available in cafeteria on "pay-as-you-eat" basis. 281 282 Resumption Date: The University opens for fresh students on Saturday, 28th September, 2020. All newly admitted students are expected to report on that date. 283 284 Registration/Orientation Programme: Orientation programme/registration for fresh students will start on Monday, 30th September 2020. Registration ends on 2020-10-30. A late registration fee of N50,000 will be charged after this date. All credentials, O'Level Results, Birth Certificate/Age Declaration, UTME Result Slip (Original) will be checked during registration. This admission will be cancelled at any point in time it is found that any of your claims in the application form is false. 285 286 Transport Facility: The University provides a compulsory shuttle bus service to all students at a fee already included in the other charges. 287 288 Kindly note that fresh students are not allowed the use of private vehicles. 289 290 Conduct: All students are expected to conduct themselves properly and dress decently on campus, as well as obey all rules and regulations as failure to comply will attract appropriate sanctions. 291 292 We wish you a successful academic career In Igbinedion University. 293 294 Congratulations! 295 296 L.P.E. Jagbedia 297 Ag. Registrar 298 registrar@iuokada.edo.ng 299 08037349527 300 """ 301 302 def render(self): 303 students_utils = getUtility(IStudentsUtils) 304 return students_utils.renderPDFAdmissionLetter(self, 305 self.context.student, omit_fields=self.omit_fields, 306 pre_text=self.pre_text, post_text=self.post_text) -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py
r16087 r16127 138 138 open(path, 'wb').write(self.browser.contents) 139 139 print "Sample PDF basedata_slip.pdf written to %s" % path 140 141 def test_student_admission_letter(self): 142 # Student cant login if their password is not set 143 IWorkflowInfo(self.student).fireTransition('admit') 144 self.browser.open(self.login_path) 145 self.browser.getControl(name="form.login").value = self.student_id 146 self.browser.getControl(name="form.password").value = 'spwd' 147 self.browser.getControl("Login").click() 148 self.assertMatches( 149 '...You logged in...', self.browser.contents) 150 # Admitted student can upload a passport picture 151 #self.browser.open(self.student_path + '/change_portrait') 152 #ctrl = self.browser.getControl(name='passportuploadedit') 153 #file_obj = open(SAMPLE_IMAGE, 'rb') 154 #file_ctrl = ctrl.mech_control 155 #file_ctrl.add_file(file_obj, filename='my_photo.jpg') 156 #self.browser.getControl( 157 # name='upload_passportuploadedit').click() 158 #self.assertTrue( 159 # 'src="http://localhost/app/students/K1000000/passport.jpg"' 160 # in self.browser.contents) 161 # Students can open admission letter 162 self.browser.getLink("Base Data").click() 163 self.browser.getLink("Download admission letter").click() 164 self.assertEqual(self.browser.headers['Status'], '200 Ok') 165 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 166 path = os.path.join(samples_dir(), 'admission_slip.pdf') 167 open(path, 'wb').write(self.browser.contents) 168 print "Sample PDF admission_slip.pdf written to %s" % path
Note: See TracChangeset for help on using the changeset viewer.