Ignore:
Timestamp:
6 Dec 2016, 16:42:02 (8 years ago)
Author:
Henrik Bettermann
Message:

Disable transcripts for students.

Compute performance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r14306 r14315  
    3333    IStudentsUtils, IStudent, IStudentRequestPW)
    3434from waeup.kofa.students.workflow import PAID, REGISTERED, RETURNING
    35 from waeup.kofa.students.studylevel import getGradeWeightFromScore
    3635from waeup.kofa.students.browser import (
    3736    StartClearancePage,
     
    8180    ICustomCourseTicket,
    8281    ICustomStudentBase)
     82from waeup.aaue.students.studylevel import getGradeWeightFromScore
    8383from waeup.aaue.interswitch.browser import gateway_net_amt
    8484from waeup.aaue.interfaces import MessageFactory as _
     
    461461    """Deliver a PDF slip of the context.
    462462    """
    463     grok.require('waeup.viewStudent')
     463#    grok.require('waeup.viewStudent')
    464464
    465465    note = _("""
     
    795795    """
    796796
    797     def table_data(self, session):
     797    def data(self, session):
    798798        cat = queryUtility(ICatalog, name='coursetickets_catalog')
    799799        coursetickets = cat.searchResults(
     
    821821        no = 1
    822822        tickets = []
     823        passed = 0
     824        failed = 0
    823825        # In AAUE only editable tickets can be printed
    824826        for ticket in sorted_tickets:
     
    829831                total = ticket.score + ticket.ca
    830832                grade = getGradeWeightFromScore(total)[0]
     833                if grade == 'F':
     834                    failed += 1
     835                else:
     836                    passed += 1
    831837            fullname = textwrap.fill(ticket.student.display_fullname, 30)
    832838            row = [no,
     
    844850            tickets.append(row)
    845851            no += 1
    846         return header + tickets
     852            total = passed + failed
     853            if total:
     854                passed = 100 * passed / total
     855                failed = 100 * failed / total
     856        return header + tickets, [passed, failed]
    847857
    848858class DownloadPreviousSessionScoresView(DownloadScoresView):
Note: See TracChangeset for help on using the changeset viewer.