- Timestamp:
- 12 Oct 2007, 10:47:41 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/Widgets.py
r2352 r2353 1361 1361 datastructure[widget_id+'_b'] = b 1362 1362 datastructure[widget_id+'_n'] = n 1363 if self.REQUEST.traverse_subpath:1364 screening_type = self.REQUEST.traverse_subpath[0]1365 else:1366 screening_type = 'manage'1367 datastructure["screening_type"] = screening_type1368 #import pdb;pdb.set_trace()1369 1363 ###) 1370 1364 1371 1365 def validate(self, datastructure, **kw): ###( 1372 1366 """Validate datastructure and update datamodel.""" 1367 #import pdb;pdb.set_trace() 1373 1368 s_logger = logging.getLogger('Widgets.ScratchcardPinWidget.validate') 1374 1369 widget_id = self.getWidgetId() … … 1430 1425 if ok >= 1: 1431 1426 #screening_type = self.REQUEST.form.get('screening_type','unknown') 1432 screening_type = datastructure['screening_type'] 1427 #screening_type = datastructure['screening_type'] 1428 1429 if self.REQUEST.traverse_subpath: 1430 screening_type_request = self.REQUEST.traverse_subpath[0] 1431 else: 1432 screening_type_request = 'manage' 1433 1433 if self.isStudent(): 1434 1434 err = "You are a student!" … … 1438 1438 applicant = datastructure['record'] 1439 1439 1440 if applicant.screening_type != screening_type and screening_type!= 'manage':1441 err = " Wrong application form!"1440 if applicant.screening_type != screening_type_request and screening_type_request != 'manage': 1441 err = "You used the wrong application form!" 1442 1442 s_logger.info('%s tried to use %s application form but has applied for %s' % (ref, 1443 screening_type ,1443 screening_type_request, 1444 1444 applicant.screening_type)) 1445 1445 break … … 1449 1449 d['reg_no'] = applicant.reg_no 1450 1450 d['pin'] = pin_str 1451 d['screening_type'] = screening_type1451 #d['screening_type'] = screening_type 1452 1452 d['status'] = 'entered' 1453 1453 getattr(self,self.catalog).modifyRecord(**d) … … 1465 1465 d['pin'] = pin_str 1466 1466 d['status'] = 'entered' 1467 d['screening_type'] = screening_type 1467 d['screening_type'] = screening_type_request 1468 1468 self.applicants_catalog.addRecord(**d) 1469 1469 else:
Note: See TracChangeset for help on using the changeset viewer.