Parent Containers Interfaces

IApplicantsRoot

Much like academics and students, also applicants is a unique container (of type ApplicantsRoot) located in the IUniversity instance. It is the counterpart of the students (section) container. The root container has a description schema field attribute which contains human readable, multi-lingual information about the application procedure in HTML format. This description can be seen by anonymous users, when they enter the applicants section (by pressing the ‘Application’ tab in the navigation bar).

Note

A multi-lingual or localized text is a sequence of human-readable text strings in different languages. The languages must be separated by >>xy<<, whereas xy is the language code. Text parts without correct leading language separator - usually the first part has no language descriptor - are interpreted as texts in the portal’s language. The text strings can be either HTML or reStructuredText (REST) formatted.

class IApplicantsRoot(IKofaObject, IContainer):
    """A container for applicants containers.
    """
    description_dict = Attribute('Language translation dictionary with values in HTML format')
    local_roles = Attribute('List of local role names')
    logger_name = Attribute('Name of the logger')
    logger_filename = Attribute('Name of the logger file')

    description = schema.Text(
        title = _(u'Human readable description in HTML format'),
        required = False,
        constraint=validate_html,
        default = u'''This text can been seen by anonymous users.
Here we put multi-lingual general information about the application procedure.
>>de<<
Dieser Text kann von anonymen Benutzern gelesen werden.
Hier koennen mehrsprachige Informationen fuer Antragsteller hinterlegt werden.'''
        )

IApplicantsContainer

The applicants root contains the various ApplicantsContainer objects and is also a configuration object.

class IApplicantsContainer(IKofaObject):
    """An applicants container contains applicants.
    """
    statistics = Attribute('Applicant counts')
    expired = Attribute('True if application has started but not ended')

    description_dict = Attribute('Language translation dictionary with values in HTML format')
    local_roles = Attribute('List of local role names')
    picture_editable = Attribute('False if applicants are not allowed to edit uploaded pictures.')


    code = schema.TextLine(
        title = _(u'Code'),
        required = True,
        readonly = True,
        )

    title = schema.TextLine(
        title = _(u'Title'),
        required = True,
        readonly = False,
        )

    prefix = schema.Choice(
        title = _(u'Application Target'),
        required = True,
        source = ApplicationTypeSource(),
        readonly = True,
        )

    year = schema.Choice(
        title = _(u'Year of Entrance'),
        required = False,
        values = year_range(),
        readonly = False,
        )

    mode = schema.Choice(
        title = _(u'Application Mode'),
        vocabulary = application_modes_vocab,
        required = True,
        )

    # Maybe FUTMinna still needs this ...
    #ac_prefix = schema.Choice(
    #    title = u'Activation code prefix',
    #    required = True,
    #    default = None,
    #    source = ApplicationPinSource(),
    #    )

    application_category = schema.Choice(
        title = _(u'Category for the grouping of certificates'),
        required = True,
        source = AppCatSource(),
        )

    description = schema.Text(
        title = _(u'Human readable description in HTML format'),
        required = False,
        constraint=validate_html,
        default = u'''This text can been seen by anonymous users.
Here we put multi-lingual information about the study courses provided, the application procedure and deadlines.
>>de<<
Dieser Text kann von anonymen Benutzern gelesen werden.
Hier koennen mehrsprachige Informationen fuer Antragsteller hinterlegt werden.'''
        )

    startdate = schema.Datetime(
        title = _(u'Application Start Date'),
        required = False,
        description = _('Example: ') + u'2011-12-01 18:30:00+01:00',
        )

    enddate = schema.Datetime(
        title = _(u'Application Closing Date'),
        required = False,
        description = _('Example: ') + u'2011-12-31 23:59:59+01:00',
        )

    strict_deadline = schema.Bool(
        title = _(u'Forbid additions after deadline (enddate)'),
        required = False,
        default = True,
        )

    application_fee = schema.Float(
        title = _(u'Application Fee'),
        default = 0.0,
        required = False,
        )

    application_slip_notice = schema.Text(
        title = _(u'Human readable notice on application slip in HTML format'),
        required = False,
        constraint=validate_html,
        )

    hidden= schema.Bool(
        title = _(u'Hide container'),
        required = False,
        default = False,
        )

    with_picture= schema.Bool(
        title = _(u'With passport picture'),
        required = False,
        default = True,
        )

    send_email= schema.Bool(
        title = _(u'Send email after submission'),
        required = False,
        default = False,
        )

    def addApplicant(applicant):
        """Add an applicant.
        """

    def writeLogMessage(view, comment):
        """Add an INFO message to applicants.log.
        """

    def traverse(name):
        """Deliver appropriate containers.
        """

statistics and expired are read-only property attributes. description_dict contains the same information as the description, but the sequence of language translations has been split up and copied into a dictionary for faster processing.

Crucial for application are the prefix, year, mode and application_category schema fields. The prefix atribute can only be set when adding a container. It cannot be edited afterwards. The attribute determines the application type and automatically sets the prefix of the container code and of all applicant ids inside the container. The prefix is supplied by the ApplicationTypeSource (see application types of base package). It is followed by the year of entry. Thus, the identifiers of applicants containers and the applicants inside the containers start with the same prefix-year sequence. Example: app2015 which translates into ‘General Studies 2015/2016’. Consequently, applicants cannot be moved from one container to another.

