Changeset 2486


Ignore:
Timestamp:
31 Oct 2007, 08:35:05 (17 years ago)
Author:
Henrik Bettermann
Message:

show session_results_view even if results are missing

Location:
WAeUP_SRP/base/skins/waeup_student
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/getSessionResults.py

    r2485 r2486  
    7676        level = r.Level
    7777    if verdict is None:
    78         verdict = r.Verdict       
     78        verdict = r.Verdict
    7979    result = {}
    8080    for field in fields:
     
    118118if verdict:
    119119    info['verdict'] = verdict
     120else:
     121    info['verdict'] = 'N/A'   
    120122if session:
    121123    info['session'] = session
  • WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py

    r2469 r2486  
    3838logger = logging.getLogger('Skins.getStudyLevelInfo')
    3939
    40 def calculateGPA():
    41     """calculate the gpa"""
    42     sum = 0
    43     course_count = 0
    44     for sc in context.objectValues():
    45         result = sc.getContent()
    46         if not result.grade:
    47             continue
    48         res = context.portal_catalog({'meta_type': 'Course',
    49                                       'id': sc.aq_parent.id})
    50         if len(res) < 1:
    51             continue
    52         course = res[0].getObject().getContent()
    53     if course_count:
    54         return sum/course_count
    55     return 0.0
     40#def calculateGPA():
     41#    """calculate the gpa"""
     42#    sum = 0
     43#    course_count = 0
     44#    for sc in context.objectValues():
     45#        result = sc.getContent()
     46#        if not result.grade:
     47#            continue
     48#        res = context.portal_catalog({'meta_type': 'Course',
     49#                                      'id': sc.aq_parent.id})
     50#        if len(res) < 1:
     51#            continue
     52#        course = res[0].getObject().getContent()
     53#    if course_count:
     54#        return sum/course_count
     55#    return 0.0
    5656
    5757def cmp_semester_id(a,b):
Note: See TracChangeset for help on using the changeset viewer.