Changeset 3104


Ignore:
Timestamp:
4 Feb 2008, 15:43:32 (17 years ago)
Author:
joachim
Message:

customisation in one place

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/uniben/waeup_custom/getStudyLevelInfo.py

    r3103 r3104  
    1111"""
    1212return Info about the Studylevel
    13 """
    1413try:
    1514    from Products.zdb import set_trace
     
    1716    def set_trace():
    1817        pass
     18"""
    1919
    2020info = context.waeup_tool.getAccessInfo(context)
     
    8181total_credits,gpa,carry_overs,normal1,normal2,normal3 = course_results.getCourses(student_id,level_id)
    8282info['total_credits'] = total_credits
     83
     84#start customization
     85
    8386max_credits = 50
    8487try:
     
    8790except:
    8891    logger.info("%s has strange level id %s" % (student_id,level_id))
     92info['without_score'] = without_score = True
     93if without_score:
     94    for rows in (normal1,normal2,normal3):
     95        for row in rows:
     96            row['score'] = 0
     97
     98#end customization
     99
    89100info['max_credits'] = max_credits
    90101info['credits_exceeded'] = total_credits > max_credits
     
    95106    info['gpa'] = "%4.2f" % (float(gpa)/int(total_credits))
    96107
    97 
    98 
    99108# carry_overs.sort(cmp_semester_id)
    100109info['carry_overs'] = carry_overs
    101110# normal.sort(cmp_semester_id)
    102 info['without_score'] = without_score = True
    103 if without_score:
    104     for rows in (normal1,normal2,normal3):
    105         for row in rows:
    106             row['score'] = 0
    107111       
    108112info['normal1'] = normal1
Note: See TracChangeset for help on using the changeset viewer.