Changeset 2486
- Timestamp:
- 31 Oct 2007, 08:35:05 (17 years ago)
- Location:
- WAeUP_SRP/base/skins/waeup_student
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/getSessionResults.py
r2485 r2486 76 76 level = r.Level 77 77 if verdict is None: 78 verdict = r.Verdict 78 verdict = r.Verdict 79 79 result = {} 80 80 for field in fields: … … 118 118 if verdict: 119 119 info['verdict'] = verdict 120 else: 121 info['verdict'] = 'N/A' 120 122 if session: 121 123 info['session'] = session -
WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py
r2469 r2486 38 38 logger = logging.getLogger('Skins.getStudyLevelInfo') 39 39 40 def calculateGPA():41 """calculate the gpa"""42 sum = 043 course_count = 044 for sc in context.objectValues():45 result = sc.getContent()46 if not result.grade:47 continue48 res = context.portal_catalog({'meta_type': 'Course',49 'id': sc.aq_parent.id})50 if len(res) < 1:51 continue52 course = res[0].getObject().getContent()53 if course_count:54 return sum/course_count55 return 0.040 #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 56 56 57 57 def cmp_semester_id(a,b):
Note: See TracChangeset for help on using the changeset viewer.