Changeset 7983 for main/waeup.kofa
- Timestamp:
- 26 Mar 2012, 09:31:08 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r7951 r7983 177 177 title = _(u'Sex'), 178 178 source = GenderSource(), 179 default = u'm',180 179 required = True, 181 180 ) … … 190 189 matric_number = TextLineChoice( 191 190 title = _(u'Matriculation Number'), 192 #default = u'',193 191 required = False, 194 192 readonly = False, … … 198 196 adm_code = schema.TextLine( 199 197 title = _(u'PWD Activation Code'), 200 default = u'',201 198 required = False, 202 199 readonly = True, … … 230 227 clr_code = schema.TextLine( 231 228 title = _(u'CLR Activation Code'), 232 default = u'',233 229 required = False, 234 230 readonly = True, … … 239 235 title = _(u'Nationality'), 240 236 default = 'nigeria', 241 required = True,237 required = False, 242 238 ) 243 239 … … 262 258 reg_number = schema.TextLine( 263 259 title = _(u'Registration Number'), 264 default = None,265 260 required = False, 266 261 ) … … 272 267 matric_number = schema.TextLine( 273 268 title = _(u'Matriculation Number'), 274 default = None,275 269 required = False, 276 270 ) … … 283 277 title = _(u'Certificate'), 284 278 source = CertificateSource(), 285 default = None,286 279 required = False, 287 280 ) … … 290 283 title = _(u'Entry Mode'), 291 284 source = StudyModeSource(), 292 default = u'ug_ft',293 285 required = True, 294 286 readonly = False, … … 299 291 source = academic_sessions_vocab, 300 292 #default = datetime.now().year, 301 default = None,302 293 required = True, 303 294 readonly = False, … … 307 298 title = _(u'Current Session'), 308 299 source = academic_sessions_vocab, 309 default = None,310 300 required = True, 311 301 readonly = False, … … 315 305 title = _(u'Current Level'), 316 306 source = StudyLevelSource(), 317 default = None,318 307 required = False, 319 308 readonly = False, … … 348 337 title = _(u'Current Session'), 349 338 source = academic_sessions_vocab, 350 default = None,351 339 required = True, 352 340 ) … … 355 343 title = _(u'Current Level'), 356 344 source = StudyLevelSource(), 357 default = None,358 345 required = True, 359 346 ) … … 370 357 title = _(u'Session'), 371 358 source = academic_sessions_vocab, 372 default = None,373 359 required = True, 374 360 ) … … 452 438 bed_coordinates = schema.TextLine( 453 439 title = _(u'Bed Coordinates'), 454 default = None,455 440 required = False, 456 441 readonly = False, … … 459 444 bed_type = schema.TextLine( 460 445 title = _(u'Bed Type'), 461 default = None,462 446 required = False, 463 447 readonly = False, … … 467 451 title = _(u'Session'), 468 452 source = academic_sessions_vocab, 469 default = None,470 453 required = True, 471 454 readonly = True, … … 480 463 booking_code = schema.TextLine( 481 464 title = _(u'Booking Activation Code'), 482 default = u'',483 465 required = False, 484 466 readonly = True, … … 515 497 reg_number = schema.TextLine( 516 498 title = _(u'Registration Number'), 517 default = None,518 499 required = True, 519 500 readonly = False, -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data.csv
r7952 r7983 1 student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone, reg_state2 X666666,Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234, courses validated3 ,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234, courses validated4 ,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234, courses validated5 ,Else,Mueller,4,1990-01-05,100003,aa@aa.ng,1234, courses registered1 student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,sex,reg_state 2 X666666,Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,m,courses validated 3 ,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,m,courses validated 4 ,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,m,courses validated 5 ,Else,Mueller,4,1990-01-05,100003,aa@aa.ng,1234,f,courses registered -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data_migration.csv
r7527 r7983 1 student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password, reg_state2 A123456,Aaren,Pieri,1,1990-01-02#,100000,aa@aa.ng,1234,mypw1, clearance started3 B123456,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,mypw1, cleared4 C123456,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,mypw1, admitted5 D123456,John,Wolter,4,1990-01-05,100003,aa@aa.ng,1234,mypw1, nonsense6 E123456,John,Kennedy,5,1990-01-06,100004,aa@aa.ng,1234, 1 student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password,sex,reg_state 2 A123456,Aaren,Pieri,1,1990-01-02#,100000,aa@aa.ng,1234,mypw1,m,clearance started 3 B123456,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,mypw1,m,cleared 4 C123456,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,mypw1,m,admitted 5 D123456,John,Wolter,4,1990-01-05,100003,aa@aa.ng,1234,mypw1,m,nonsense 6 E123456,John,Kennedy,5,1990-01-06,100004,aa@aa.ng,1234,,x -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r7958 r7983 277 277 self.assertEqual(num_warns,2) 278 278 assert len(self.app['students'].keys()) == 4 279 content = open(fail_file).read() 280 self.assertEqual( 281 content, 282 'reg_number,firstname,student_id,sex,email,phone,date_of_birth,reg_state,lastname,password,matric_number,--ERRORS--\r\n' 283 '4,John,D123456,m,aa@aa.ng,1234,1990-01-05,nonsense,Wolter,mypw1,100003,reg_state: not allowed\r\n' 284 '5,John,E123456,x,aa@aa.ng,1234,1990-01-06,,Kennedy,,100004,sex: Invalid value; reg_state: not allowed\r\n' 285 ) 279 286 self.assertTrue('A123456' in self.app['students'].keys()) 280 287 self.assertEqual(self.app['students']['A123456'].state,'clearance started') -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r7982 r7983 618 618 self.browser.getControl(name="form.current_session").value = ['2004'] 619 619 self.browser.getControl(name="form.current_verdict").value = ['A'] 620 self.browser.getControl(name="form.entry_mode").value = ['ug_ft'] 620 621 self.browser.getControl("Save").click() 621 622 # Now we can save also the current level which depends on start and end … … 725 726 # Prepare a csv file for students 726 727 open('students.csv', 'wb').write( 727 """firstname,lastname,reg_number,date_of_birth,matric_number,email,phone, password728 Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,m ypwd1729 Claus,Finau,2,1990-01-03,100001,aa@aa.ng,1234,m ypwd1730 Brit,Berson,3,1990-01-04,100001,aa@aa.ng,1234,m ypwd1728 """firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,sex,password 729 Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,m,mypwd1 730 Claus,Finau,2,1990-01-03,100001,aa@aa.ng,1234,m,mypwd1 731 Brit,Berson,3,1990-01-04,100001,aa@aa.ng,1234,m,mypwd1 731 732 """) 732 733 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
Note: See TracChangeset for help on using the changeset viewer.