Ignore:
Timestamp:
19 Jun 2015, 15:36:21 (9 years ago)
Author:
Henrik Bettermann
Message:

More adjustments for a proper documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r13076 r13077  
    149149    """A collection of methods which are subject to customization.
    150150    """
    151 
    152151    APP_TYPES_DICT = Attribute('dict of application types')
    153152
     
    169168
    170169class IApplicantsRoot(IKofaObject, IContainer):
    171     """A container for university applicants containers.
    172     """
     170    """A container for applicants containers.
     171    """
     172    description_dict = Attribute('Language translation dictionary with values in HTML format')
     173    local_roles = Attribute('List of local role names')
     174    logger_name = Attribute('Name of the logger')
     175    logger_filename = Attribute('Name of the logger file')
    173176
    174177    description = schema.Text(
     
    182185        )
    183186
    184     description_dict = Attribute(
    185         """Content as language dictionary with values in HTML format.""")
    186 
    187187class IApplicantsContainer(IKofaObject):
    188     """An applicants container contains university applicants.
    189 
    190     """
     188    """An applicants container contains applicants.
     189    """
     190    statistics = Attribute('Applicant counts')
     191    expired = Attribute('True if application has started but not ended')
     192
     193    description_dict = Attribute('Language translation dictionary with values in HTML format')
     194    local_roles = Attribute('List of local role names')
     195
    191196
    192197    code = schema.TextLine(
     
    246251        )
    247252
    248     description_dict = Attribute(
    249         """Content as language dictionary with values in HTML format.""")
    250 
    251253    startdate = schema.Datetime(
    252254        title = _(u'Application Start Date'),
     
    285287        )
    286288
    287     def archive(id=None):
    288         """Create on-dist archive of applicants stored in this term.
    289 
    290         If id is `None`, all applicants are archived.
    291 
    292         If id contains a single id string, only the respective
    293         applicants are archived.
    294 
    295         If id contains a list of id strings all of the respective
    296         applicants types are saved to disk.
    297         """
    298 
    299     def clear(id=None, archive=True):
    300         """Remove applicants of type given by 'id'.
    301 
    302         Optionally archive the applicants.
    303 
    304         If id is `None`, all applicants are archived.
    305 
    306         If id contains a single id string, only the respective
    307         applicants are archived.
    308 
    309         If id contains a list of id strings all of the respective
    310         applicant types are saved to disk.
    311 
    312         If `archive` is ``False`` none of the archive-handling is done
    313         and respective applicants are simply removed from the
    314         database.
     289    def addApplicant(applicant):
     290        """Add an applicant.
    315291        """
    316292
    317293    def writeLogMessage(view, comment):
    318         """Adds an INFO message to the log file
     294        """Add an INFO message to the log file.
     295        """
     296
     297    def traverse(name):
     298        """Deliver appropriate containers.
    319299        """
    320300
     
    342322
    343323class IApplicantBaseData(IApplicantBase):
    344     """The data for an applicant.
    345 
    346     This is a base interface with no field
     324    """This is a base interface of an applicant with no field
    347325    required. For use with processors, forms, etc., please use one of
    348326    the derived interfaces below, which set more fields to required
    349327    state, depending on use-case.
    350328    """
    351 
    352329    history = Attribute('Object history, a list of messages')
    353330    state = Attribute('The application state of an applicant')
     
    368345        readonly = False,
    369346        )
     347
    370348    reg_number = TextLineChoice(
    371349        title = _(u'Registration Number'),
     
    374352        source = contextual_reg_num_source,
    375353        )
    376     #access_code = schema.TextLine(
    377     #    title = u'Activation Code',
    378     #    required = False,
    379     #    readonly = True,
    380     #    )
     354
    381355    firstname = schema.TextLine(
    382356        title = _(u'First Name'),
    383357        required = True,
    384358        )
     359
    385360    middlename = schema.TextLine(
    386361        title = _(u'Middle Name'),
    387362        required = False,
    388363        )
     364
    389365    lastname = schema.TextLine(
    390366        title = _(u'Last Name (Surname)'),
    391367        required = True,
    392368        )
     369
    393370    date_of_birth = FormattedDate(
    394371        title = _(u'Date of Birth'),
    395372        required = False,
    396         #date_format = u'%d/%m/%Y', # Use grok-instance-wide default
    397373        show_year = True,
    398374        )
     375
    399376    sex = schema.Choice(
    400377        title = _(u'Sex'),
     
    402379        required = True,
    403380        )
     381
    404382    email = schema.ASCIILine(
    405383        title = _(u'Email Address'),
     
    407385        constraint=validate_email,
    408386        )
     387
    409388    phone = PhoneNumber(
    410389        title = _(u'Phone'),
     
    412391        required = False,
    413392        )
     393
    414394    course1 = schema.Choice(
    415395        title = _(u'1st Choice Course of Study'),
     
    417397        required = True,
    418398        )
     399
    419400    course2 = schema.Choice(
    420401        title = _(u'2nd Choice Course of Study'),
     
    422403        required = False,
    423404        )
     405
    424406    #school_grades = schema.List(
    425407    #    title = _(u'School Grades'),
     
    456438
    457439class IApplicant(IApplicantBaseData):
    458     """An applicant.
    459 
    460     This is basically the applicant base data. Here we repeat the
     440    """This is basically the applicant base data. Here we repeat the
    461441    fields from base data if we have to set the `required` attribute
    462442    to True (which is the default).
     
    473453
    474454class ISpecialApplicant(IApplicantBase):
    475     """A special applicant.
    476 
    477     This reduced interface is for former students or students who are not
     455    """This reduced interface is for former students or students who are not
    478456    student users of the portal but have to pay supplementary fees.
    479457
     
    482460    only 'customize' fields.
    483461    """
    484 
    485462    history = Attribute('Object history, a list of messages')
    486463    state = Attribute('The application state of an applicant')
     
    557534
    558535class IApplicantEdit(IApplicant):
    559     """An applicant interface for editing.
     536    """This is an applicant interface for editing.
    560537
    561538    Here we can repeat the fields from base data and set the
     
    573550        constraint=validate_email,
    574551        )
     552
    575553    course1 = schema.Choice(
    576554        title = _(u'1st Choice Course of Study'),
     
    578556        required = True,
    579557        )
     558
    580559    course2 = schema.Choice(
    581560        title = _(u'2nd Choice Course of Study'),
     
    583562        required = False,
    584563        )
     564
    585565    course_admitted = schema.Choice(
    586566        title = _(u'Admitted Course of Study'),
     
    589569        readonly = True,
    590570        )
     571
    591572    notice = schema.Text(
    592573        title = _(u'Notice'),
     
    599580
    600581class IApplicantUpdateByRegNo(IApplicant):
    601     """Representation of an applicant.
    602 
    603     Skip regular reg_number validation if reg_number is used for finding
     582    """Skip regular reg_number validation if reg_number is used for finding
    604583    the applicant object.
    605584    """
     
    610589
    611590class IApplicantRegisterUpdate(IApplicant):
    612     """Representation of an applicant for first-time registration.
    613 
     591    """This is a representation of an applicant for first-time registration.
    614592    This interface is used when applicants use the registration page to
    615593    update their records.
     
    643621    def doAfterApplicantPayment():
    644622        """Process applicant after payment was made.
    645 
    646623        """
    647624
    648625    def doAfterApplicantPaymentApproval():
    649626        """Process applicant after payment was approved.
    650 
    651627        """
    652628
    653629    def approveApplicantPayment():
    654630        """Approve payment and process applicant.
    655 
    656         """
     631        """
Note: See TracChangeset for help on using the changeset viewer.