Changeset 15006


Ignore:
Timestamp:
13 May 2018, 04:58:37 (7 years ago)
Author:
Henrik Bettermann
Message:

Modify CustomExportPDFScoresSlip.

File:
1 edited

Legend:

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

    r14999 r15006  
    10131013            coursetickets_filtered = [courseticket
    10141014                for courseticket in coursetickets
    1015                 if courseticket.student.current_mode in score_editing_enabled]
     1015                if courseticket.student.current_mode in score_editing_enabled
     1016                and courseticket.total_score is not None]
    10161017        except KeyError:
    10171018            coursetickets_filtered = coursetickets
     
    10211022            if ticket.editable_by_lecturer]
    10221023        header = [[_(''),
     1024                   _('Student Id'),
    10231025                   _('Matric No.'),
    10241026                   #_('Reg. No.'),
     
    10281030                   _('Department'),
    10291031                   _('Level'),
    1030                    _(' CA  '),
    1031                    _('Exam\nScore'),
     1032                   #_(' CA  '),
     1033                   #_('Exam\nScore'),
    10321034                   _('Total '),
    10331035                   _('Grade'),
     
    10431045        # In AAUE only editable tickets can be printed
    10441046        for ticket in sorted_tickets:
    1045             if ticket.total_score is None:
    1046                 total = 'n/a'
    1047                 grade = 'n/a'
     1047            total = ticket.total_score
     1048            grade = ticket._getGradeWeightFromScore[0]
     1049            if grade in ('F', '-'):
     1050                failed += 1
    10481051            else:
    1049                 total = ticket.total_score
    1050                 grade = ticket._getGradeWeightFromScore[0]
    1051                 if grade in ('F', '-'):
    1052                     failed += 1
    1053                 else:
    1054                     passed += 1
     1052                passed += 1
    10551053            fullname = textwrap.fill(ticket.student.display_fullname, 30)
    10561054            #deptitle = site['faculties'][ticket.student.faccode][
    10571055            #    ticket.student.depcode].longtitle
    10581056            row = [no,
     1057                  ticket.student.student_id,
    10591058                  ticket.student.matric_number,
    10601059                  #ticket.student.reg_number,
     
    10641063                  ticket.student.faccode + ' / ' + ticket.student.depcode,
    10651064                  ticket.level,
    1066                   ticket.ca,
    1067                   ticket.score,
     1065                  #ticket.ca,
     1066                  #ticket.score,
    10681067                  total,
    10691068                  grade,
Note: See TracChangeset for help on using the changeset viewer.