Changeset 3618 for WAeUP_SRP


Ignore:
Timestamp:
8 Aug 2008, 06:37:57 (16 years ago)
Author:
Henrik Bettermann
Message:

change permissions

Location:
WAeUP_SRP/unilorin/waeup_custom
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/unilorin/waeup_custom/getTranscriptInfo.py

    r3612 r3618  
    2626if student_id is None:
    2727    return None
    28    
    29 mtool = context.portal_membership   
    30 if mtool.isAnonymousUser() or not context.isSectionOfficer():
    31     return None   
     28
     29mtool = context.portal_membership
     30if mtool.isAnonymousUser(): # or not context.isSectionOfficer():
     31    return None
    3232
    3333mtool = context.portal_membership
     
    5858    total_credits = 0
    5959    for course in year:
    60         gpa += int(course['weight']) * int(course['credits'])
    61         total_credits += int(course['credits'])   
     60        if course['weight'] and course['credits']:
     61            gpa += int(course['weight']) * int(course['credits'])
     62            total_credits += int(course['credits'])
    6263    if gpa and total_credits:
    63         year_details[year_counter]['total_credits'] = total_credits   
     64        year_details[year_counter]['total_credits'] = total_credits
    6465        year_details[year_counter]['gpa'] = "%4.2f" % (float(gpa)/int(total_credits))
    6566    year.sort(cmp=lambda x,y: cmp("%(semester)s%(code)s" % x,
    6667                                         "%(semester)s%(code)s" % y))
    6768    year_counter += 1
    68    
     69
    6970info['year_details'] = year_details
    7071info['year_courses'] = year_courses
    7172
    7273return info
    73 
    74 
  • WAeUP_SRP/unilorin/waeup_custom/transcript_view.pt

    r3612 r3618  
    1010    <span tal:condition="info">
    1111    <span tal:define= "is_so context/isSectionOfficer;
     12                       is_ca context/isCourseAdviser;
    1213                       is_student info/is_student;
    1314                       with_score not: info/without_score|nothing;
Note: See TracChangeset for help on using the changeset viewer.