Changeset 15418
- Timestamp:
- 21 May 2019, 10:08:08 (6 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r15417 r15418 234 234 value = row['state'] 235 235 IWorkflowState(obj).setState(value) 236 notify(grok.ObjectModifiedEvent(obj))237 236 msg = _("State '${a}' set", mapping = {'a':value}) 238 237 history = IObjectHistory(obj) … … 268 267 '%s - %s - %s - imported: %s' 269 268 % (self.name, filename, obj.student_id, items_changed)) 269 notify(grok.ObjectModifiedEvent(obj)) 270 270 return items_changed 271 271 -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r15417 r15418 377 377 IWorkflowState(student).setState(GRADUATED) 378 378 notify(grok.ObjectModifiedEvent(student)) 379 self.flash(_('Student record created.')) 379 history = IObjectHistory(student) 380 history.addMessage("Set to 'graduated'") 381 self.flash(_('Graduated student record created.')) 380 382 self.redirect(self.url(self.context[student.student_id], 'index')) 381 383 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r15334 r15418 442 442 self.browser.getControl(name="form.reg_number").value = '1234' 443 443 self.browser.getControl("Create graduated student").click() 444 self.assertTrue(' Student record created' in self.browser.contents)444 self.assertTrue('Graduated student record created' in self.browser.contents) 445 445 self.assertEqual(self.app['students']['K1000001'].state, 'graduated') 446 self.browser.open("http://localhost/app/students/K1000001/history") 447 self.assertTrue("Set to 'graduated' by Manager" in self.browser.contents) 446 448 return 447 449
Note: See TracChangeset for help on using the changeset viewer.