Changeset 7205 for main/waeup.sirp/trunk/src/waeup/sirp/students
- Timestamp:
- 26 Nov 2011, 06:49:16 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7191 r7205 70 70 if changed_fields: 71 71 changed_fields = reduce(lambda x,y: x+y, changed_fields.values()) 72 # Inform catalog if certificate has changed 73 # (applyData does this only for the context) 74 if 'certificate' in changed_fields: 75 notify(grok.ObjectModifiedEvent(view.context.getStudent())) 72 76 fields_string = ' + '.join(changed_fields) 73 #view.context._p_changed = True74 77 view.flash('Form has been saved.') 75 78 if fields_string: … … 599 602 @property 600 603 def department(self): 601 if self.context.certificate :604 if self.context.certificate is not None: 602 605 return self.context.certificate.__parent__.__parent__ 603 606 return … … 605 608 @property 606 609 def faculty(self): 607 if self.context.certificate :610 if self.context.certificate is not None: 608 611 return self.context.certificate.__parent__.__parent__.__parent__ 609 612 return -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containermanagepage.pt
r7068 r7205 10 10 <option value="student_id">with id</option> 11 11 <option value="fullname">with name</option> 12 <option value="reg_number">with registration number</option> 13 <option value="matric_number">with matriculation number</option> 12 14 <option value="current_session">in session</option> 15 <option value="depcode">in department</option> 13 16 </select> 14 17 -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containerpage.pt
r7068 r7205 13 13 <option value="matric_number">with matriculation number</option> 14 14 <option value="current_session">in session</option> 15 <option value="depcode">in department</option> 15 16 </select> 16 17 -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7203 r7205 149 149 self.certificate.end_level = 500 150 150 self.app['faculties']['fac1'] = Faculty() 151 self.app['faculties']['fac1']['dep1'] = Department( )151 self.app['faculties']['fac1']['dep1'] = Department(code='dep1') 152 152 self.app['faculties']['fac1']['dep1'].certificates.addCertificate( 153 153 self.certificate) … … 196 196 self.student['studycourse'].current_verdict = 'A' 197 197 self.student['studycourse'].current_level = 100 198 # Update the catalog 199 notify(grok.ObjectModifiedEvent(self.student)) 198 200 199 201 # Put the prepopulated site into test ZODB and prepare test … … 263 265 self.browser.getControl(name="searchtype").value = ['student_id'] 264 266 self.browser.getControl(name="searchterm").value = self.student_id 267 self.browser.getControl("Search").click() 268 self.assertTrue('Anna Tester' in self.browser.contents) 269 270 # We can find a student in a certain department 271 self.browser.open(self.container_path) 272 self.browser.getControl(name="searchtype").value = ['depcode'] 273 self.browser.getControl(name="searchterm").value = 'dep1' 265 274 self.browser.getControl("Search").click() 266 275 self.assertTrue('Anna Tester' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.