Changeset 14149
- Timestamp:
- 2 Sep 2016, 05:42:16 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r14137 r14149 654 654 self.current_academic_session).title 655 655 self.tickets = self._searchCatalog(self.current_academic_session) 656 editable_tickets = [656 self.editable_tickets = [ 657 657 ticket for ticket in self.tickets if ticket.editable_by_lecturer] 658 658 if not self.tickets: … … 663 663 return 664 664 665 if not editable_tickets:665 if not self.editable_tickets: 666 666 return 667 667 if 'UPDATE_FILE' in form: … … 681 681 formvals = dict(zip(form['sids'], zip(form['scores'], form['cas']))) 682 682 error = '' 683 for ticket in editable_tickets: 683 # In AAUE only editable tickets are shown, see also customized 684 # pagetemplate 685 for ticket in self.editable_tickets: 684 686 ticket_error = False 685 687 score = ticket.score … … 736 738 code=(self.context.code, self.context.code) 737 739 ) 740 # In AAUE only editable tickets can be printed 741 editable_tickets = [ 742 ticket for ticket in coursetickets if ticket.editable_by_lecturer] 738 743 header = [[_(''), 739 744 _('Matric No.'), … … 750 755 tickets = [] 751 756 no = 1 752 for ticket in list(coursetickets): 757 # In AAUE only editable tickets can be printed 758 for ticket in editable_tickets: 753 759 if None in (ticket.score, ticket.ca): 754 760 total = 'n/a' -
main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/editscorespage.pt
r13941 r14149 84 84 </thead> 85 85 <tbody> 86 <tr tal:repeat="ticket view/ tickets">86 <tr tal:repeat="ticket view/editable_tickets"> 87 87 <td tal:content="ticket/student/matric_number">MATRIC_NUMBER</td> 88 88 <td tal:content="ticket/student/reg_number">REG_NUMBER</td> … … 91 91 <td tal:content="ticket/student/certcode">CERTCODE</td> 92 92 <td tal:content="ticket/level">LEVEL</td> 93 <td tal:condition="ticket/editable_by_lecturer"style="width: 65px;">93 <td style="width: 65px;"> 94 94 <input type="text" name="scores:list" class="form-control" 95 95 tal:attributes="value ticket/score" /> … … 97 97 tal:attributes="value ticket/student/student_id" /> 98 98 </td> 99 <td tal:condition="ticket/editable_by_lecturer"style="width: 65px;">99 <td style="width: 65px;"> 100 100 <input type="text" name="cas:list" class="form-control" 101 101 tal:attributes="value ticket/ca" /> 102 102 </td> 103 <td tal:condition="not: ticket/editable_by_lecturer"104 tal:content="ticket/score">SCORE</td>105 <td tal:condition="not: ticket/editable_by_lecturer"106 tal:content="ticket/ca">CA</td>107 103 </tr> 108 104 </tbody>
Note: See TracChangeset for help on using the changeset viewer.