Ignore:
Timestamp:
18 Nov 2019, 13:24:41 (5 years ago)
Author:
Henrik Bettermann
Message:

Add grade statistics.

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

    r15713 r15822  
    10271027        else:
    10281028            formvals = dict(zip(form['sids'], zip(
    1029                 form['scores'], form['cas'], form['imported_tss'])))
     1029                form['scores'], form['cas'], form['imported_ts'])))
    10301030        for ticket in self.editable_tickets:
    10311031            ticket_error = False
     
    11761176        failed = 0
    11771177        with_ca = False
     1178        grade_stats = {'A':0, 'B':0, 'C':0, 'D':0, 'E':0, 'F':0, }
    11781179        for ticket in sorted_tickets:
    11791180            if ticket.ca > 0:
     
    11831184                total = "**%s**" % ticket.imported_ts
    11841185            grade = ticket._getGradeWeightFromScore[0]
     1186            if grade in grade_stats.keys():
     1187                grade_stats[grade] += 1
    11851188            if grade in ('F', '-'):
    11861189                failed += 1
     
    12331236                del(ticket[5])
    12341237        return header + tickets, [
    1235             dep, fac, total, passed, passed_perc, failed, failed_perc]
     1238            dep, fac, total, passed, passed_perc, failed, failed_perc, grade_stats]
    12361239
    12371240    def render(self):
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/editscorespage.pt

    r15547 r15822  
    105105      </td>
    106106      <td style="width: 65px;">
    107           <input type="text" name="imported_tss:list" class="form-control"
     107          <input type="text" name="imported_ts:list" class="form-control"
    108108                 tal:attributes="value ticket/imported_ts" />
    109109      </td>
Note: See TracChangeset for help on using the changeset viewer.