Changeset 15743 for main/kofacustom.dspg/trunk/src
- Timestamp:
- 2 Nov 2019, 17:55:19 (5 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/browser.py
r15682 r15743 29 29 StudentBasePDFFormPage, ExportPDFCourseRegistrationSlip, 30 30 CourseTicketDisplayFormPage, StudentTriggerTransitionFormPage, 31 ExportPDFTranscriptSlip, BedTicketAddPage, 31 ExportPDFTranscriptSlip, BedTicketAddPage, ExportPDFAdmissionSlip, 32 32 msave, emit_lock_message) 33 33 from waeup.kofa.students.interfaces import ( … … 233 233 self.context.student, omit_fields=self.omit_fields, 234 234 pre_text='', post_text='') 235 236 class CustomExportPDFAdmissionSlip(ExportPDFAdmissionSlip): 237 """Deliver a PDF Admission slip. 238 """ 239 240 @property 241 def pre_text(self): 242 return ( 243 'I am pleased to inform you that you have been offered ' 244 'provisional admission into the Delta State Polytechnic, ' 245 'Ogwashi-Uku as follows:') 246 247 @property 248 def post_text(self): 249 return """1. This offer is conditional upon the confirmation of your qualification(s) as listed by you in the application form or which you claim to possess as at when this offer of admission was made and your meeting the minimum department entry requirement. 250 251 2. At the time of Registration, you will be required to produce the original copies of your certificates or any other acceptable evidence of the qualification(s), on which this offer of admission has been based. 252 253 3. If at any time after admission it is discovered that you do not possess any of the qualifications which you claimed to have obtained, you will be required to withdraw from the Polytechnic. 254 255 4. Please, note that resumption/registration starts immediately. 256 257 5. You are required to pay all the necessary fees, such as school fees, students\' union fees, boarding fees (optional) and any other prescribed fees online and register immediately. Late registration will attract severe sanction such as payment of late registration fee of N10000 or outright withdrawal of offer of admission. 258 259 6. If you do not respond to this offer within two (2) weeks from the date of resumption, the Polytechnic will assume that you are not interested in the offer and may withdraw the offer to accommodate other candidates on awaiting list. 260 261 7. If you do not pay your school fees and register within the stipulated time frame for registration, you would not be allowed to write the Polytechnic\'s semester examinations. Should you mistakenly write the exams, your scripts would not be marked. 262 263 8. You are required to present at the time of registration, a letter of attestation from a clergy man, a lawyer, a senior civil servant (Level 13 and above) or any person of reputable standing in the society. 264 265 9. Before the commencement of registration, you will be required to undergo a medical examination which should be conducted in the Polytechnic clinic. 266 267 10. Other information/instructions about facilities at the Polytechnic, including accommodation, can be obtained from the Polytechnic Portal. The Head of your School/Department at the Polytechnic will make the details of the programme available to you. 268 269 11. At the time of registration, you are required to sign an undertaking of non-involvement in cult-related activities and acts of vandalism. 270 271 12. We hope that you will be able to take advantage of this offer or provisional admission. 272 273 13. Please, accept our hearty congratulations. 274 275 Admissions Officer 276 For: Registrar 277 """ 278 279 def render(self): 280 students_utils = getUtility(IStudentsUtils) 281 return students_utils.renderPDFAdmissionLetter(self, 282 self.context.student, omit_fields=self.omit_fields, 283 pre_text=self.pre_text, post_text=self.post_text) -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/tests/test_browser.py
r14716 r15743 31 31 from waeup.kofa.students.accommodation import BedTicket 32 32 from waeup.kofa.testing import FunctionalTestCase 33 from waeup.kofa.browser.tests.test_pdf import samples_dir 33 34 from waeup.kofa.interfaces import ( 34 35 IExtFileStore, IFileStoreNameChooser) … … 44 45 def test_dummytest(self): 45 46 return 47 48 def test_student_clearance(self): 49 # Student cant login if their password is not set 50 IWorkflowInfo(self.student).fireTransition('admit') 51 self.browser.open(self.login_path) 52 self.browser.getControl(name="form.login").value = self.student_id 53 self.browser.getControl(name="form.password").value = 'spwd' 54 self.browser.getControl("Login").click() 55 self.assertMatches( 56 '...You logged in...', self.browser.contents) 57 # Admitted student can upload a passport picture 58 #self.browser.open(self.student_path + '/change_portrait') 59 #ctrl = self.browser.getControl(name='passportuploadedit') 60 #file_obj = open(SAMPLE_IMAGE, 'rb') 61 #file_ctrl = ctrl.mech_control 62 #file_ctrl.add_file(file_obj, filename='my_photo.jpg') 63 #self.browser.getControl( 64 # name='upload_passportuploadedit').click() 65 #elf.assertTrue( 66 # 'src="http://localhost/app/students/K1000000/passport.jpg"' 67 # in self.browser.contents) 68 ## Students can open admission letter 69 self.browser.getLink("Base Data").click() 70 self.browser.getLink("Download admission letter").click() 71 self.assertEqual(self.browser.headers['Status'], '200 Ok') 72 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 73 path = os.path.join(samples_dir(), 'admission_slip.pdf') 74 open(path, 'wb').write(self.browser.contents) 75 print "Sample PDF admission_slip.pdf written to %s" % path -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py
r15692 r15743 80 80 d['bt'] = u'%s_%s_%s' % (special_handling,sex,bt) 81 81 return d 82 83 def getBedCoordinates(self, bedticket): 84 """Translated coordinates: 85 86 Hall Name, Block Letter, Room Number, Bed Letter = 87 Hall Name, M/F + Room Number-100, Bed Letter 88 89 Requirements: Gender must be part of bed_coordinates and all hostels 90 have only one block with only one floor 91 """ 92 ### ToDo 93 return bedticket.bed_coordinates 82 94 83 95 def getReturningData(self, student):
Note: See TracChangeset for help on using the changeset viewer.