Changeset 7641
- Timestamp:
- 14 Feb 2012, 07:07:46 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7640 r7641 590 590 @property 591 591 def current_mode(self): 592 if self.context.certificate :592 if self.context.certificate is not None: 593 593 current_mode = study_modes.getTermByToken( 594 594 self.context.certificate.study_mode).title -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containermanagepage.pt
r7553 r7641 11 11 <option value="current_session">in session</option> 12 12 <option value="depcode">in department</option> 13 <option value="current_mode">in study mode</option> 13 14 </select> 14 15 -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containerpage.pt
r7553 r7641 11 11 <option value="current_session">in session</option> 12 12 <option value="depcode">in department</option> 13 <option value="current_mode">in study mode</option> 13 14 </select> 14 15 -
main/waeup.sirp/trunk/src/waeup/sirp/students/catalog.py
r7633 r7641 47 47 faccode = index.Field(attribute='faccode') 48 48 current_session = index.Field(attribute='current_session') 49 current_mode = index.Field(attribute='current_mode') 49 50 50 51 class StudentQueryResultItem(object): -
main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py
r7633 r7641 134 134 faccode = Attribute('The faculty code of any chosen study course') 135 135 current_session = Attribute('The current session of the student') 136 current_mode = Attribute('The current mode of the student') 136 137 fullname = Attribute('All name parts separated by hyphens') 137 138 display_fullname = Attribute('The fullname of an applicant') -
main/waeup.sirp/trunk/src/waeup/sirp/students/student.py
r7538 r7641 111 111 @property 112 112 def current_session(self): 113 cert = getattr(self.get('studycourse', None), 'current_session', None) 114 return cert 113 session = getattr(self.get('studycourse', None), 'current_session', None) 114 return session 115 116 @property 117 def current_mode(self): 118 certificate = getattr(self.get('studycourse', None), 'certificate', None) 119 if certificate is not None: 120 return certificate.study_mode 121 return 115 122 116 123 # Set all attributes of Student required in IStudent as field -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7639 r7641 271 271 self.browser.getControl(name="searchtype").value = ['student_id'] 272 272 self.browser.getControl(name="searchterm").value = self.student_id 273 self.browser.getControl("Search").click() 274 self.assertTrue('Anna Tester' in self.browser.contents) 275 276 # We can find a student in a certain session 277 self.browser.open(self.container_path) 278 self.browser.getControl(name="searchtype").value = ['current_session'] 279 self.browser.getControl(name="searchterm").value = '2004' 280 self.browser.getControl("Search").click() 281 self.assertTrue('Anna Tester' in self.browser.contents) 282 283 # We can find a student in a certain study_mode 284 self.browser.open(self.container_path) 285 self.browser.getControl(name="searchtype").value = ['current_mode'] 286 self.browser.getControl(name="searchterm").value = 'ug_ft' 273 287 self.browser.getControl("Search").click() 274 288 self.assertTrue('Anna Tester' in self.browser.contents) … … 598 612 self.assertEqual(self.browser.headers['Status'], '200 Ok') 599 613 self.assertEqual(self.browser.url, self.studycourse_student_path) 614 self.assertTrue('Undergraduate Full Time' in self.browser.contents) 600 615 self.browser.getLink("Manage").click() 601 616 self.assertTrue('Manage study course' in self.browser.contents) -
main/waeup.sirp/trunk/src/waeup/sirp/university/catalog.py
r7211 r7641 56 56 class CertificateCoursesIndexes(grok.Indexes): 57 57 """This catalog is needed for automatic removal of certificate courses 58 and later for selection course tickets in the students section.58 and later for selection of course tickets in the students section. 59 59 """ 60 60 grok.site(IUniversity) … … 67 67 @grok.subscribe(ICourse, grok.IObjectAddedEvent) 68 68 def handle_course_added(obj, event): 69 """Index an add edcourse with the local catalog.69 """Index an add course with the local catalog. 70 70 71 71 Courses are not indexed automatically, as they are not a
Note: See TracChangeset for help on using the changeset viewer.