Changeset 3166 for WAeUP_SRP


Ignore:
Timestamp:
14 Feb 2008, 21:05:27 (17 years ago)
Author:
Henrik Bettermann
Message:

simplify

old_credits is not always being provided by CRPU staff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_utilities/changeCreditsInCourseResults.py

    r3129 r3166  
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=course_id,old_credits
     7##parameters=course_id
    88##title=
    99##
     
    4545for course_result in course_results:
    4646    count += 1
    47     if int(course_result.credits) != int(old_credits):
    48         logger.info("%s: credits %s does not match %s" % (course_result.key,
    49                                                          course_result.credits,
    50                                                          old_credits))
    51         wrong += 1
    52         continue
     47    #if int(course_result.credits) != int(old_credits):
     48    #    logger.info("%s: credits %s does not match %s" % (course_result.key,
     49    #                                                     course_result.credits,
     50    #                                                     old_credits))
     51    #    wrong += 1
     52    #    continue
    5353    to_edit += course_result.key,
    54 logger.info('%d %s course results found, start editing credits from %s to %s' %
    55             (len(course_results),course_id,old_credits,new_credits))
     54logger.info('%d %s course results found, start editing credits to %s' %
     55            (len(course_results),course_id,new_credits))
    5656for key in to_edit:
    5757    context.course_results.modifyRecord(**{'key': key, 'credits': int(new_credits)})
    58 logger.info('finished editing %d %s course results, %d had wrong credits' % (count, course_id,
    59                                                                      wrong))
     58logger.info('finished editing %d %s course results' % (count, course_id))
    6059
Note: See TracChangeset for help on using the changeset viewer.