Changeset 13103
- Timestamp:
- 26 Jun 2015, 06:05:43 (10 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r13091 r13103 4 4 1.3.2.dev0 (unreleased) 5 5 ======================= 6 7 * Remove manual clearance lock. Replace `clearance_locked` field by 8 property attribute. 6 9 7 10 * Make student email field required. -
main/waeup.kofa/trunk/docs/source/userdocs/students/browser.rst
r13101 r13103 72 72 73 73 74 .. _clearance_form_locking:75 76 Clearance Form Locking77 ======================78 79 80 81 82 83 84 74 .. _transferring_students: 85 75 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
r12957 r13103 334 334 # No students yet 335 335 self.assertEqual(self.browser.contents, 336 'adm_code,cl earance_locked,clr_code,date_of_birth,email,'336 'adm_code,clr_code,date_of_birth,email,' 337 337 'employer,firstname,lastname,matric_number,middlename,' 338 338 'nationality,officer_comment,perm_address,personal_updated,' -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r13089 r13103 638 638 def form_fields(self): 639 639 if self.context.is_postgrad: 640 form_fields = grok.AutoFields( 641 IPGStudentClearance).omit('clearance_locked') 642 else: 643 form_fields = grok.AutoFields( 644 IUGStudentClearance).omit('clearance_locked') 640 form_fields = grok.AutoFields(IPGStudentClearance) 641 else: 642 form_fields = grok.AutoFields(IUGStudentClearance) 645 643 if not getattr(self.context, 'officer_comment'): 646 644 form_fields = form_fields.omit('officer_comment') … … 669 667 def form_fields(self): 670 668 if self.context.is_postgrad: 671 form_fields = grok.AutoFields( 672 IPGStudentClearance).omit('clearance_locked') 673 else: 674 form_fields = grok.AutoFields( 675 IUGStudentClearance).omit('clearance_locked') 669 form_fields = grok.AutoFields(IPGStudentClearance) 670 else: 671 form_fields = grok.AutoFields(IUGStudentClearance) 676 672 if not getattr(self.context, 'officer_comment'): 677 673 form_fields = form_fields.omit('officer_comment') … … 2413 2409 if self.context.is_postgrad: 2414 2410 form_fields = grok.AutoFields(IPGStudentClearance).omit( 2415 'cl earance_locked', 'clr_code', 'officer_comment')2411 'clr_code', 'officer_comment') 2416 2412 else: 2417 2413 form_fields = grok.AutoFields(IUGStudentClearance).omit( 2418 'cl earance_locked', 'clr_code', 'officer_comment')2414 'clr_code', 'officer_comment') 2419 2415 return form_fields 2420 2416 -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r13091 r13103 209 209 personal_data_expired = Attribute('True if personal data expired') 210 210 transcript_enabled = Attribute('True if transcript processing is enabled') 211 clearance_locked = Attribute('True if clearance form is locked') 211 212 212 213 password = Attribute('Encrypted password') … … 309 310 officer_comment = schema.Text( 310 311 title = _(u"Officer's Comment"), 311 required = False,312 )313 314 clearance_locked = schema.Bool(315 title = _(u'Clearance form locked'),316 default = False,317 312 required = False, 318 313 ) -
main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
r13080 r13103 239 239 return True 240 240 241 @property 242 def clearance_locked(self): 243 return self.state != CLEARANCE 244 241 245 def transfer(self, certificate, current_session=None, 242 246 current_level=None, current_verdict=None, previous_verdict=None): … … 324 328 message. 325 329 """ 326 if student.state == CLEARANCE:327 student.clearance_locked = False328 else:329 student.clearance_locked = True330 330 studycourse = createObject(u'waeup.StudentStudyCourse') 331 331 student['studycourse'] = studycourse -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r13001 r13103 224 224 student.matric_number = u'234' 225 225 student.adm_code = u'my adm code' 226 student.clearance_locked = False227 226 student.clr_code = u'my clr code' 228 227 student.perm_address = u'Studentroad 21\nLagos 123456\n' -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r13091 r13103 1876 1876 self.browser.open(self.manage_clearance_path) 1877 1877 self.assertFalse('Employer' in self.browser.contents) 1878 self.student.clearance_locked = False1879 1878 self.browser.open(self.edit_clearance_path) 1880 1879 self.assertFalse('Employer' in self.browser.contents) … … 1888 1887 self.browser.open(self.manage_clearance_path) 1889 1888 self.assertTrue('Employer' in self.browser.contents) 1889 IWorkflowState(self.student).setState('clearance started') 1890 1890 self.browser.open(self.edit_clearance_path) 1891 1891 self.assertTrue('Employer' in self.browser.contents) … … 2619 2619 self.browser.getControl(name="form.password").value = 'spwd' 2620 2620 self.browser.getControl("Login").click() 2621 self.student.clearance_locked = False2622 2621 self.browser.open(self.edit_clearance_path) 2623 2622 self.browser.getControl(name="form.date_of_birth").value = '09/10/1961' … … 3416 3415 self.browser.headers['content-disposition']) 3417 3416 self.assertTrue( 3418 'adm_code,cl earance_locked,clr_code,date_of_birth,email,employer,'3417 'adm_code,clr_code,date_of_birth,email,employer,' 3419 3418 'firstname,lastname,matric_number,middlename,nationality,' 3420 3419 'officer_comment,perm_address,personal_updated,phone,reg_number,' … … 3422 3421 'password,state,history,certcode,is_postgrad,current_level,' 3423 3422 'current_session\r\n' 3424 ', 1,,1981-02-04#,aa@aa.ng,,Anna,Tester,234,,,,,,'3423 ',,1981-02-04#,aa@aa.ng,,Anna,Tester,234,,,,,,' 3425 3424 '1234#,123,m,K1000000,0,,,{SSHA}' in self.browser.contents) 3426 3425 … … 3516 3515 self.browser.headers['content-disposition']) 3517 3516 self.assertTrue( 3518 'adm_code,cl earance_locked,clr_code,date_of_birth,email,employer,'3517 'adm_code,clr_code,date_of_birth,email,employer,' 3519 3518 'firstname,lastname,matric_number,middlename,nationality,' 3520 3519 'officer_comment,perm_address,personal_updated,phone,reg_number,' … … 3522 3521 'password,state,history,certcode,is_postgrad,current_level,' 3523 3522 'current_session\r\n' 3524 ', 1,,1981-02-04#,aa@aa.ng,,Anna,Tester,234,,,,,,'3523 ',,1981-02-04#,aa@aa.ng,,Anna,Tester,234,,,,,,' 3525 3524 '1234#,123,m,K1000000,0,,,{SSHA}' in self.browser.contents) 3526 3525 self.assertEqual(len(self.app['datacenter'].running_exports), 1) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r13012 r13103 125 125 126 126 std_csv_entry = ( 127 'my adm code, 0,my clr code,1981-02-04#,anna@sample.com,,'127 'my adm code,my clr code,1981-02-04#,anna@sample.com,,' 128 128 'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,' 129 129 '+234-123-12345#,123,f,A111111,0,,,,created' … … 156 156 result = open(self.outfile, 'rb').read() 157 157 self.assertTrue( 158 'adm_code,cl earance_locked,clr_code,date_of_birth,email,'158 'adm_code,clr_code,date_of_birth,email,' 159 159 'employer,firstname,lastname,matric_number,middlename,' 160 160 'nationality,officer_comment,perm_address,personal_updated,' … … 162 162 'transcript_comment,password,state,history,certcode,is_postgrad,' 163 163 'current_level,current_session\r\n' 164 'my adm code, 0,my clr code,'164 'my adm code,my clr code,' 165 165 '1981-02-04#,anna@sample.com,,Anna,Tester,234,M.,NG,,' 166 166 '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,123,f,' … … 178 178 result = open(self.outfile, 'rb').read() 179 179 self.assertTrue( 180 'adm_code,cl earance_locked,clr_code,date_of_birth,email,'180 'adm_code,clr_code,date_of_birth,email,' 181 181 'employer,firstname,lastname,matric_number,middlename,' 182 182 'nationality,officer_comment,perm_address,personal_updated,' … … 184 184 'transcript_comment,password,state,history,certcode,' 185 185 'is_postgrad,current_level,current_session\r\n' 186 'my adm code, 0,my clr code,1981-02-04#,anna@sample.com,,'186 'my adm code,my clr code,1981-02-04#,anna@sample.com,,' 187 187 'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"' 188 188 ',,+234-123-12345#,123,f,A111111,0,,,,created' … … 198 198 result = open(self.outfile, 'rb').read() 199 199 self.assertTrue( 200 'adm_code,cl earance_locked,clr_code,date_of_birth,email,'200 'adm_code,clr_code,date_of_birth,email,' 201 201 'employer,firstname,lastname,matric_number,middlename,' 202 202 'nationality,officer_comment,perm_address,personal_updated,' … … 204 204 'transcript_comment,password,state,history,certcode,' 205 205 'is_postgrad,current_level,current_session\r\n' 206 'my adm code, 0,my clr code,1981-02-04#,anna@sample.com,,'206 'my adm code,my clr code,1981-02-04#,anna@sample.com,,' 207 207 'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"' 208 208 ',,+234-123-12345#,123,f,A111111,0,,,,created' -
main/waeup.kofa/trunk/src/waeup/kofa/students/workflow.py
r10452 r13103 212 212 213 213 FORBIDDEN_POSTGRAD_TRANS = ['reset6', 'register_courses'] 214 LOCK_CLEARANCE_TRANS = ('reset2', 'request_clearance')215 UNLOCK_CLEARANCE_TRANS = ('reset3', 'reset4', 'start_clearance')216 214 217 215 registration_workflow = KofaWorkflow(REGISTRATION_TRANSITIONS) … … 247 245 history = IObjectHistory(obj) 248 246 history.addMessage(msg) 249 if event.transition.transition_id in LOCK_CLEARANCE_TRANS:250 obj.clearance_locked = True251 if event.transition.transition_id in UNLOCK_CLEARANCE_TRANS:252 obj.clearance_locked = False253 247 # School fee payment of returning students triggers the change of 254 248 # current session, current level, and current verdict
Note: See TracChangeset for help on using the changeset viewer.