Changeset 7619 for main/waeup.sirp/trunk/src/waeup/sirp/students
- Timestamp:
- 9 Feb 2012, 16:22:05 (13 years ago)
- 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
r7554 r7619 24 24 from waeup.sirp.university.vocabularies import CourseSource, study_modes 25 25 from waeup.sirp.students.vocabularies import ( 26 CertificateSource, verdicts, StudyLevelSource,26 CertificateSource, VerdictSource, StudyLevelSource, 27 27 contextual_reg_num_source, contextual_mat_num_source, 28 28 GenderSource, nats_vocab, … … 257 257 ) 258 258 259 260 259 entry_mode = schema.Choice( 261 260 title = u'Entry Mode', … … 293 292 current_verdict = schema.Choice( 294 293 title = u'Current Verdict', 295 source = verdicts,294 source = VerdictSource(), 296 295 default = '0', 297 296 required = False, … … 300 299 previous_verdict = schema.Choice( 301 300 title = u'Previous Verdict', 302 source = verdicts,301 source = VerdictSource(), 303 302 default = '0', 304 303 required = False, … … 322 321 level_verdict = schema.Choice( 323 322 title = u'Verdict', 324 source = verdicts,323 source = VerdictSource(), 325 324 default = '0', 326 325 required = False, -
main/waeup.sirp/trunk/src/waeup/sirp/students/vocabularies.py
r7617 r7619 25 25 from zc.sourcefactory.basic import BasicSourceFactory 26 26 from zc.sourcefactory.contextual import BasicContextualSourceFactory 27 from waeup.sirp.interfaces import SimpleSIRPVocabulary 27 from waeup.sirp.interfaces import SimpleSIRPVocabulary, ISIRPUtils 28 28 from waeup.sirp.students.lgas import LGAS 29 29 from waeup.sirp.students.nats import NATS … … 86 86 return title 87 87 88 verdicts = SimpleSIRPVocabulary( 89 ('not yet','0'), 90 ('Successful student','A'), 91 ('Student with carryover courses','B'), 92 ('Student on probation','C'), 93 ('Withdrawn from the faculty','D'), 94 ('Student who were previously on probation','E'), 95 ('Medical case','F'), 96 ('Absent from examination','G'), 97 ('Withheld results','H'), 98 ('Expelled/rusticated/suspended student','I'), 99 ('Temporary withdrawn from the university','J'), 100 ('Unregistered student','K'), 101 ('Referred student','L'), 102 ('Reinstatement','M'), 103 ('Student on transfer','N'), 104 ('NCE-III repeater','O'), 105 ('New 300 level student','X'), 106 ('No previous verdict','Y'), 107 ('Successful student (provisional)','Z'), 108 ('First Class','A1'), 109 ('Second Class Upper','A2'), 110 ('Second Class Lower','A3'), 111 ('Third Class','A4'), 112 ('Pass','A5'), 113 ('Distinction','A6'), 114 ('Credit','A7'), 115 ('Merit','A8'), 116 ) 88 class VerdictSource(BasicContextualSourceFactory): 89 """A verdicts source delivers all verdicts provided 90 in the portal. 91 """ 117 92 93 def getValues(self, context): 94 self.verdicts_dict = getUtility(ISIRPUtils).getVerdictsDict() 95 return self.verdicts_dict.keys() 96 97 def getToken(self, context, value): 98 return value 99 100 def getTitle(self, context, value): 101 return self.verdicts_dict[value] 118 102 119 103 class CertificateSource(BasicContextualSourceFactory):
Note: See TracChangeset for help on using the changeset viewer.