The application mode is either create or update. In create mode the container can be either left empty or it can be pre-filled with fresh and ‘unused’ records. In the first case, records are being created after submission of the first form. In the second case, unused record are fetched and filled with the form data. In both ‘create mode’ cases, applicants are requested to provide all data needed, including their name details. In update mode, the applicants container must have been pre-filled by import, e.g. with records provided by an external board. These records are called ‘used’ since they already contain data. Applicants can’t create new records in update mode, they can only open and take possession of existing records.

The application category is supplied by the ApplicationCategorySource (see application categories of base package) and refers to a group of study programmes (certificates) which the applicant can apply for, read also chapter on Certificates.

Applicant Interfaces

As already mentioned, the applicant objects contains all information necessary for application, except for the payment ticket data. The base set of the applicant’s ‘external behaviour’ is described by the following interface.

IApplicantBaseData

class IApplicantBaseData(IKofaObject):
    """This is a base interface of an applicant with no field
    required. For use with processors, forms, etc., please use one of
    the derived interfaces below, which set more fields to required
    state, depending on use-case.
    """
    state = Attribute('Application state of an applicant')
    history = Attribute('Object history, a list of messages')
    display_fullname = Attribute('The fullname of an applicant')
    application_number = Attribute('The key under which the record is stored')
    container_code = Attribute('Code of the parent container plus additional information if record is used or not')
    translated_state = Attribute('Real name of the application state')
    special = Attribute('True if special application')
    payments = Attribute('List of payment objects stored in the applicant container')

    application_date = Attribute('UTC datetime of submission, used for export only')
    password = Attribute('Encrypted password of an applicant')


    suspended = schema.Bool(
        title = _(u'Account suspended'),
        default = False,
        required = False,
        )

    applicant_id = schema.TextLine(
        title = _(u'Applicant Id'),
        required = False,
        readonly = False,
        )

    reg_number = TextLineChoice(
        title = _(u'Registration Number'),
        readonly = False,
        required = False,
        source = contextual_reg_num_source,
        )

    firstname = schema.TextLine(
        title = _(u'First Name'),
        required = True,
        )

    middlename = schema.TextLine(
        title = _(u'Middle Name'),
        required = False,
        )

    lastname = schema.TextLine(
        title = _(u'Last Name (Surname)'),
        required = True,
        )

    date_of_birth = FormattedDate(
        title = _(u'Date of Birth'),
        required = False,
        show_year = True,
        )

    sex = schema.Choice(
        title = _(u'Gender'),
        source = GenderSource(),
        required = True,
        )

    email = schema.ASCIILine(
        title = _(u'Email Address'),
        required = False,
        constraint=validate_email,
        )

    phone = PhoneNumber(
        title = _(u'Phone'),
        description = u'',
        required = False,
        )

    course1 = schema.Choice(
        title = _(u'1st Choice Course of Study'),
        source = AppCatCertificateSource(),
        required = False,
        )

    course2 = schema.Choice(
        title = _(u'2nd Choice Course of Study'),
        source = AppCatCertificateSource(),
        required = False,
        )

    notice = schema.Text(
        title = _(u'Notice'),
        required = False,
        )
    student_id = schema.TextLine(
        title = _(u'Student Id'),
        required = False,
        readonly = False,
        )
    course_admitted = schema.Choice(
        title = _(u'Admitted Course of Study'),
        source = CertificateSource(),
        required = False,
        )
    locked = schema.Bool(
        title = _(u'Form locked'),
        default = False,
        required = False,
        )

    special_application = schema.Choice(
        title = _(u'Special Application'),
        source = SpecialApplicationSource(),
        required = False,
        )

As usual, the interface lists attributes first. Except for the last two attributes (password and application_date), they are all read-only property attributes, i.e. attributes with a getter method only. These properties are computed dynamically and can’t be set.

IApplicant

In the base package IApplicant is derived from IApplicantBaseData and only two methods are added:

class IApplicant(IApplicantBaseData, IApplicantTestData):
    """This is basically the applicant base data. Here we repeat the
    fields from base data if we have to set the `required` attribute
    to True (which is the default).
    """

    def writeLogMessage(view, comment):
        """Add an INFO message to applicants.log.
        """

    def createStudent(view, graduated):
        """Create a student object from applicant data and copy
        passport image and application slip. If graduated is set True,
        a graduated student is being created. This method is supposed
        to be used for transcript applicants. It is tested but not
        used in the base package.
        """

In custom packages we have furthermore interfaces for undergraduate and postgraduate students, both derived from IApplicantBaseData.

Then there is a customized interface ISpecialApplicant for former students or students who are not users of the portal but have to pay supplementary fees. This reduced interface is used in browser components only, it does not instantiate applicant objects.

Applicant Payment Interfaces

IApplicantOnlinePayment

Instances of this interface are called applicant payment tickets. They contain the data which confirm that the applicant has paid the application fee. waeup.kofa.students.interfaces.IStudentOnlinePayment inherits from waeup.kofa.payments.interfaces.IOnlinePayment and promises three additional methods which process the applicant data after successful or approved payment.

class IApplicantOnlinePayment(IOnlinePayment):
    """An applicant payment via payment gateways.
    """

    def doAfterApplicantPayment():
        """Process applicant after payment was made.
        """

    def doAfterApplicantPaymentApproval():
        """Process applicant after payment was approved.
        """

    def approveApplicantPayment():
        """Approve payment and process applicant.
        """