Changeset 17769 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 13 May 2024, 06:26:57 (8 months ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
r16713 r17769 306 306 try: 307 307 newcourse.certificate = certificate 308 newcourse.entry_mode = 'transfer' 308 # After import with entry_mode 'transfer' 309 # we must ensure that after export and reimport 310 # the student is not transferred again. 311 newcourse.entry_mode = 'transferred' 309 312 newcourse.current_session = current_session 310 313 newcourse.current_level = current_level -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r17640 r17769 569 569 'entry_mode,entry_session,previous_verdict,student_id,previous\r\n' 570 570 ) 571 error = self.student.transfer(self.certificate2, current_session=2013) 571 exporter = SecondStudentStudyCourseExporter() 572 exporter.export_all(self.app, self.outfile) 573 result = open(self.outfile, 'rb').read() 574 self.assertEqual( 575 result, 576 'certificate,current_level,current_session,current_verdict,' 577 'entry_mode,entry_session,previous_verdict,student_id,previous\r\n' 578 ) 579 580 # First Transfer 581 error = self.student.transfer(self.certificate2, 582 current_session=2013) 572 583 self.assertTrue(error == None) 573 exporter.export_all(self.app, self.outfile) 574 result = open(self.outfile, 'rb').read() 584 exporter = FirstStudentStudyCourseExporter() 585 exporter.export_all(self.app, self.outfile) 586 result = open(self.outfile, 'rb').read() 587 # This is the original study course 575 588 self.assertEqual( 576 589 result, … … 578 591 'entry_mode,entry_session,previous_verdict,student_id,previous\r\n' 579 592 'CERT1,200,2012,0,ug_ft,2010,0,A111111,1\r\n') 593 exporter = SecondStudentStudyCourseExporter() 594 exporter.export_all(self.app, self.outfile) 595 result = open(self.outfile, 'rb').read() 596 self.assertEqual( 597 result, 598 'certificate,current_level,current_session,current_verdict,' 599 'entry_mode,entry_session,previous_verdict,student_id,previous\r\n' 600 ) 601 602 # Second transfer 580 603 error = self.student.transfer(self.certificate, 581 604 current_session=2014, 582 605 current_level=300) 583 606 self.assertTrue(error == None) 584 exporter = SecondStudentStudyCourseExporter() 585 exporter.export_all(self.app, self.outfile) 586 result = open(self.outfile, 'rb').read() 607 exporter = FirstStudentStudyCourseExporter() 608 exporter.export_all(self.app, self.outfile) 609 result = open(self.outfile, 'rb').read() 610 # This is the original study course 587 611 self.assertEqual( 588 612 result, 589 613 'certificate,current_level,current_session,current_verdict,' 590 614 'entry_mode,entry_session,previous_verdict,student_id,previous\r\n' 591 'CERT2,,2013,,transfer,2010,,A111111,2\r\n') 592 exporter = StudentStudyCourseExporter() 615 'CERT1,200,2012,0,ug_ft,2010,0,A111111,1\r\n') 616 # This is the second study course 617 exporter = SecondStudentStudyCourseExporter() 593 618 exporter.export_all(self.app, self.outfile) 594 619 result = open(self.outfile, 'rb').read() … … 597 622 'certificate,current_level,current_session,current_verdict,' 598 623 'entry_mode,entry_session,previous_verdict,student_id,previous\r\n' 599 'CERT1,300,2014,,transfer,2010,,A111111,0\r\n') 624 'CERT2,,2013,,transferred,2010,,A111111,2\r\n') 625 # This is the third study course 626 exporter = StudentStudyCourseExporter() 627 exporter.export_all(self.app, self.outfile) 628 result = open(self.outfile, 'rb').read() 629 self.assertEqual( 630 result, 631 'certificate,current_level,current_session,current_verdict,' 632 'entry_mode,entry_session,previous_verdict,student_id,previous\r\n' 633 'CERT1,300,2014,,transferred,2010,,A111111,0\r\n') 600 634 return 601 635
Note: See TracChangeset for help on using the changeset viewer.