Ignore:
Timestamp:
3 Apr 2016, 06:30:33 (9 years ago)
Author:
Henrik Bettermann
Message:

Add application_number to student base data.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
3 edited

Legend:

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

    r13788 r13795  
    5151    NigeriaStudentClearanceEditFormPage,
    5252    NigeriaAccommodationManageFormPage,
     53    NigeriaStudentBaseDisplayFormPage,
     54    NigeriaStudentBaseManageFormPage
    5355    )
    5456from waeup.aaue.students.interfaces import (
     
    5961    ICustomStudentPersonalEdit,
    6062    ICustomUGStudentClearance,
    61     ICustomCourseTicket)
     63    ICustomCourseTicket,
     64    ICustomStudentBase)
    6265from waeup.aaue.interswitch.browser import gateway_net_amt
    6366from waeup.aaue.interfaces import MessageFactory as _
     67
     68class CustomStudentBaseDisplayFormPage(NigeriaStudentBaseDisplayFormPage):
     69    """ Page to display student base data
     70    """
     71    form_fields = grok.AutoFields(ICustomStudentBase).omit(
     72        'password', 'suspended', 'suspended_comment', 'flash_notice')
     73    form_fields[
     74        'financial_clearance_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     75
     76class CustomStudentBaseManageFormPage(NigeriaStudentBaseManageFormPage):
     77    """ View to manage student base data
     78    """
     79    form_fields = grok.AutoFields(ICustomStudentBase).omit(
     80        'student_id', 'adm_code', 'suspended',
     81        'financially_cleared_by', 'financial_clearance_date')
    6482
    6583class CustomStudentPersonalDisplayFormPage(NigeriaStudentPersonalDisplayFormPage):
  • main/waeup.aaue/trunk/src/waeup/aaue/students/interfaces.py

    r13770 r13795  
    2222from zope.component import getUtility
    2323from waeup.kofa.interfaces import IKofaObject
    24 from waeup.kofa.students.vocabularies import StudyLevelSource
    25 from waeup.kofa.schema import PhoneNumber, FormattedDate
     24from waeup.kofa.students.vocabularies import (
     25    StudyLevelSource, contextual_reg_num_source
     26    )
     27from waeup.kofa.schema import PhoneNumber, FormattedDate, TextLineChoice
    2628from kofacustom.nigeria.interfaces import LGASource
    2729from kofacustom.nigeria.students.interfaces import (
     
    3941    """
    4042
     43    reg_number = TextLineChoice(
     44        title = _(u'JAMB Registration Number'),
     45        required = False,
     46        readonly = False,
     47        source = contextual_reg_num_source,
     48        )
     49
     50    application_number = schema.TextLine(
     51        title = _(u'Application Number'),
     52        required = False,
     53        readonly = False,
     54        )
     55
     56ICustomStudentBase['reg_number'].order = INigeriaStudentBase[
     57    'reg_number'].order
     58
     59ICustomStudentBase['application_number'].order = ICustomStudentBase[
     60    'reg_number'].order
     61
     62
    4163class ICustomStudentPersonal(INigeriaStudentPersonal):
    4264    """Student personal data.
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_export.py

    r13770 r13795  
    4848        result = open(self.outfile, 'rb').read()
    4949        self.assertMatches(
    50             'adm_code,alr_date,alr_fname,alr_no,alr_results,clr_code,'
     50            'adm_code,alr_date,alr_fname,alr_no,alr_results,'
     51            'application_number,clr_code,'
    5152            'date_of_birth,def_adm,disabled,email,emp2_end,emp2_position,'
    5253            'emp2_reason,emp2_start,emp_end,emp_position,emp_reason,'
     
    6869            'state,history,certcode,is_postgrad,current_level,current_session'
    6970            '\r\n'
    70             'my adm code,,,,"[(\'printing_craft_practice\', \'A1\')]",'
     71            'my adm code,,,,"[(\'printing_craft_practice\', \'A1\')]",,'
    7172            'my clr code,1981-02-04#,,,anna@sample.com,,,,,,,,,,,,,,,,,Anna,,,,,,'
    7273            '"[(\'printing_craft_practice\', \'A1\')]",,,,,,,,,,,,,,,,Tester,,,'
Note: See TracChangeset for help on using the changeset viewer.