Changeset 10157
- Timestamp:
- 7 May 2013, 19:12:39 (12 years ago)
- Location:
- main/waeup.aaua/trunk/src/waeup/aaua
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaua/trunk/src/waeup/aaua/students/browser.py
r10120 r10157 68 68 def dataNotComplete(self): 69 69 return False 70 71 class BedTicketAddPage(BedTicketAddPage):72 """ Page to add an online payment ticket73 """74 buttonname = _('Create bed ticket')75 notice = ''76 with_ac = False -
main/waeup.aaua/trunk/src/waeup/aaua/students/studycourse.py
r10120 r10157 35 35 grok.provides(ICustomStudentStudyCourse) 36 36 37 @property 38 def is_postgrad(self): 39 if self.certificate is None: 40 return False 41 return self.certificate.study_mode.startswith('pg') or \ 42 self.certificate.study_mode.startswith('special_pg') 43 44 @property 45 def is_special_postgrad(self): 46 if self.certificate is None: 47 return False 48 return self.certificate.study_mode.startswith('special_pg') 49 50 37 51 CustomStudentStudyCourse = attrs_to_fields(CustomStudentStudyCourse) 38 52 -
main/waeup.aaua/trunk/src/waeup/aaua/students/tests/test_browser.py
r10120 r10157 82 82 self.student['accommodation'].addBedTicket(bedticket) 83 83 84 85 86 84 def test_student_start_clearance(self): 87 85 self.browser.open(self.login_path) … … 99 97 name='upload_passportuploadedit').click() 100 98 self.browser.open(self.student_path + '/start_clearance') 101 # In Okenethe students can just start clearance without entering99 # In AAUA the students can just start clearance without entering 102 100 # an activation code. 103 101 self.browser.getControl("Start clearance now").click() … … 105 103 self.browser.contents) 106 104 107 def test_student_accommodation(self): 108 del self.student['accommodation']['2004'] 109 # Login 110 self.browser.open(self.login_path) 111 self.browser.getControl(name="form.login").value = self.student_id 112 self.browser.getControl(name="form.password").value = 'spwd' 113 self.browser.getControl("Login").click() 114 115 # Students can book accommodation without AC ... 116 self.browser.open(self.acco_path) 117 IWorkflowInfo(self.student).fireTransition('admit') 118 self.browser.getLink("Book accommodation").click() 119 self.assertFalse('Activation Code:' in self.browser.contents) 120 self.browser.getControl("Create bed ticket").click() 121 # Bed is randomly selected but, since there is only 122 # one bed for this student, we know that 123 self.assertMatches('...Hall 1, Block A, Room 101, Bed A...', 124 self.browser.contents) 125 return 105 def test_next_session_allowed(self): 106 # Let's see if next_session_allowed works as expected 107 # A, ug_ft, 100 108 IWorkflowState(self.student).setState('returning') 109 self.assertTrue(self.student['studycourse'].next_session_allowed) 110 # Uniben special PG programmes have the same workflow 111 # as UG students 112 self.certificate.study_mode = 'special_pg' 113 self.assertTrue(self.student['studycourse'].next_session_allowed) 114 IWorkflowState(self.student).setState('school fee paid') 115 self.assertFalse(self.student['studycourse'].next_session_allowed) 116 # Now we convert the certificate into a 'regular 117 # postgraduate certificate ... 118 self.certificate.study_mode = 'pg_xx' 119 # ... and voila next session registration is allowed 120 self.assertTrue(self.student['studycourse'].next_session_allowed) -
main/waeup.aaua/trunk/src/waeup/aaua/utils/utils.py
r10154 r10157 51 51 'pg_ft': 'Postgraduate Full Time', 52 52 'pg_pt': 'Postgraduate Part Time', 53 'special_pg': 'Special Postgraduate', 53 54 'pg_sw': 'Postgraduate Sandwich', 54 55 'ug_sw': 'Undergraduate Sandwich',
Note: See TracChangeset for help on using the changeset viewer.