- Timestamp:
- 8 Aug 2008, 06:37:57 (16 years ago)
- Location:
- WAeUP_SRP/unilorin/waeup_custom
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/unilorin/waeup_custom/getTranscriptInfo.py
r3612 r3618 26 26 if student_id is None: 27 27 return None 28 29 mtool = context.portal_membership 30 if mtool.isAnonymousUser() or not context.isSectionOfficer():31 return None 28 29 mtool = context.portal_membership 30 if mtool.isAnonymousUser(): # or not context.isSectionOfficer(): 31 return None 32 32 33 33 mtool = context.portal_membership … … 58 58 total_credits = 0 59 59 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']) 62 63 if gpa and total_credits: 63 year_details[year_counter]['total_credits'] = total_credits 64 year_details[year_counter]['total_credits'] = total_credits 64 65 year_details[year_counter]['gpa'] = "%4.2f" % (float(gpa)/int(total_credits)) 65 66 year.sort(cmp=lambda x,y: cmp("%(semester)s%(code)s" % x, 66 67 "%(semester)s%(code)s" % y)) 67 68 year_counter += 1 68 69 69 70 info['year_details'] = year_details 70 71 info['year_courses'] = year_courses 71 72 72 73 return info 73 74 -
WAeUP_SRP/unilorin/waeup_custom/transcript_view.pt
r3612 r3618 10 10 <span tal:condition="info"> 11 11 <span tal:define= "is_so context/isSectionOfficer; 12 is_ca context/isCourseAdviser; 12 13 is_student info/is_student; 13 14 with_score not: info/without_score|nothing;
Note: See TracChangeset for help on using the changeset viewer.