Changeset 6915 for main/waeup.sirp/trunk/src/waeup/sirp/students
- Timestamp:
- 20 Oct 2011, 17:14:37 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py
r6896 r6915 4 4 from zope.interface.exceptions import Invalid 5 5 from zope import schema 6 from waeup.sirp.interfaces import IWAeUPObject 6 from waeup.sirp.interfaces import IWAeUPObject, academic_sessions_vocab 7 7 from waeup.sirp.schema import TextLineChoice 8 8 from waeup.sirp.university.vocabularies import CourseSource, study_modes -
main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
r6898 r6915 3 3 4 4 from random import SystemRandom as r 5 from waeup.sirp. students.vocabularies import academic_sessions_vocab5 from waeup.sirp.interfaces import academic_sessions_vocab 6 6 7 7 def generate_student_id(students,letter): -
main/waeup.sirp/trunk/src/waeup/sirp/students/vocabularies.py
r6804 r6915 1 1 """Vocabularies and sources for the student section. 2 2 """ 3 from datetime import datetime4 3 from zope.component import getUtility, queryUtility 5 4 from zope.catalog.interfaces import ICatalog … … 9 8 from zc.sourcefactory.basic import BasicSourceFactory 10 9 from zc.sourcefactory.contextual import BasicContextualSourceFactory 11 from waeup.sirp.interfaces import SimpleWAeUPVocabulary 10 from waeup.sirp.interfaces import SimpleWAeUPVocabulary, academic_sessions_vocab 12 11 from waeup.sirp.students.lgas import LGAS 13 12 from waeup.sirp.university.vocabularies import course_levels 14 15 16 17 def year_range():18 curr_year = datetime.now().year19 return range(curr_year - 2, curr_year + 5)20 21 def academic_sessions():22 curr_year = datetime.now().year23 year_range = range(curr_year - 10, curr_year + 2)24 return [('%s/%s' % (year,year+1), year) for year in year_range]25 26 academic_sessions_vocab = SimpleWAeUPVocabulary(*academic_sessions())27 13 28 14 lgas_vocab = SimpleWAeUPVocabulary(
Note: See TracChangeset for help on using the changeset viewer.