Changeset 14599


Ignore:
Timestamp:
2 Mar 2017, 08:34:25 (8 years ago)
Author:
Henrik Bettermann
Message:

Modify introduction.

File:
1 edited

Legend:

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

    r14592 r14599  
    3232    def introduction (self):
    3333        havenot = ''
    34         if len(self.data[0]):
    35             havenot = '/have not'
     34        plurals = ''
     35        num_students = sum([len(i) for i in self.data])
     36        if num_students == 0:
     37            return ''
     38        if num_students > 1:
     39            plurals = 's'
     40            if len(self.data[0]):
     41                havenot = 'have/have not'
     42            else:
     43                havenot = 'have'
     44        else:
     45            if self.data[0]:
     46                havenot = 'has not'
     47            else:
     48                havenot = 'has'
     49
    3650        text = """I present to Senate, on behalf of the Faculty Board,
    3751the results of courses taught and examinations held this academic session.
    38 The following candidate(s) have%s satisfied the degree requirements
    39 of the Faculty and have%s qualified for the award of a degree as follows:
    40 """ % (havenot, havenot)
     52The following candidate%s %s satisfied the degree requirements
     53of the Faculty and %s qualified for the award of a degree as follows:
     54""" % (plurals, havenot, havenot)
    4155        return text
    4256
Note: See TracChangeset for help on using the changeset viewer.