Changeset 3561


Ignore:
Timestamp:
4 Jul 2008, 20:25:05 (16 years ago)
Author:
hraban
Message:

IStudent now contains all fields from CSV sample data; some fields should become Choice fields (foreign key)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/hraban/src/waeup/students/interfaces.py

    r3558 r3561  
    88    """Representation of a student.
    99    """
     10    entry_mode = schema.ASCIILine( # Choice?
     11        title = u'Entry Mode',
     12        default = u'',
     13        required = False,
     14        )
     15    end_level = schema.Int(
     16        title = u'End Level',
     17        default = 400,
     18        missing_value = 0,
     19        required = True,
     20        min=0,
     21        max=600
     22        )
    1023    name = schema.TextLine(
    1124        title = u'Name of student',
     
    1326        required = True,
    1427        )
    15 
     28    jamb_reg_no = schema.ASCIILine(
     29        title = u'JAMB Reg. No.',
     30        default = u'',
     31        required = False,
     32        )
     33    level = schema.Int(
     34        title = u'Level',
     35        default = 0,
     36        mssing_value = 0,
     37        required = False,
     38        min = 0,
     39        max = 600
     40        )
     41    id = schema.ASCIILine(
     42        title = u'Student ID',
     43        default = u'',
     44        required = False,
     45        constraint=(re.compile("^[A-Z]\d{6}$").match)
     46        )
     47    lga = schema.TextLine(
     48        title = u'LGA', # Bundesstaat/Bezirk
     49        default = u'',
     50        required = False,
     51        description = u'federal state / county'
     52        )
     53    entry_session = schema.Int(
     54        title = u'Entry Session',
     55        default = -1,
     56        missingg_value = 0,
     57        required = False,
     58        min=-1,
     59        max=7
     60        )
     61    matric_no = schema.ASCIILine(
     62        title = u'Matric No.',
     63        default = u'',
     64        required = False,
     65        constraint=re.compile("^[A-Z]{3}\d{7}$").match
     66        )
     67    sex = schema.ASCIILine( # Choice!
     68        title = u'Sex',
     69        default = u'M',
     70        required = True,
     71        constraint=(re.compile("^[MF]$").match)
     72        )
     73    phone = schema.TextLine(
     74        title = u'Phone',
     75        default = u'',
     76        required = False,
     77        constraint=re.compile("^[\d-,]{5,}$").match,
     78        description = u'if multiple, separate with comma'
     79        )
     80    session = schema.ASCIILine(
     81        title = u'Session',
     82        default = 1,
     83        required = False,
     84        constraint=(re.compile("^\d$").match)
     85        )
     86    course = schema.ASCIILine( # Choice
     87        title = u'Course',
     88        default = u'',
     89        required = False,
     90        constraint=(re.compile("^[A-Z]{3,8}$").match)
     91        )
     92    mode = schema.ASCIILine( # Choice?
     93        title = u'Mode',
     94        default = u'',
     95        required = False,
     96        )
     97    faculty = schema.ASCIILine( # Choice
     98        title = u'Faculty',
     99        default = u'',
     100        required = False,
     101        constraint=(re.compile("^[A-Z]{3}$").match)
     102        )
     103    department = schema.ASCIILine( # Choice
     104        title = u'Department',
     105        default = u'',
     106        required = False,
     107        constraint=(re.compile("^[A-Z]{3}$").match)
     108        )
     109    verdict = schema.ASCIILine(
     110        title = u'Verdict',
     111        default = u'',
     112        required = False,
     113        )
     114    review_state = schema.ASCIILine( # Choice
     115        title = u'Review State',
     116        default = u'student_created',
     117        required = True,
     118        )
     119    perm_address = schema.Text(
     120        title = u'Permanent Address',
     121        default = u'',
     122        required = True,
     123        )
     124    email = schema.TextLine(
     125        title = u'Email',
     126        default = u'',
     127        required = True,
     128        constraint=(re.compile("^[\w\.]+@(\w+\.)+\w{2,}$").match)
     129        )
Note: See TracChangeset for help on using the changeset viewer.