Changeset 966 for WAeUP_SRP/trunk/Widgets.py
- Timestamp:
- 29 Nov 2006, 14:26:31 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Widgets.py
r952 r966 288 288 letters = 2 289 289 letters_str = "L"*letters 290 291 290 def validate(self, datastructure, **kw): 292 291 """Validate datastructure and update datamodel.""" … … 294 293 valid = CPSStringWidget.validate(self, datastructure, **kw) 295 294 #import pdb;pdb.set_trace() 295 pumeresults = self.portal_pumeresults 296 296 if not valid: 297 297 return 0 … … 303 303 err = 'Invalid number, the expected format is: %s%s with N = Number, L = Letter' % (self.digits_str,self.letters_str) 304 304 else: 305 s = getStudentByRegNo(self,value) 306 if s is None: 305 #s = getStudentByRegNo(self,value) 306 pume = pumeresults(jamb_reg_no = value) 307 if pume is None: 307 308 err = 'No Student with JAMB-Reg-No %s' % (value) 308 309 else: 309 s_id = s.getId() 310 datastructure['s_id'] = s_id 310 datastructure['pume'] = pume[0] 311 311 if err: 312 312 datastructure.setError(widget_id, err)
Note: See TracChangeset for help on using the changeset viewer.