Changeset 3053 for WAeUP_SRP


Ignore:
Timestamp:
28 Jan 2008, 08:13:22 (17 years ago)
Author:
Henrik Bettermann
Message:

fix some error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r3042 r3053  
    16131613        res = self.students_catalog.evalAdvancedQuery(query)
    16141614        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()
    16161616        if id_field != "student_id":
    16171617            mapping['student_id'] = res[0].id
    16181618        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()
    16201620        student_rec = res[0]
    16211621        student_id = student_rec.id
     
    19381938            if matric_no and student_record.matric_no and\
    19391939              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,
    19411941                                                                          student_record.matric_no,
    19421942                                                                          matric_no)
     
    19601960        current_session = mapping.get('current_session','')
    19611961        if current_session and student_record.session != current_session:
    1962             return '','student_id: %s imported 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,
    19631963                                                                                        current_session,
    19641964                                                                                        student_record.session)
     
    19661966        current_level = mapping.get('current_level','')
    19671967        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,
    19691969                                                                                    current_level,
    19701970                                                                                    student_record.level)
    19711971        study_course_obj = getattr(student_obj,'study_course',None)
    19721972        if study_course_obj is None:
    1973             return '','student_id %s: no study_course object' % student_id
     1973            return '','student %s: no study_course object' % student_id
    19741974        level_obj = getattr(study_course_obj,current_level,None)
    19751975        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,
    19771977                                                                             current_level)
    19781978        verdict = d['verdict'] = d['current_verdict']  = mapping.get('current_verdict','')
    19791979        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,
    19811981                                                                    verdict)
    19821982
    19831983        level_review_state = wftool.getInfoFor(level_obj,'review_state',None)
    19841984        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,
    19861986                                                                 current_level)
    19871987
Note: See TracChangeset for help on using the changeset viewer.