Changeset 6758 for main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
- Timestamp:
- 14 Sep 2011, 01:56:26 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r6756 r6758 151 151 title = '' 152 152 label = 'Set password for first-time login' 153 ac prefix = 'PWD'153 ac_prefix = 'PWD' 154 154 pnav = 0 155 155 156 156 def update(self, SUBMIT=None): 157 self.reg_number = self.request.form.get('form.reg_number', None) 158 # We must not use form.ac_series and form.ac_number in forms since these 159 # are interpreted as applicant credentials in the applicants package 160 self.acseries = self.request.form.get('form.acseries', None) 161 self.acnumber = self.request.form.get('form.acnumber', None) 157 self.reg_number = self.request.form.get('reg_number', None) 158 self.ac_series = self.request.form.get('ac_series', None) 159 self.ac_number = self.request.form.get('ac_number', None) 162 160 163 161 if SUBMIT is None: … … 174 172 self.student_id = student.student_id 175 173 student_pw = student.password 176 pin = '%s-%s-%s' % (self.ac prefix,self.acseries,self.acnumber)174 pin = '%s-%s-%s' % (self.ac_prefix, self.ac_series, self.ac_number) 177 175 code = get_access_code(pin) 178 176 if not code: … … 197 195 #import pdb; pdb.set_trace() 198 196 invalidate_accesscode(pin,comment) 199 IUserAccount(student).setPassword(self.ac number)197 IUserAccount(student).setPassword(self.ac_number) 200 198 self.flash('Password has been set. Your Student Id is %s' 201 199 % self.student_id) … … 657 655 form_fields = grok.AutoFields( 658 656 IStudentClearanceEdit).omit('clearance_locked') 659 #grok.template('clearanceeditpage')660 657 label = 'Edit clearance data' 661 658 title = 'Clearance Data'
Note: See TracChangeset for help on using the changeset viewer.