Changeset 3104 for WAeUP_SRP/uniben/waeup_custom/getStudyLevelInfo.py
- Timestamp:
- 4 Feb 2008, 15:43:32 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/uniben/waeup_custom/getStudyLevelInfo.py
r3103 r3104 11 11 """ 12 12 return Info about the Studylevel 13 """14 13 try: 15 14 from Products.zdb import set_trace … … 17 16 def set_trace(): 18 17 pass 18 """ 19 19 20 20 info = context.waeup_tool.getAccessInfo(context) … … 81 81 total_credits,gpa,carry_overs,normal1,normal2,normal3 = course_results.getCourses(student_id,level_id) 82 82 info['total_credits'] = total_credits 83 84 #start customization 85 83 86 max_credits = 50 84 87 try: … … 87 90 except: 88 91 logger.info("%s has strange level id %s" % (student_id,level_id)) 92 info['without_score'] = without_score = True 93 if without_score: 94 for rows in (normal1,normal2,normal3): 95 for row in rows: 96 row['score'] = 0 97 98 #end customization 99 89 100 info['max_credits'] = max_credits 90 101 info['credits_exceeded'] = total_credits > max_credits … … 95 106 info['gpa'] = "%4.2f" % (float(gpa)/int(total_credits)) 96 107 97 98 99 108 # carry_overs.sort(cmp_semester_id) 100 109 info['carry_overs'] = carry_overs 101 110 # normal.sort(cmp_semester_id) 102 info['without_score'] = without_score = True103 if without_score:104 for rows in (normal1,normal2,normal3):105 for row in rows:106 row['score'] = 0107 111 108 112 info['normal1'] = normal1
Note: See TracChangeset for help on using the changeset viewer.