Changeset 5986 for main/waeup.sirp/trunk/src
- Timestamp:
- 26 Apr 2011, 20:08:25 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt
r5978 r5986 286 286 >>> open('certificates.csv', 'wb').write( 287 287 ... """code,faculty_code,department_code,title,study_mode,start_level,end_level,application_category 288 ... CERT1,FAC1,DEP1,Certificate 1,u f_ft,100,300,basic289 ... CERT2,FAC1,DEP1,Certificate 2,u f_ft,200,300,cest288 ... CERT1,FAC1,DEP1,Certificate 1,ug_ft,100,300,basic 289 ... CERT2,FAC1,DEP1,Certificate 2,ug_ft,200,300,cest 290 290 ... """) 291 291 -
main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt
r5978 r5986 484 484 Set the remaining required fields: 485 485 486 >>> browser.getControl(name='form.study_mode').value = 'combined'486 >>> browser.getControl(name='form.study_mode').value = ['ume_ft'] 487 487 >>> browser.getControl(name='form.start_level').value = ['100'] 488 488 >>> browser.getControl(name='form.end_level').value = ['400'] 489 >>> browser.getControl(name='form.application_category').value = 'UME'489 >>> browser.getControl(name='form.application_category').value = ['basic'] 490 490 491 491 Finally, we create the certificate: … … 500 500 >>> ctrl.value = 'Another cert with same code' 501 501 >>> browser.getControl(name='form.code').value = 'CERT1' 502 >>> browser.getControl(name='form.study_mode').value = 'combined'502 >>> browser.getControl(name='form.study_mode').value = ['ume_ft'] 503 503 >>> browser.getControl(name='form.start_level').value = ['100'] 504 504 >>> browser.getControl(name='form.end_level').value = ['400'] 505 >>> browser.getControl(name='form.application_category').value = 'UME'505 >>> browser.getControl(name='form.application_category').value = ['basic'] 506 506 507 507 >>> browser.getControl('Add certificate').click() … … 620 620 >>> browser.getControl(name='form.code').value = 'CERT1' 621 621 >>> browser.getControl(name='form.title').value = 'Certificate 1' 622 >>> browser.getControl(name='form.study_mode').value = 'combined'622 >>> browser.getControl(name='form.study_mode').value = ['ume_ft'] 623 623 >>> browser.getControl(name='form.start_level').value = ['100'] 624 624 >>> browser.getControl(name='form.end_level').value = ['400'] 625 >>> browser.getControl(name='form.application_category').value = 'UME'625 >>> browser.getControl(name='form.application_category').value = ['basic'] 626 626 >>> browser.getControl('Add certificate').click() 627 627 … … 631 631 >>> browser.getControl(name='form.code').value = 'CERT2' 632 632 >>> browser.getControl(name='form.title').value = 'Certificate 2' 633 >>> browser.getControl(name='form.study_mode').value = 'combined'633 >>> browser.getControl(name='form.study_mode').value = ['ume_ft'] 634 634 >>> browser.getControl(name='form.start_level').value = ['100'] 635 635 >>> browser.getControl(name='form.end_level').value = ['400'] 636 >>> browser.getControl(name='form.application_category').value = 'UME'636 >>> browser.getControl(name='form.application_category').value = ['basic'] 637 637 >>> browser.getControl('Add certificate').click() 638 638 -
main/waeup.sirp/trunk/src/waeup/sirp/university/interfaces.py
r5977 r5986 6 6 7 7 from waeup.sirp.university.vocabularies import (course_levels, 8 semester, CourseSource) 8 semester, 9 application_category, 10 study_mode, 11 CourseSource) 9 12 10 13 class IFaculty(IWAeUPContainer): … … 172 175 ) 173 176 174 study_mode = schema. TextLine(177 study_mode = schema.Choice( 175 178 title = u'Study Mode', 179 vocabulary = study_mode, 176 180 default = u'ug_ft', 177 181 required = True, … … 194 198 ) 195 199 196 application_category = schema. TextLine(200 application_category = schema.Choice( 197 201 title = u'Application Category', 202 vocabulary = application_category, 198 203 default = u'basic', 199 required = False,204 required = True, 200 205 ) 201 206 -
main/waeup.sirp/trunk/src/waeup/sirp/university/vocabularies.py
r5977 r5986 1 """Vocabularies and sources for the academics section. 2 """ 3 1 4 from waeup.sirp.interfaces import SimpleWAeUPVocabulary 2 5 from zc.sourcefactory.basic import BasicSourceFactory … … 9 12 10 13 course_levels = SimpleWAeUPVocabulary( 11 (' Year 1 (100)',100),12 (' Year 2 (200)',200),13 (' Year 3 (300)',300),14 (' Year 4 (400)',400),15 (' Year 5 (500)',500),16 (' Year 6 (600)',600),17 (' Year 7 (700)',700),18 (' Year 8 (800)',800),14 ('100 (Year 1)',100), 15 ('200 (Year 2)',200), 16 ('300 (Year 3)',300), 17 ('400 (Year 4)',400), 18 ('500 (Year 5)',500), 19 ('600 (Year 6)',600), 20 ('700 (Year 7)',700), 21 ('800 (Year 8)',800), 19 22 ) 20 23 21 24 semester = SimpleWAeUPVocabulary( 22 ('N/A', 0), ('First Semester', 1), 23 ('Second Semester', 2), ('Combined', 3)) 24 25 ('N/A', 0), 26 ('First Semester', 1), 27 ('Second Semester', 2), 28 ('Combined', 3) 29 ) 30 31 application_category = SimpleWAeUPVocabulary( 32 ('--',''), 33 ('PUME, PDE, PCE, PRENCE','basic'), 34 ('Part-Time, Diploma, Certificate','cest'), 35 ('Sandwich','sandwich'), 36 ('Postgraduate','pg'), 37 ) 38 39 study_mode = SimpleWAeUPVocabulary( 40 ('UME Full Time','ume_ft'), 41 ('Direct Entry Full Time','de_ft'), 42 ('Diploma Full Time','dp_ft'), 43 ('Diploma Part Time','dp_pt'), 44 ('Undergraduate Full Time','ug_ft'), 45 ('Undergraduate Part Time','ug_pt'), 46 ('Postgraduate Full Time','pg_ft'), 47 ('Postgraduate Part Time','pg_pt'), 48 ) 49 50 25 51 class CourseSource(BasicSourceFactory): 26 52 """A course source delivers all courses inside the portal by looking
Note: See TracChangeset for help on using the changeset viewer.