Ignore:
Timestamp:
1 Jul 2012, 17:56:14 (12 years ago)
Author:
Henrik Bettermann
Message:

Merged with waeup.uniben 8864:HEAD.

Location:
main/waeup.futminna/trunk/src/waeup/futminna
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.futminna/trunk/src/waeup/futminna

  • main/waeup.futminna/trunk/src/waeup/futminna/students/interfaces.py

    r8833 r8869  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
     18
    1819from zope import schema
    19 from waeup.kofa.schema import TextLineChoice
    20 from waeup.kofa.interfaces import SimpleKofaVocabulary, academic_sessions_vocab
    21 from waeup.kofa.schema import FormattedDate
    22 from waeup.kofa.schoolgrades import ResultEntryField
    23 from waeup.kofa.students.vocabularies import nats_vocab
    24 from waeup.kofa.students.interfaces import (
    25     IStudentBase, IUGStudentClearance, IPGStudentClearance,
    26     IStudentPersonal, IStudentNavigation, IStudentStudyLevel,
    27     IStudentStudyCourse, ICourseTicket
     20from kofacustom.nigeria.students.interfaces import (
     21    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
     22    INigeriaStudentPersonal, INigeriaStudentStudyLevel,
     23    INigeriaStudentStudyCourse, INigeriaCourseTicket,
     24    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
    2825    )
    29 from waeup.kofa.students.vocabularies import (
    30     nats_vocab, contextual_reg_num_source)
    31 from kofacustom.nigeria.interfaces import (
    32     high_qual, high_grade, exam_types, LGASource)
     26from waeup.futminna.payments.interfaces import ICustomOnlinePayment
    3327from waeup.futminna.interfaces import MessageFactory as _
    34 from waeup.futminna.payments.interfaces import ICustomOnlinePayment
    3528
    36 
    37 class ICustomStudentBase(IStudentBase):
     29class ICustomStudentBase(INigeriaStudentBase):
    3830    """Representation of student base data.
    3931
    4032    """
    4133
    42     reg_number = TextLineChoice(
    43         title = _(u'Registration Number'),
    44         required = False,
    45         readonly = False,
    46         source = contextual_reg_num_source,
    47         )
    48 
    49 class ICustomStudentPersonal(IStudentPersonal):
     34class ICustomStudentPersonal(INigeriaStudentPersonal):
    5035    """Student personal data.
    5136
    5237    """
    5338
    54     marit_stat = schema.Choice(
    55         title = u'Maritual Status',
    56         default = 'unmarried',
    57         required = False,
    58         vocabulary = SimpleKofaVocabulary(
    59             (_('Unmarried'), 'unmarried'),
    60             (_('Married'), 'married'),)
    61         )
    62 
    63 class ICustomUGStudentClearance(IUGStudentClearance):
     39class ICustomUGStudentClearance(INigeriaUGStudentClearance):
    6440    """Representation of ug student clearance data.
    6541
    6642    """
    67     date_of_birth = FormattedDate(
    68         title = _(u'Date of Birth'),
    69         required = False,
    70         show_year = True,
    71         )
    7243
    73     nationality = schema.Choice(
    74         source = nats_vocab,
    75         title = _(u'Nationality'),
    76         required = False,
    77         )
    78 
    79     lga = schema.Choice(
    80         source = LGASource(),
    81         title = _(u'State/LGA (Nigerians only)'),
    82         required = False,
    83         )
    84 
    85     def_adm = schema.Bool(
    86         title = _(u'Deferent of Admission'),
    87         required = False,
    88         readonly = False,
    89         )
    90 
    91     fst_sit_fname = schema.TextLine(
    92         title = _(u'Full Name'),
    93         required = False,
    94         readonly = False,
    95         )
    96     fst_sit_no = schema.TextLine(
    97         title = _(u'Exam Number'),
    98         required = False,
    99         readonly = False,
    100         )
    101 
    102     fst_sit_date = FormattedDate(
    103         title = _(u'Exam Date'),
    104         required = False,
    105         readonly = False,
    106         show_year = True,
    107         )
    108 
    109     fst_sit_type = schema.Choice(
    110         title = _(u'Exam Type'),
    111         required = False,
    112         readonly = False,
    113         vocabulary = exam_types,
    114         )
    115 
    116     fst_sit_results = schema.List(
    117         title = _(u'Exam Results'),
    118         value_type = ResultEntryField(),
    119         required = False,
    120         readonly = False,
    121         default = [],
    122         )
    123 
    124     scd_sit_fname = schema.TextLine(
    125         title = _(u'Full Name'),
    126         required = False,
    127         readonly = False,
    128         )
    129     scd_sit_no = schema.TextLine(
    130         title = _(u'Exam Number'),
    131         required = False,
    132         readonly = False,
    133         )
    134 
    135     scd_sit_date = FormattedDate(
    136         title = _(u'Exam Date'),
    137         required = False,
    138         readonly = False,
    139         show_year = True,
    140         )
    141 
    142     scd_sit_type = schema.Choice(
    143         title = _(u'Exam Type'),
    144         required = False,
    145         readonly = False,
    146         vocabulary = exam_types,
    147         )
    148 
    149     scd_sit_results = schema.List(
    150         title = _(u'Exam Results'),
    151         value_type = ResultEntryField(),
    152         required = False,
    153         readonly = False,
    154         default = [],
    155         )
    156 
    157     alr_fname = schema.TextLine(
    158         title = _(u'Full Name'),
    159         required = False,
    160         readonly = False,
    161         )
    162     alr_no = schema.TextLine(
    163         title = _(u'Exam Number'),
    164         required = False,
    165         readonly = False,
    166         )
    167 
    168     alr_date = FormattedDate(
    169         title = _(u'Exam Date'),
    170         required = False,
    171         readonly = False,
    172         show_year = True,
    173         )
    174 
    175     alr_results = schema.List(
    176         title = _(u'Exam Results'),
    177         value_type = ResultEntryField(),
    178         required = False,
    179         readonly = False,
    180         default = [],
    181         )
    182 
    183     hq_type = schema.Choice(
    184         title = _(u'Qualification Obtained'),
    185         required = False,
    186         readonly = False,
    187         vocabulary = high_qual,
    188         )
    189 
    190     hq_matric_no = schema.TextLine(
    191         title = _(u'Former Matric Number'),
    192         required = False,
    193         readonly = False,
    194         )
    195 
    196     hq_degree = schema.Choice(
    197         title = _(u'Class of Degree'),
    198         required = False,
    199         readonly = False,
    200         vocabulary = high_grade,
    201         )
    202 
    203     hq_school = schema.TextLine(
    204         title = _(u'Institution Attended'),
    205         required = False,
    206         readonly = False,
    207         )
    208 
    209     hq_session = schema.TextLine(
    210         title = _(u'Years Attended'),
    211         required = False,
    212         readonly = False,
    213         )
    214 
    215     hq_disc = schema.TextLine(
    216         title = _(u'Discipline'),
    217         required = False,
    218         readonly = False,
    219         )
    220 
    221 
    222 class ICustomPGStudentClearance(ICustomUGStudentClearance):
     44class ICustomPGStudentClearance(INigeriaPGStudentClearance):
    22345    """Representation of pg student clearance data.
    22446
    22547    """
    226 
    227     hq2_type = schema.Choice(
    228         title = _(u'Qualification Obtained'),
    229         required = False,
    230         readonly = False,
    231         vocabulary = high_qual,
    232         )
    233 
    234     hq2_matric_no = schema.TextLine(
    235         title = _(u'Former Matric Number'),
    236         required = False,
    237         readonly = False,
    238         )
    239 
    240     hq2_degree = schema.Choice(
    241         title = _(u'Class of Degree'),
    242         required = False,
    243         readonly = False,
    244         vocabulary = high_grade,
    245         )
    246 
    247     hq2_school = schema.TextLine(
    248         title = _(u'Institution Attended'),
    249         required = False,
    250         readonly = False,
    251         )
    252 
    253     hq2_session = schema.TextLine(
    254         title = _(u'Years Attended'),
    255         required = False,
    256         readonly = False,
    257         )
    258 
    259     hq2_disc = schema.TextLine(
    260         title = _(u'Discipline'),
    261         required = False,
    262         readonly = False,
    263         )
    264 
    265     nysc_year = schema.Int(
    266         title = _(u'Nysc Year'),
    267         required = False,
    268         readonly = False,
    269         )
    270 
    271     nysc_lga = schema.Choice(
    272         source = LGASource(),
    273         title = _(u'Nysc Location'),
    274         required = False,
    275         )
    276 
    277     employer = schema.TextLine(
    278         title = _(u'Employer'),
    279         required = False,
    280         readonly = False,
    281         )
    282 
    283     emp_position = schema.TextLine(
    284         title = _(u'Employer Position'),
    285         required = False,
    286         readonly = False,
    287         )
    288 
    289     emp_start = FormattedDate(
    290         title = _(u'Start Date'),
    291         required = False,
    292         readonly = False,
    293         show_year = True,
    294         )
    295 
    296     emp_end = FormattedDate(
    297         title = _(u'End Date'),
    298         required = False,
    299         readonly = False,
    300         show_year = True,
    301         )
    302 
    303     emp_reason = schema.TextLine(
    304         title = _(u'Reason for Leaving'),
    305         required = False,
    306         readonly = False,
    307         )
    308 
    309     employer2 = schema.TextLine(
    310         title = _(u'2nd Employer'),
    311         required = False,
    312         readonly = False,
    313         )
    314 
    315     emp2_position = schema.TextLine(
    316         title = _(u'2nd Employer Position'),
    317         required = False,
    318         readonly = False,
    319         )
    320 
    321     emp2_start = FormattedDate(
    322         title = _(u'Start Date'),
    323         required = False,
    324         readonly = False,
    325         show_year = True,
    326         )
    327     emp2_end = FormattedDate(
    328         title = _(u'End Date'),
    329         required = False,
    330         readonly = False,
    331         show_year = True,
    332         )
    333 
    334     emp2_reason = schema.TextLine(
    335         title = _(u'Reason for Leaving'),
    336         required = False,
    337         readonly = False,
    338         )
    339 
    340     former_matric = schema.TextLine(
    341         title = _(u'If yes, matric number'),
    342         required = False,
    343         readonly = False,
    344         )
    34548
    34649
     
    35154    """
    35255
    353 class ICustomStudentStudyCourse(IStudentStudyCourse):
     56class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
    35457    """A container for student study levels.
    35558
    35659    """
    35760
    358 class ICustomStudentStudyLevel(IStudentStudyLevel):
     61class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
    35962    """A container for course tickets.
    36063
     
    37780    'p_session'].order
    37881
    379 class ICustomCourseTicket(ICourseTicket):
     82class ICustomCourseTicket(INigeriaCourseTicket):
    38083    """A course ticket.
    38184
    38285    """
    38386
    384 class ICustomStudentUpdateByRegNo(ICustomStudent):
     87class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
    38588    """Representation of a student. Skip regular reg_number validation.
    38689
    38790    """
    388     reg_number = schema.TextLine(
    389         title = _(u'Registration Number'),
    390         required = False,
    391         )
    39291
    393 class ICustomStudentUpdateByMatricNo(ICustomStudent):
     92class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
    39493    """Representation of a student. Skip regular matric_number validation.
    39594
    39695    """
    397     matric_number = schema.TextLine(
    398         title = _(u'Matriculation Number'),
    399         required = False,
    400         )
  • main/waeup.futminna/trunk/src/waeup/futminna/students/student.py

    r8619 r8869  
    2323from waeup.kofa.utils.helpers import attrs_to_fields
    2424from waeup.kofa.students.student import Student, StudentFactory
    25 from waeup.futminna.students.interfaces import ICustomStudent, IStudentNavigation
     25from waeup.kofa.students.interfaces import IStudentNavigation
     26from waeup.futminna.students.interfaces import ICustomStudent
    2627
    2728
  • main/waeup.futminna/trunk/src/waeup/futminna/students/studycourse.py

    r8744 r8869  
    2525    StudentStudyCourse, StudentStudyCourseFactory)
    2626from waeup.kofa.utils.helpers import attrs_to_fields
     27from waeup.kofa.students.interfaces import IStudentNavigation
    2728from waeup.kofa.students.workflow import CLEARED, RETURNING, PAID
    28 from waeup.futminna.students.interfaces import (
    29     ICustomStudentStudyCourse, IStudentNavigation)
     29from waeup.futminna.students.interfaces import ICustomStudentStudyCourse
    3030
    3131class CustomStudentStudyCourse(StudentStudyCourse):
  • main/waeup.futminna/trunk/src/waeup/futminna/students/studylevel.py

    r8619 r8869  
    2727    StudentStudyLevel, CourseTicket,
    2828    CourseTicketFactory, StudentStudyLevelFactory)
     29from waeup.kofa.students.interfaces import IStudentNavigation
    2930from waeup.futminna.students.interfaces import (
    30     ICustomStudentStudyLevel, IStudentNavigation, ICustomCourseTicket)
     31    ICustomStudentStudyLevel, ICustomCourseTicket)
    3132
    3233
Note: See TracChangeset for help on using the changeset viewer.