- Timestamp:
- 20 Jul 2023, 13:38:29 (17 months ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/mytranscriptrequests.pt
r17411 r17497 10 10 <th i18n:translate="">Full Name</th> 11 11 <th i18n:translate="">Course Studied</th> 12 <th i18n:translate="">End Session</th> 13 <th i18n:translate="">Entry Mode</th> 12 14 <th i18n:translate="">Submission Date</th> 13 15 </tr> … … 22 24 </td> 23 25 <td tal:content="python:item[0].display_fullname">Bob</td> 24 <td tal:content="python:getattr(item[0].course_studied,'title',None)">Bob</td> 25 <td tal:content="python:item[1]">Bob</td> 26 <td tal:content="python:getattr(item[0].course_studied,'title',None)">CERT</td> 27 <td tal:content="python:getattr(item[0],'end_session',None)">2012</td> 28 <td tal:content="python:getattr(item[0],'entry_mode',None)">UG</td> 29 <td tal:content="python:item[1]">date</td> 26 30 </tr> 27 31 </tbody> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r17458 r17497 1602 1602 self.redirect(self.url(self.context)) 1603 1603 return 1604 self.tdata = self.context.getTranscriptData() 1605 #if not self.tdata[1]: 1606 # self.flash(_('No results yet!'), type="warning") 1607 # self.redirect(self.url(self.context)) 1608 # return 1604 1609 super(StudyCourseTranscriptPage, self).update() 1605 1610 self.semester_dict = getUtility(IKofaUtils).SEMESTER_DICT … … 1636 1641 self.redirect(self.url(self.context)) 1637 1642 return 1643 tdata = self.context.getTranscriptData() 1644 #if not tdata[1]: 1645 # self.flash(_('No results yet!'), type="warning") 1646 # self.redirect(self.url(self.context)) 1647 # return 1638 1648 super(ExportPDFTranscriptSlip, self).update() 1639 1649 self.semester_dict = getUtility(IKofaUtils).SEMESTER_DICT -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/transcript.pt
r16046 r17497 1 <tal:def define="tdata python:context.getTranscriptData()">2 1 <table class="form-table" i18n:domain="waeup.kofa"> 3 2 <thead> … … 16 15 </tr> 17 16 </tal:block> 18 <tr >17 <tr tal:condition="python:view.tdata[1]"> 19 18 <td> 20 19 <span i18n:translate="">Cumulative GPA</span>: 21 20 </td> 22 21 <td> 23 <div tal:content="python:view.format_float( tdata[1], 3)">CGPA</div>22 <div tal:content="python:view.format_float(view.tdata[1], 3)">CGPA</div> 24 23 </td> 25 24 </tr> … … 27 26 </table> 28 27 29 <h3 i18n:domain="waeup.kofa" i18n:translate="">Subjects/Courses</h3> 28 <tal:block condition=python:view.tdata[1]> 29 <h3 i18n:domain="waeup.kofa" i18n:translate="">Subjects/Courses</h3> 30 <table i18n:domain="waeup.kofa" class="form-table" > 31 <thead> 32 <tr> 33 <th i18n:translate="">Level</th> 34 <th i18n:translate="">Session</th> 35 <th i18n:translate="">Term</th> 36 <th i18n:translate="">Course</th> 37 <th i18n:translate="">Title</th> 38 <th i18n:translate="">Credits</th> 39 <th i18n:translate="">Grade</th> 40 </tr> 41 </thead> 42 <tbody> 43 <tal:levels tal:repeat="level python:view.tdata[0]"> 44 <tal:semesters tal:repeat="semester_tickets python:(level['tickets_1'], 45 level['tickets_2'], level['tickets_3'])"> 46 <tr tal:repeat="ticket semester_tickets"> 47 <td tal:content="python: view.level_dict.get('ticket.level', ticket.level)">LEVEL</td> 48 <td tal:content="python: view.session_dict[ticket.level_session]">SESSION</td> 49 <td tal:content="python: view.semester_dict[ticket.semester]">SEMESTER</td> 50 <td tal:content="ticket/code">CODE</td> 51 <td tal:content="ticket/title">TITLE</td> 52 <td tal:content="ticket/credits">CREDITS</td> 53 <td tal:content="ticket/grade|nothing">GRADE</td> 54 </tr> 55 </tal:semesters> 56 </tal:levels> 57 </tbody> 58 </table> 59 <br /> 60 </tal:block> 30 61 31 <table i18n:domain="waeup.kofa" class="form-table" >32 <thead>33 <tr>34 <th i18n:translate="">Level</th>35 <th i18n:translate="">Session</th>36 <th i18n:translate="">Term</th>37 <th i18n:translate="">Course</th>38 <th i18n:translate="">Title</th>39 <th i18n:translate="">Credits</th>40 <th i18n:translate="">Grade</th>41 </tr>42 </thead>43 <tbody>44 <tal:levels tal:repeat="level python:tdata[0]">45 <tal:semesters tal:repeat="semester_tickets python:(level['tickets_1'],46 level['tickets_2'], level['tickets_3'])">47 <tr tal:repeat="ticket semester_tickets">48 <td tal:content="python: view.level_dict.get('ticket.level', ticket.level)">LEVEL</td>49 <td tal:content="python: view.session_dict[ticket.level_session]">SESSION</td>50 <td tal:content="python: view.semester_dict[ticket.semester]">SEMESTER</td>51 <td tal:content="ticket/code">CODE</td>52 <td tal:content="ticket/title">TITLE</td>53 <td tal:content="ticket/credits">CREDITS</td>54 <td tal:content="ticket/grade|nothing">GRADE</td>55 </tr>56 </tal:semesters>57 </tal:levels>58 </tbody>59 </table>60 <br />61 62 <div tal:content="python:getattr(context, 'transcript_signees', '')">SIGNEES</div> 62 </tal:def> 63 64 <p tal:condition="not: python:view.tdata[1]"> 65 <br /> 66 <strong>No results yet!</strong> 67 </p> -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r17182 r17497 1089 1089 else: 1090 1090 f_text = formatted_text('%s' % cgpa) 1091 if not transcript_data[1]: 1092 f_text = formatted_text('No results yet!') 1091 1093 f_text = Paragraph(f_text, ENTRY1_STYLE) 1092 1094 contextdata.append([f_label,f_text]) … … 1095 1097 data.append(contexttable) 1096 1098 1097 transcripttables = render_transcript_data( 1098 view, tableheader, levels_data, lang=portal_language) 1099 data.extend(transcripttables) 1099 if transcript_data[1]: 1100 transcripttables = render_transcript_data( 1101 view, tableheader, levels_data, lang=portal_language) 1102 data.extend(transcripttables) 1100 1103 1101 1104 # Insert signatures -
main/waeup.kofa/trunk/src/waeup/kofa/university/export.py
r16450 r17497 123 123 124 124 def mangle_value(self, value, name, context=None): 125 """The mangler additionally computes the department_code value126 which is the code of the department that offers the course.125 """The mangler additionally computes the department_code 126 and faculty_code values. 127 127 """ 128 128 if name == 'users_with_local_roles': … … 166 166 167 167 fields = ('code', 'faculty_code', 'department_code', 'title', 'study_mode', 168 'degree', 'key',168 'degree', 169 169 'start_level', 'end_level', 'application_category', 'ratio', 170 170 'school_fee_1', 'school_fee_2', 'school_fee_3', 'school_fee_4', … … 174 174 175 175 title = _(u'Certificates') 176 177 def mangle_value(self, value, name, context=None):178 """The mangler additionally computes the department_code value179 which is the code of the department that offers the certificate.180 """181 if name == 'key':182 value = context.__name__183 return super(CertificateExporter, self).mangle_value(184 value, name, context)185 176 186 177 def export_all(self, site, filepath=None): -
main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_export.py
r16450 r17497 400 400 result, 401 401 'code,faculty_code,department_code,title,study_mode,' 402 'degree, key,start_level,'402 'degree,start_level,' 403 403 'end_level,application_category,ratio,school_fee_1,' 404 404 'school_fee_2,school_fee_3,school_fee_4,' … … 406 406 'custom_float_1,custom_float_2,' 407 407 'users_with_local_roles\r\n' 408 'CERT1,F1,D1,Master of Cheese,ct_ft,, CERT1,100,300,basic,,,,,,,,,,'408 'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,' 409 409 '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n' 410 410 ) … … 418 418 result, 419 419 'code,faculty_code,department_code,title,study_mode,' 420 'degree, key,start_level,'420 'degree,start_level,' 421 421 'end_level,application_category,ratio,school_fee_1,' 422 422 'school_fee_2,school_fee_3,school_fee_4,' … … 424 424 'custom_float_1,custom_float_2,' 425 425 'users_with_local_roles\r\n' 426 'CERT1,F1,D1,Master of Cheese,ct_ft,, CERT1,100,300,basic,,,,,,,,,,'426 'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,' 427 427 '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n' 428 'CERT2,F1,D1,Master of Cheddar,ct_ft,, CERT2,400,700,cest,,,,,,,,,,[]\r\n'428 'CERT2,F1,D1,Master of Cheddar,ct_ft,,400,700,cest,,,,,,,,,,[]\r\n' 429 429 ) 430 430 return … … 438 438 result, 439 439 'code,faculty_code,department_code,title,study_mode,' 440 'degree, key,start_level,'440 'degree,start_level,' 441 441 'end_level,application_category,ratio,' 442 442 'school_fee_1,school_fee_2,school_fee_3,school_fee_4,' … … 444 444 'custom_float_1,custom_float_2,' 445 445 'users_with_local_roles\r\n' 446 'CERT1,F1,D1,Master of Cheese,ct_ft,, CERT1,100,300,basic,,,,,,,,,,'446 'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,' 447 447 '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n' 448 'CERT2,F1,D1,Master of Cheddar,ct_ft,, CERT2,400,700,cest,,,,,,,,,,[]\r\n'449 'CERT3,F1,D2,Cert. of Rubbish,dp_pt,, CERT3,100,200,no,,,,,,,,,,[]\r\n'448 'CERT2,F1,D1,Master of Cheddar,ct_ft,,400,700,cest,,,,,,,,,,[]\r\n' 449 'CERT3,F1,D2,Cert. of Rubbish,dp_pt,,100,200,no,,,,,,,,,,[]\r\n' 450 450 ) 451 451 return … … 458 458 result, 459 459 'code,faculty_code,department_code,title,study_mode,' 460 'degree, key,start_level,'460 'degree,start_level,' 461 461 'end_level,application_category,ratio,' 462 462 'school_fee_1,school_fee_2,school_fee_3,school_fee_4,' … … 464 464 'custom_float_1,custom_float_2,' 465 465 'users_with_local_roles\r\n' 466 'CERT1,F1,D1,Master of Cheese,ct_ft,, CERT1,100,300,basic,,,,,,,,,,'466 'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,' 467 467 '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n' 468 'CERT2,F1,D1,Master of Cheddar,ct_ft,, CERT2,400,700,cest,,,,,,,,,,[]\r\n'469 'CERT3,F1,D2,Cert. of Rubbish,dp_pt,, CERT3,100,200,no,,,,,,,,,,[]\r\n'468 'CERT2,F1,D1,Master of Cheddar,ct_ft,,400,700,cest,,,,,,,,,,[]\r\n' 469 'CERT3,F1,D2,Cert. of Rubbish,dp_pt,,100,200,no,,,,,,,,,,[]\r\n' 470 470 ) 471 471 return
Note: See TracChangeset for help on using the changeset viewer.