Changeset 2773
- Timestamp:
- 26 Nov 2007, 22:27:38 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2772 r2773 1445 1445 if course_id not in self._v_courses.keys(): 1446 1446 return '', "No course with ID: %s" % course_id 1447 # id_key = '' 1448 # for id_key in ('student_id','matric_no'): 1449 # id_field = mapping.get(id_key,None) 1450 # if id_field is not None: 1451 # student_id = id_field 1452 # break 1453 # query = Eq(id_key,id_field) 1454 # res = self.students_catalog.evalAdvancedQuery(query) 1455 student_rec = self.students_catalog.getRecordByKey(mapping['student_id']) 1456 if student_rec is None: 1447 id_key = '' 1448 for id_key in ('student_id','matric_no'): 1449 id_field = mapping.get(id_key,None) 1450 if id_field is not None: 1451 student_id = id_field 1452 break 1453 query = Eq(id_key,id_field) 1454 res = self.students_catalog.evalAdvancedQuery(query) 1455 if not res: 1457 1456 return '', "no student with %(id_key)s %(id_field)s" % vars() 1457 student_rec = res[0] 1458 1458 # if id_field != "student_id": 1459 1459 # mapping['student_id'] = res[0].id
Note: See TracChangeset for help on using the changeset viewer.