Changeset 8311 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 29 Apr 2012, 19:47:24 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
r8286 r8311 32 32 IObjectHistory, IFileStoreHandler, IFileStoreNameChooser, IKofaUtils, 33 33 IExtFileStore, IPDF, IUserAccount) 34 from waeup.kofa.interfaces import MessageFactory as _ 34 35 from waeup.kofa.students.vocabularies import RegNumNotInSource 35 36 from waeup.kofa.utils.helpers import attrs_to_fields … … 80 81 81 82 def createStudent(self, view=None): 82 """Create a student, fill with base data, create a StudentApplication83 objectand copy applicant data.83 """Create a student, fill with base data, create an application slip 84 and copy applicant data. 84 85 """ 85 86 # Is applicant in the correct state? 86 87 if self.state != 'admitted': 87 return False, "Applicant has not yet been admitted."88 return False, _('Applicant has not yet been admitted.') 88 89 # Does registration number exist? 89 90 student = createObject(u'waeup.Student') … … 91 92 student.reg_number = self.reg_number 92 93 except RegNumNotInSource: 93 return False, 'Registration Number exists.'94 return False, _('Registration Number exists.') 94 95 # Has the course_admitted field been properly filled? 95 96 if self.course_admitted is None: 96 return False, 'No course admitted provided.'97 return False, _('No course admitted provided.') 97 98 # Add student object 98 99 student.firstname = self.firstname … … 114 115 student['studycourse'].entry_session = self.__parent__.year 115 116 student['studycourse'].current_session = self.__parent__.year 116 student['studycourse'].current_level = self. __parent__.entry_level117 student['studycourse'].current_level = self.course_admitted.start_level 117 118 self._copyPassportImage(student) 118 119 # Update the catalog … … 122 123 self._createApplicationPDF(student, view=view) 123 124 124 return True, 'Student %s created'% student.student_id125 return True, _('Student %s created') % student.student_id 125 126 126 127 def _createApplicationPDF(self, student, view=None): -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py
r8057 r8311 33 33 34 34 #: Fieldnames considered by this exporter 35 fields = ('code', 'title', 'prefix', ' entry_level', 'year',35 fields = ('code', 'title', 'prefix', 'year', 36 36 'application_category', 'description', 37 37 'startdate', 'enddate', 'strict_deadline') -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r8286 r8311 188 188 ) 189 189 190 entry_level = schema.Choice(191 title = _(u'Entry Level'),192 vocabulary = course_levels,193 required = True,194 )195 196 190 # Maybe Uniben still needs this ... 197 191 #ac_prefix = schema.Choice( -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py
r8291 r8311 153 153 self.assertEqual(container.title, u'General Studies 2012/2013') 154 154 self.assertEqual(container.prefix, u'app') 155 self.assertEqual(container.entry_level, 100)156 155 self.assertEqual(container.year, 2012) 157 156 self.assertEqual(container.application_category, 'basic') -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r8286 r8311 86 86 applicantscontainer.prefix = 'app' 87 87 applicantscontainer.year = 2009 88 applicantscontainer.entry_level = 10089 88 applicantscontainer.application_category = 'basic' 90 89 applicantscontainer.mode = 'create' … … 251 250 self.browser.getControl(name="form.prefix").value = ['app'] 252 251 self.browser.getControl(name="form.year").value = ['2010'] 253 self.browser.getControl(name="form.entry_level").value = ['100']254 252 self.browser.getControl(name="form.mode").value = ['create'] 255 253 self.browser.getControl( … … 266 264 self.browser.getControl(name="form.prefix").value = ['app'] 267 265 self.browser.getControl(name="form.year").value = ['2010'] 268 self.browser.getControl(name="form.entry_level").value = ['100']269 266 self.browser.getControl(name="form.mode").value = ['create'] 270 267 self.browser.getControl( … … 281 278 self.browser.getControl(name="form.prefix").value = ['app'] 282 279 self.browser.getControl(name="form.year").value = ['2010'] 283 self.browser.getControl(name="form.entry_level").value = ['100']284 280 self.browser.getControl(name="form.mode").value = ['create'] 285 281 #self.browser.getControl(name="form.ac_prefix").value = ['APP'] -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py
r8286 r8311 53 53 container.prefix = list(ApplicationTypeSource()(container))[0] 54 54 container.year = 2012 55 container.entry_level = 10056 55 container.application_category = list(AppCatSource()(container))[0] 57 56 container.description = u'Some Description\nwith linebreak\n' … … 72 71 self.assertEqual( 73 72 result, 74 'code,title,prefix, entry_level,year,application_category,'73 'code,title,prefix,year,application_category,' 75 74 'description,startdate,enddate,strict_deadline\r\n' 76 75 77 'dp2012,General Studies 2012/13,app, 100,2012,basic,'76 'dp2012,General Studies 2012/13,app,2012,basic,' 78 77 '"Some Description\nwith linebreak\n<<de>>man spriht deutsh",' 79 78 '2012-01-01 12:00:00+00:00,2012-01-31 23:00:00+00:00,1\r\n'
Note: See TracChangeset for help on using the changeset viewer.