Changeset 11535 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 25 Mar 2014, 06:50:08 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r11254 r11535 503 503 prefix = 'form' 504 504 505 omit_fields = ('date_of_birth', )505 omit_fields = ('date_of_birth', 'current_level') 506 506 507 507 form_fields = grok.AutoFields(IStudentBase).select('student_id', 'reg_number') … … 677 677 'suspended', 'phone', 678 678 'adm_code', 'suspended_comment', 679 'date_of_birth' )679 'date_of_birth', 'current_level') 680 680 681 681 @property … … 1216 1216 'department', 'faculty', 'current_mode', 'entry_session', 'certificate', 1217 1217 'password', 'suspended', 'phone', 'email', 1218 'adm_code', 'suspended_comment' )1218 'adm_code', 'suspended_comment', 'current_level') 1219 1219 1220 1220 def update(self): … … 1366 1366 omit_fields = ( 1367 1367 'password', 'suspended', 'phone', 'date_of_birth', 1368 'adm_code', 'sex', 'suspended_comment' )1368 'adm_code', 'sex', 'suspended_comment', 'current_level') 1369 1369 1370 1370 @property … … 1895 1895 omit_fields = ( 1896 1896 'password', 'suspended', 'phone', 'date_of_birth', 1897 'adm_code', 'sex', 'suspended_comment' )1897 'adm_code', 'sex', 'suspended_comment', 'current_level') 1898 1898 1899 1899 @property … … 2142 2142 omit_fields = ( 2143 2143 'password', 'suspended', 'phone', 'adm_code', 2144 'suspended_comment', 'date_of_birth' )2144 'suspended_comment', 'date_of_birth', 'current_level') 2145 2145 2146 2146 @property -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r11451 r11535 3441 3441 'automatic,carry_over,code,credits,dcode,fcode,level,' 3442 3442 'level_session,mandatory,passmark,score,semester,title,' 3443 'student_id,certcode\r\n1,0,COURSE1,10,dep1,fac1,100,2004,1,40,,1,' 3444 'Unnamed Course,K1000000,CERT1\r\n') 3443 'student_id,certcode,display_fullname\r\n1,0,COURSE1,10,' 3444 'dep1,fac1,100,2004,1,40,,1,' 3445 'Unnamed Course,K1000000,CERT1,Anna Tester\r\n') 3445 3446 3446 3447 self.assertEqual(len(self.app['datacenter'].running_exports), 1) -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r11452 r11535 35 35 from waeup.kofa.students.interfaces import IStudentsUtils 36 36 from waeup.kofa.students.workflow import ADMITTED 37 from waeup.kofa.students.vocabularies import StudyLevelSource 37 38 from waeup.kofa.browser.pdf import ( 38 39 ENTRY1_STYLE, format_html, NOTE_STYLE, HEADING_STYLE, … … 166 167 if not 'current_mode' in omit_fields: 167 168 studymodes_dict = getUtility(IKofaUtils).STUDY_MODES_DICT 168 sm = studymodes_dict[studentview.context[ 169 'studycourse'].certificate.study_mode] 169 sm = studymodes_dict[studentview.context.current_mode] 170 170 f_label = trans(_('Study Mode:'), lang) 171 171 f_label = Paragraph(f_label, ENTRY1_STYLE) … … 176 176 f_label = trans(_('Entry Session:'), lang) 177 177 f_label = Paragraph(f_label, ENTRY1_STYLE) 178 entry_session = studentview.context ['studycourse'].entry_session178 entry_session = studentview.context.entry_session 179 179 entry_session = academic_sessions_vocab.getTerm(entry_session).title 180 180 f_text = formatted_text(entry_session) 181 f_text = Paragraph(f_text, ENTRY1_STYLE) 182 data_right.append([f_label,f_text]) 183 # Requested by Uniben, does not really make sense 184 if not 'current_level' in omit_fields: 185 f_label = trans(_('Current Level:'), lang) 186 f_label = Paragraph(f_label, ENTRY1_STYLE) 187 current_level = studentview.context['studycourse'].current_level 188 studylevelsource = StudyLevelSource().factory 189 current_level = studylevelsource.getTitle( 190 studentview.context, current_level) 191 f_text = formatted_text(current_level) 181 192 f_text = Paragraph(f_text, ENTRY1_STYLE) 182 193 data_right.append([f_label,f_text])
Note: See TracChangeset for help on using the changeset viewer.