Changeset 9138 for main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
- Timestamp:
- 31 Aug 2012, 21:35:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9124 r9138 52 52 IUGStudentClearance,IPGStudentClearance, 53 53 IStudentPersonal, IStudentBase, IStudentStudyCourse, 54 IStudentStudyCourseTransfer, 54 55 IStudentAccommodation, IStudentStudyLevel, 55 56 ICourseTicket, ICourseTicketAdd, IStudentPaymentsContainer, … … 775 776 mapping = {'a':', '.join(deleted)})) 776 777 self.redirect(self.url(self.context, u'@@manage')+'?tab2') 778 return 779 780 class StudentTransferFormPage(KofaAddFormPage): 781 """Page to transfer the student. 782 """ 783 grok.context(IStudent) 784 grok.name('transfer') 785 grok.require('waeup.manageStudent') 786 label = _('Transfer student') 787 form_fields = grok.AutoFields(IStudentStudyCourseTransfer).omit( 788 'entry_mode', 'entry_session') 789 pnav = 4 790 791 def update(self): 792 super(StudentTransferFormPage, self).update() 793 warning.need() 794 return 795 796 @jsaction(_('Transfer')) 797 def transferStudent(self, **data): 798 error = self.context.transfer(**data) 799 if error == -1: 800 self.flash(_('Current level does not match certificate levels.')) 801 elif error == -2: 802 self.flash(_('Former study course record incomplete.')) 803 elif error == -3: 804 self.flash(_('Maximum number of transfers exceeded.')) 805 else: 806 self.flash(_('Successfully transferred.')) 777 807 return 778 808
Note: See TracChangeset for help on using the changeset viewer.