Changeset 9437 for main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
- Timestamp:
- 27 Oct 2012, 05:35:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9428 r9437 43 43 from waeup.kofa.interfaces import ( 44 44 IKofaObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm, 45 IKofaUtils, IUniversity, IObjectHistory )45 IKofaUtils, IUniversity, IObjectHistory, academic_sessions) 46 46 from waeup.kofa.interfaces import MessageFactory as _ 47 47 from waeup.kofa.widgets.datewidget import ( … … 878 878 yield(dict(code=code, title=title)) 879 879 880 @property 881 def session_dict(self): 882 yield(dict(code='', title='--')) 883 for item in academic_sessions(): 884 code = item[1] 885 title = item[0] 886 yield(dict(code=code, title=title)) 887 880 888 @action(_('Add study level')) 881 889 def addStudyLevel(self, **data): 882 890 level_code = self.request.form.get('addlevel', None) 891 level_session = self.request.form.get('level_session', None) 892 if not level_session: 893 self.flash(_('You must select a session for the level.')) 894 self.redirect(self.url(self.context, u'@@manage')+'?tab2') 895 return 883 896 studylevel = createObject(u'waeup.StudentStudyLevel') 884 897 studylevel.level = int(level_code) 885 studylevel.level_session = self.context.current_session898 studylevel.level_session = int(level_session) 886 899 try: 887 900 self.context.addStudentStudyLevel(
Note: See TracChangeset for help on using the changeset viewer.