Ignore:
Timestamp:
4 Dec 2017, 10:39:28 (7 years ago)
Author:
Henrik Bettermann
Message:

Allow returning students to edit their clearance data and upload a passport picture.

Location:
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/student.py

    r14716 r14919  
    2121import grok
    2222from zope.interface import implementedBy
     23from waeup.kofa.interfaces import CLEARANCE, RETURNING
    2324from waeup.kofa.utils.helpers import attrs_to_fields
    2425from waeup.kofa.students.student import StudentFactory
     
    4344        return False
    4445
     46    @property
     47    def clearance_locked(self):
     48        return self.state not in(CLEARANCE, RETURNING,)
     49
    4550
    4651# Set all attributes of Student required in IStudent as field
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py

    r14884 r14919  
    1919from zope.component import createObject, getUtility
    2020from waeup.kofa.interfaces import (IKofaUtils,
    21     CLEARED, RETURNING, PAID, REGISTERED, VALIDATED)
     21    ADMITTED, CLEARED, RETURNING, PAID, REGISTERED, VALIDATED)
    2222from kofacustom.nigeria.students.utils import NigeriaStudentsUtils
    2323from kofacustom.dspg.interfaces import MessageFactory as _
     
    198198                            'resultstatementupload',
    199199                            )
     200
     201    #: A tuple containing the names of registration states in which changing of
     202    #: passport pictures is allowed.
     203    PORTRAIT_CHANGE_STATES = (ADMITTED, RETURNING,)
Note: See TracChangeset for help on using the changeset viewer.