Ignore:
Timestamp:
21 Jun 2016, 06:30:07 (9 years ago)
Author:
Henrik Bettermann
Message:

Resolve ticket #228:

  1. The first column should be the Serial number.
  2. Under the column for Full name, surname should come first in capital letter with a coma before the other names.
  3. The heading for ‘score’ column should be renamed ‘exam score’.
  4. CA column should come before exam score column
  5. The column for Total should be added after exam score column.
  6. Extra column for letter grade should come after the ‘total’ column.
File:
1 edited

Legend:

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

    r13870 r13963  
    1818"""Customize general helper utilities for Kofa.
    1919"""
     20
     21import string
    2022from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
    2123
     
    161163        'Institute of Education': ('dp_ft'),
    162164        }
     165
     166    def fullname(self, firstname, lastname, middlename=None):
     167        """Construct fullname.
     168        """
     169        try:
     170            lastname = lastname.upper()
     171        except AttributeError:
     172            pass
     173        # We do not necessarily have the middlename attribute
     174        if middlename:
     175            givennames = '%s %s' % (firstname, middlename)
     176        else:
     177            givennames = '%s' % firstname
     178        givennames = string.capwords(
     179            givennames.replace('-', ' - ')).replace(' - ', '-')
     180        fullname = '%s, %s' % (lastname, givennames)
     181        if '<' in fullname:
     182            return 'XXX'
     183        return fullname
Note: See TracChangeset for help on using the changeset viewer.