- Timestamp:
- 31 Dec 2006, 16:27:38 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/display_session_results.py
r1151 r1165 40 40 ) 41 41 elif psm == 'valid': 42 ## context.waeup_tool.makeStudent(ds.get('student'), 43 ## results=ds.get('results')) 44 return context.session_results_anon_view(student=ds.get('student'), 45 results=ds.get('results')) 42 pass 43 brains = ds.get('results') 44 sem1 = [] 45 sem2 = [] 46 with_courses_cat = hasattr(context,'courses_catalog') 47 fields = context.results_import.schema() 48 for r in brains: 49 result = {} 50 for field in fields: 51 result[field] = getattr(r,field) 52 if with_courses_cat: 53 res = context.courses_catalog(code = r.CosCode) 54 if with_courses_cat and res: 55 result['title'] = res[0].title 56 else: 57 result['title'] = "Title no available" 58 if r.Semester == '2': 59 sem2.append(result) 60 else: 61 sem1.append(result) 62 #from Products.zdb import set_trace;set_trace() 63 results = (sem1, sem2) 64 return context.session_results_anon_view(student=ds.get('student'), 65 results=results) 46 66 -
WAeUP_SRP/trunk/skins/waeup_student/session_results_anon_view.pt
r1160 r1165 4 4 <metal:body use-macro="here/main_template/macros/master"> 5 5 <metal:main fill-slot="main"> 6 <div style="text-align: right">6 <div tal:condition="nothing" style="text-align: right"> 7 7 <a href="" target="slip" tal:attributes="href string:session_results_anon_slip?nr=${student/matric_no}" 8 8 onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')"> … … 33 33 <table> 34 34 <tr> 35 <th width="150px">Verdict:</th><td tal:content="python:results[0][ 'Verdict']" />35 <th width="150px">Verdict:</th><td tal:content="python:results[0][0]['Verdict']" /> 36 36 </tr> 37 37 <tr> 38 <th>Session:</th><td tal:content="python:results[0][ 'Session']" />38 <th>Session:</th><td tal:content="python:results[0][0]['Session']" /> 39 39 </tr> 40 40 </table> … … 43 43 44 44 <table> 45 <span tal:repeat="resultresults">46 <tr tal:condition="repeat/ result/start">47 <th width=" 150px">Course</th><th>Grade</th>45 <span tal:repeat="semester results"> 46 <tr tal:condition="repeat/semester/start"> 47 <th width="50px">Course</th><th>Title</th><th>Grade</th> 48 48 </tr> 49 <tr><td tal:content="result/CosCode" /> 50 <td tal:content="result/GRADE" /> 49 <span tal:repeat="result semester"> 50 <tr tal:condition="repeat/result/start"> 51 <th colspan="5"> 52 <span tal:replace="python: test(repeat['result'].index,'Second','First')" /> Semester 53 </th> 54 </tr> 55 <tr> 56 <td tal:content="result/CosCode" /> 57 <td tal:condition="nothing" align="center" tal:content="result/Semester" /> 58 <td tal:content="result/title" /> 59 <td align="center" tal:content="result/GRADE" /> 51 60 </tr> 61 </span> 52 62 </span> 53 63 </table>
Note: See TracChangeset for help on using the changeset viewer.