- Timestamp:
- 3 Jan 2007, 12:53:20 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/display_session_results.py
r1177 r1183 41 41 elif psm == 'valid': 42 42 pass 43 s_fields = context.returning_import.schema() 44 student_rec = ds.get('student') 45 student = {} 46 for field in s_fields: 47 student[field] = getattr(student_rec,field) 43 48 brains = ds.get('results') 44 49 sem1 = [] 45 50 sem2 = [] 46 51 with_courses_cat = hasattr(context,'courses_catalog') 52 47 53 fields = context.results_import.schema() 54 verdict = None 55 session = None 48 56 for r in brains: 57 if verdict is None: 58 verdict = r.Verdict 59 session = r.Session 49 60 result = {} 50 61 for field in fields: … … 62 73 #from Products.zdb import set_trace;set_trace() 63 74 results = (sem1, sem2) 75 student['verdict'] = verdict 76 student['session'] = session 64 77 registered = None 65 student_rec = ds.get('student')66 78 res = context.students_catalog(matric_no = student_rec.matric_no) 67 79 if res: … … 72 84 else: 73 85 registered = "no_student_object" 74 return context.session_results_anon_view(student=student _rec,86 return context.session_results_anon_view(student=student, 75 87 results=results, 76 88 name = "%(Firstname)s %(Middlename)s %(Lastname)s" % student_rec, -
WAeUP_SRP/trunk/skins/waeup_student/getSessionResults.py
r1179 r1183 60 60 gpa = 0 61 61 course_count = 0 62 verdict = None 63 session = None 62 64 for r in results: 65 if verdict is None: 66 verdict = r.Verdict 67 session = r.Session 63 68 result = {} 64 69 for field in fields: … … 86 91 else: 87 92 sem1.append(result) 88 89 93 if course_count: 90 94 gpa = float(gpa) / course_count 91 95 gpa = "%4.2f" % gpa 96 info['verdict'] = verdict 97 info['session'] = session 92 98 info['gpa'] = gpa 93 99 info['results'] = (sem1, sem2) -
WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py
r1178 r1183 22 22 return context.REQUEST.RESPONSE.redirect("%s/srp_invalid_access" % context.portal_url()) 23 23 24 mode = 'create' 25 if not info['booking_allowed']: 26 return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url()) 24 27 student = info['student'] 25 28 acco_id = info['acco_id'] 26 29 session = acco_id[-4:] 27 mode = 'create'28 if not info['booking_allowed']:29 return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url())30 30 validate = REQUEST.has_key("cpsdocument_create_button") 31 31 if info.has_key('acco') and info['acco']: -
WAeUP_SRP/trunk/skins/waeup_student/session_results_anon_view.pt
r1179 r1183 27 27 <table> 28 28 <tr> 29 <th width="150px">Verdict:</th><td tal:content="python:results[0][0]['Verdict']" /> 29 <th width="150px">Verdict:</th> 30 <td tal:content="student/verdict" /> 30 31 </tr> 31 32 <tr> 32 <th>Session:</th><td tal:content=" python:results[0][0]['Session']" />33 <th>Session:</th><td tal:content="student/session" /> 33 34 </tr> 34 35 </table> -
WAeUP_SRP/trunk/skins/waeup_student/session_results_slip.pt
r1182 r1183 38 38 <table> 39 39 <tr> 40 <th valign="top" width="180px">Verdict:</th><td tal:content="python:info['results'][0][0]['Verdict']" />40 <th width="180px">Verdict:</th><td tal:content="info/verdict" /> 41 41 </tr> 42 42 <tr> 43 <th>Session:</th><td tal:content=" python:info['results'][0][0]['Session']" />43 <th>Session:</th><td tal:content="info/session" /> 44 44 </tr> 45 45 <tr> -
WAeUP_SRP/trunk/skins/waeup_student/session_results_view.pt
r1182 r1183 38 38 <table> 39 39 <tr> 40 <th valign="top" width="180px">Verdict:</th><td tal:content="python:info['results'][0][0]['Verdict']" />40 <th width="180px">Verdict:</th><td tal:content="info/verdict" /> 41 41 </tr> 42 42 <tr> 43 <th>Session:</th><td tal:content=" python:info['results'][0][0]['Session']" />43 <th>Session:</th><td tal:content="info/session" /> 44 44 </tr> 45 45 <tr>
Note: See TracChangeset for help on using the changeset viewer.