Ignore:
Timestamp:
2 Sep 2016, 05:42:16 (8 years ago)
Author:
Henrik Bettermann
Message:

In AAUE only editable tickets are shown.

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  
    654654            self.current_academic_session).title
    655655        self.tickets = self._searchCatalog(self.current_academic_session)
    656         editable_tickets = [
     656        self.editable_tickets = [
    657657            ticket for ticket in self.tickets if ticket.editable_by_lecturer]
    658658        if not self.tickets:
     
    663663            return
    664664
    665         if not editable_tickets:
     665        if not self.editable_tickets:
    666666            return
    667667        if 'UPDATE_FILE' in form:
     
    681681            formvals = dict(zip(form['sids'], zip(form['scores'], form['cas'])))
    682682        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:
    684686            ticket_error = False
    685687            score = ticket.score
     
    736738            code=(self.context.code, self.context.code)
    737739            )
     740        # In AAUE only editable tickets can be printed
     741        editable_tickets = [
     742            ticket for ticket in coursetickets if ticket.editable_by_lecturer]
    738743        header = [[_(''),
    739744                   _('Matric No.'),
     
    750755        tickets = []
    751756        no = 1
    752         for ticket in list(coursetickets):
     757        # In AAUE only editable tickets can be printed
     758        for ticket in editable_tickets:
    753759            if None in (ticket.score, ticket.ca):
    754760                total = 'n/a'
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/editscorespage.pt

    r13941 r14149  
    8484    </thead>
    8585    <tbody>
    86     <tr tal:repeat="ticket view/tickets">
     86    <tr tal:repeat="ticket view/editable_tickets">
    8787      <td tal:content="ticket/student/matric_number">MATRIC_NUMBER</td>
    8888      <td tal:content="ticket/student/reg_number">REG_NUMBER</td>
     
    9191      <td tal:content="ticket/student/certcode">CERTCODE</td>
    9292      <td tal:content="ticket/level">LEVEL</td>
    93       <td tal:condition="ticket/editable_by_lecturer" style="width: 65px;">
     93      <td style="width: 65px;">
    9494          <input type="text" name="scores:list" class="form-control"
    9595                 tal:attributes="value ticket/score" />
     
    9797                 tal:attributes="value ticket/student/student_id" />
    9898      </td>
    99       <td tal:condition="ticket/editable_by_lecturer" style="width: 65px;">
     99      <td style="width: 65px;">
    100100          <input type="text" name="cas:list" class="form-control"
    101101                 tal:attributes="value ticket/ca" />
    102102      </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>
    107103    </tr>
    108104    </tbody>
Note: See TracChangeset for help on using the changeset viewer.