Ignore:
Timestamp:
12 Sep 2011, 16:59:04 (13 years ago)
Author:
Henrik Bettermann
Message:

Add more fields to IStudentStudyCourse and corresponding vocabs (work in progress) + some other minor changes.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py

    r6704 r6724  
    44from zope import schema
    55from waeup.sirp.interfaces import IWAeUPObject
     6from waeup.sirp.university.vocabularies import study_modes
    67from waeup.sirp.students.vocabularies import (
    78  year_range, lgas_vocab, CertificateSource, GenderSource,
     9  entry_session_vocab, study_levels, verdicts,
    810  )
    911
     
    126128        )
    127129
     130    current_session = schema.Choice(
     131        title = u'Current Session',
     132        source = entry_session_vocab,
     133        default = None,
     134        required = True,
     135        )
     136
     137    current_level = schema.Choice(
     138        title = u'Current Level',
     139        source = study_levels,
     140        default = None,
     141        required = True,
     142        )
     143
     144    current_verdict = schema.Choice(
     145        title = u'Current Verdict',
     146        source = verdicts,
     147        default = None,
     148        required = True,
     149        )
     150
     151    previous_verdict = schema.Choice(
     152        title = u'Previous Verdict',
     153        source = verdicts,
     154        default = None,
     155        required = True,
     156        )
     157
    128158class IStudentAccommodation(IWAeUPObject):
    129159    """A container for student accommodation objects.
  • main/waeup.sirp/trunk/src/waeup/sirp/students/vocabularies.py

    r6648 r6724  
    1515def entry_sessions():
    1616    curr_year = datetime.now().year
    17     year_range = range(curr_year - 5, curr_year + 2)
     17    year_range = range(curr_year - 10, curr_year + 2)
    1818    return [('%s/%s' % (year,year+1), '%s' % year) for year in year_range]
    1919
     
    2222lgas_vocab = SimpleWAeUPVocabulary(
    2323    *sorted([(x[1],x[0]) for x in LGAS]))
     24
     25# This will become a source with probation and
     26# splill-over levels too
     27study_levels = SimpleWAeUPVocabulary(
     28    ('Pre-Studies',0),
     29    ('100 (Year 1)',100),
     30    ('200 (Year 2)',200),
     31    ('300 (Year 3)',300),
     32    ('400 (Year 4)',400),
     33    ('500 (Year 5)',500),
     34    ('600 (Year 6)',600),
     35    ('700 (Year 7)',700),
     36    ('800 (Year 8)',800),
     37    )
     38
     39verdicts = SimpleWAeUPVocabulary(
     40    ('Successful student','A'),
     41    ('Student with carryover courses','B'),
     42    ('Student on probation','C'),
     43    ('Student who were previously on probation','E'),
     44    ('Medical case','F'),
     45    ('Absent from examination','G'),
     46    ('Withheld results','H'),
     47    ('Expelled/rusticated/suspended student','I'),
     48    ('Temporary withdrawn from the university','J'),
     49    ('Unregistered student','K'),
     50    ('Referred student','L'),
     51    ('Reinstatement','M'),
     52    ('Student on transfer','N'),
     53    ('NCE-III repeater','O'),
     54    ('New 300 level student','X'),
     55    ('No previous verdict','Y'),
     56    ('Successful student (provisional)','Z'),
     57    ('First Class','A1'),
     58    ('Second Class Upper','A2'),
     59    ('Second Class Lower','A3'),
     60    ('Third Class','A4'),
     61    ('Pass','A5'),
     62    ('Distinction','A6'),
     63    ('Credit','A7'),
     64    ('Merit','A8'),
     65    )
     66
    2467
    2568class CertificateSource(BasicContextualSourceFactory):
Note: See TracChangeset for help on using the changeset viewer.