Changeset 17834 for main/waeup.uniben/trunk/src/waeup
- Timestamp:
- 8 Jul 2024, 15:48:12 (6 months ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r17828 r17834 1089 1089 form_fields = grok.AutoFields(INYSC) 1090 1090 form_fields['nysc_updated'].for_display = True 1091 form_fields['nysc_senate_info'].for_display = True1091 #form_fields['nysc_senate_info'].for_display = True 1092 1092 form_fields['nysc'].field.description = u'Ensure that all your school charges are paid up to date to your graduating session before making this nysc application.' 1093 1093 form_fields['nysc'].field.title = u'Do you want to apply for NYSC?' … … 1095 1095 'nysc_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le') 1096 1096 form_fields['nysc'].custom_widget = CustomBooleanRadioWidget 1097 form_fields['nysc_senate_info'].field.description = u'' 1097 form_fields['nysc_senate_info'].field.description = u'Sample: Meeting Date: 10TH MAY 2023. DEG CLASS: FIRST CLASS. S/NO: 01' 1098 #form_fields['nysc_senate_info'].field.description = u'' 1098 1099 return form_fields 1099 1100 -
main/waeup.uniben/trunk/src/waeup/uniben/students/export.py
r17831 r17834 194 194 'date_of_birth', 195 195 'state', 196 'lg_state', 197 'lg_area', 196 198 'current_mode', 197 199 'certcode', … … 217 219 students.append(student) 218 220 return students 221 222 def mangle_value(self, value, name, context=None): 223 if name == 'lg_state' and context.lga: 224 value = context.lga.split('_')[0] 225 if name == 'lg_area' and context.lga: 226 value = '-'.join(context.lga.split('_')[1:]) 227 return super( 228 NYSCExporter, self).mangle_value( 229 value, name, context=context) -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_export.py
r17827 r17834 178 178 self.setup_student(self.student) 179 179 self.student.nysc = True 180 self.student.lga = u'xyz_abc' 180 181 exporter = NYSCExporter() 181 182 exporter.export_all(self.app, self.outfile) … … 183 184 self.assertMatches( 184 185 'student_id,matric_number,reg_number,firstname,middlename,lastname,' 185 'sex,nationality,date_of_birth,state, current_mode,certcode,faccode,'186 'sex,nationality,date_of_birth,state,lg_state,lg_area,current_mode,certcode,faccode,' 186 187 'depcode,current_level,current_session,current_verdict,' 187 'entry_session faccode,depcode,certcode,'188 'entry_session,faccode,depcode,certcode,' 188 189 'nysc_senate_info,nysc_date_of_graduation,nysc_updated,%s\r\n' 189 'A111111,234,123,Anna,M.,Tester,f,NG,1981-02-04#,created, ug_ft,'190 'CERT1,NA,NA,200,2012,0, ,NA,CERT1,,,,,,,,,12.12,,,,,,\r\n' % year_range_str,190 'A111111,234,123,Anna,M.,Tester,f,NG,1981-02-04#,created,xyz,abc,ug_ft,' 191 'CERT1,NA,NA,200,2012,0,2010,NA,NA,CERT1,,,,,,,,,12.12,,,,,,\r\n' % year_range_str, 191 192 result 192 193 )
Note: See TracChangeset for help on using the changeset viewer.