- Timestamp:
- 28 Jan 2008, 08:13:22 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r3042 r3053 1613 1613 res = self.students_catalog.evalAdvancedQuery(query) 1614 1614 if not res: 1615 return '', "No student with %(id_ field)s: %(id_key)s" % vars()1615 return '', "No student with %(id_key)s %(id_field)s" % vars() 1616 1616 if id_field != "student_id": 1617 1617 mapping['student_id'] = res[0].id 1618 1618 if not res: 1619 return '', " no student with %(id_key)s %(id_field)s" % vars()1619 return '', "No student with %(id_key)s %(id_field)s" % vars() 1620 1620 student_rec = res[0] 1621 1621 student_id = student_rec.id … … 1938 1938 if matric_no and student_record.matric_no and\ 1939 1939 matric_no != student_record.matric_no: 1940 return '', 'student %s matric_no %s does not match %s' % (student_record.id,1940 return '', 'student %s: matric_no %s does not match %s' % (student_record.id, 1941 1941 student_record.matric_no, 1942 1942 matric_no) … … 1960 1960 current_session = mapping.get('current_session','') 1961 1961 if current_session and student_record.session != current_session: 1962 return '','student _id: %simported session %s does not match current_session %s' % (student_id,1962 return '','student %s: imported session %s does not match current_session %s' % (student_id, 1963 1963 current_session, 1964 1964 student_record.session) … … 1966 1966 current_level = mapping.get('current_level','') 1967 1967 if current_level and student_record.level != current_level: 1968 return '','student _id%s: imported level %s does not match current_level %s' % (student_id,1968 return '','student %s: imported level %s does not match current_level %s' % (student_id, 1969 1969 current_level, 1970 1970 student_record.level) 1971 1971 study_course_obj = getattr(student_obj,'study_course',None) 1972 1972 if study_course_obj is None: 1973 return '','student _id%s: no study_course object' % student_id1973 return '','student %s: no study_course object' % student_id 1974 1974 level_obj = getattr(study_course_obj,current_level,None) 1975 1975 if level_obj is None: 1976 return '','student _id%s: no study_level object for level %s' % (student_id,1976 return '','student %s: no study_level object for level %s' % (student_id, 1977 1977 current_level) 1978 1978 verdict = d['verdict'] = d['current_verdict'] = mapping.get('current_verdict','') 1979 1979 if verdict == student_record.verdict: 1980 return '','student _id%s: verdict already set to %s' % (student_id,1980 return '','student %s: verdict already set to %s' % (student_id, 1981 1981 verdict) 1982 1982 1983 1983 level_review_state = wftool.getInfoFor(level_obj,'review_state',None) 1984 1984 if level_review_state != "closed": 1985 return '','student _id%s: level %s is not closed' % (student_id,1985 return '','student %s: level %s is not closed' % (student_id, 1986 1986 current_level) 1987 1987
Note: See TracChangeset for help on using the changeset viewer.