Changeset 17497 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 20 Jul 2023, 13:38:29 (17 months ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset for help on using the changeset viewer.