Changeset 1834


Ignore:
Timestamp:
30 May 2007, 10:07:10 (18 years ago)
Author:
Henrik Bettermann
Message:

logging messages changed

A test run on my system shows that most of the students registered levels for their old study_course not for the study_course they are supposed to study after the transfer. More in ticket #173.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r1829 r1834  
    474474            result['id'] = "None"
    475475            if not res:
    476                 em = 'Student with Matric_no %s not found' % old_matric_no
     476                em = 'Student with matric_no %s not found' % old_matric_no
    477477                logger.info(em)
    478                 result['Error'] = "Student not exists"
     478                result['Error'] = "Student does not exist"
    479479                not_imported.append(format_error % result)
    480480                total_not_imported += 1
     
    487487                res = self.portal_catalog(meta_type = "Certificate",id = cert_id)
    488488                if not res:
    489                     em = 'No Certificate with ID %s \n' % cert_id
     489                    em = 'No certificate with ID %s \n' % cert_id
    490490                    logger.info(em)
    491491                    result['Error'] = "No Certificate %s" % cert_id
     
    512512            old_current_level = study_course_doc.current_level
    513513            current_level = result.get('current_level',None)
     514            new_study_course = result.get('study_course',None)
    514515            try:
    515516                icl = int(current_level)
     
    522523                continue
    523524            if icl <= int(old_current_level) and study_course.objectIds():
    524                 em = 'Already registered level %s new %s' % (old_current_level,current_level)
     525                em = 'Already registered level %s for %s, but is supposed to study %s at level %s' % (old_current_level,old_study_course,new_study_course,current_level)
    525526                logger.info(em)
    526527                result['Error'] = em
     
    543544            study_course_history.append(old_study_course)
    544545            dsc['study_course_history'] = study_course_history
    545             dsc['study_course'] = result.get('study_course')
     546            dsc['study_course'] = new_study_course
    546547            dsc['current_level'] = current_level
    547548            dsc['current_mode'] = result.get('current_mode')
Note: See TracChangeset for help on using the changeset viewer.