Changeset 14574 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 23 Feb 2017, 11:44:30 (8 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r14337 r14574 658 658 'student_id','reg_number','matric_number', 659 659 'mandatory', 'score', 'carry_over', 'automatic', 660 ' level_session',660 'outstanding', 'level_session', 661 661 'title', 'credits', 'passmark', 'semester' 662 662 ] + self.additional_fields -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r14247 r14574 598 598 ) 599 599 600 gpa = schema. Int(600 gpa = schema.TextLine( 601 601 title = _(u'Unrectified GPA'), 602 602 required = False, … … 664 664 ) 665 665 666 outstanding = schema.Bool( 667 title = _(u'Outstanding Course'), 668 default = False, 669 required = False, 670 ) 671 666 672 score = schema.Int( 667 673 title = _(u'Score'), -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py
r14572 r14574 75 75 credits_counted = level_obj.gpa_params[1] 76 76 credits_passed = passed_params[2] 77 level_gpa = format_float(level_obj.gpa , 3)77 level_gpa = format_float(level_obj.gpa_params[0], 3) 78 78 cum_credits_taken = level_obj.cumulative_params[1] 79 79 cum_credits_passed = level_obj.cumulative_params[4] -
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r14531 r14574 25 25 from zope.component.interfaces import IFactory 26 26 from zope.catalog.interfaces import ICatalog 27 from zope.component import createObject, queryUtility 27 from zope.component import createObject, queryUtility, getUtility 28 28 from zope.interface import implementedBy 29 from waeup.kofa.interfaces import academic_sessions_vocab, VALIDATED 29 from waeup.kofa.interfaces import academic_sessions_vocab, VALIDATED, IKofaUtils 30 30 from waeup.kofa.students.interfaces import ( 31 31 IStudentStudyLevel, IStudentNavigation, ICourseTicket) … … 79 79 total = 0 80 80 for ticket in self.values(): 81 total += ticket.credits 81 if not ticket.outstanding: 82 total += ticket.credits 82 83 return total 83 84 … … 135 136 @property 136 137 def gpa(self): 137 return self.gpa_params[0] 138 """Return string formatted gpa value. 139 """ 140 format_float = getUtility(IKofaUtils).format_float 141 return format_float(self.gpa_params[0], 2) 138 142 139 143 @property -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r14392 r14574 2576 2576 return 2577 2577 2578 def test_student_course_registration_outstanding(self): 2579 self.course = createObject('waeup.Course') 2580 self.course.code = 'COURSE2' 2581 self.course.semester = 1 2582 self.course.credits = 45 2583 self.course.passmark = 40 2584 self.app['faculties']['fac1']['dep1'].courses.addCourse( 2585 self.course) 2586 IWorkflowState(self.student).setState('school fee paid') 2587 self.browser.open(self.login_path) 2588 self.browser.getControl(name="form.login").value = self.student_id 2589 self.browser.getControl(name="form.password").value = 'spwd' 2590 self.browser.getControl("Login").click() 2591 self.browser.open(self.student_path + '/studycourse/add') 2592 self.browser.getControl("Create course list now").click() 2593 self.assertEqual(self.student['studycourse']['100'].number_of_tickets, 1) 2594 self.student['studycourse'].current_level = 200 2595 self.browser.getLink("Study Course").click() 2596 self.browser.getLink("Add course list").click() 2597 self.assertMatches('...Add current level 200 (Year 2)...', 2598 self.browser.contents) 2599 self.browser.getControl("Create course list now").click() 2600 self.browser.getLink("200").click() 2601 self.browser.getLink("Edit course list").click() 2602 self.browser.getLink("here").click() 2603 self.browser.getControl(name="form.course").value = ['COURSE2'] 2604 self.browser.getControl("Add course ticket").click() 2605 # Carryover COURSE1 in level 200 already has 10 credits 2606 self.assertMatches( 2607 '...Total credits exceed 50...', self.browser.contents) 2608 # If COURSE1 is outstanding, its credits won't be considered 2609 self.student['studycourse']['200']['COURSE1'].outstanding = True 2610 self.browser.getControl("Add course ticket").click() 2611 self.assertMatches( 2612 '...Successfully added COURSE2...', self.browser.contents) 2613 return 2614 2578 2615 def test_postgraduate_student_access(self): 2579 2616 self.certificate.study_mode = 'pg_ft' -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r14443 r14574 492 492 'validated_by,validation_date,' 493 493 'student_id,number_of_tickets,certcode\r\n' 494 '0.0 ,,,0,0,,,,0,\r\n'494 '0.00,,,0,0,,,,0,\r\n' 495 495 ) 496 496 return … … 510 510 'validated_by,validation_date,' 511 511 'student_id,number_of_tickets,certcode\r\n' 512 '0.0 ,100,2012,A,100,,,A111111,1,CERT1\r\n'512 '0.00,100,2012,A,100,,,A111111,1,CERT1\r\n' 513 513 ) 514 514 return … … 526 526 'validated_by,validation_date,' 527 527 'student_id,number_of_tickets,certcode\r\n' 528 '0.0 ,100,2012,A,100,,,A111111,1,CERT1\r\n'528 '0.00,100,2012,A,100,,,A111111,1,CERT1\r\n' 529 529 ) 530 530 return … … 541 541 'validated_by,validation_date,' 542 542 'student_id,number_of_tickets,certcode\r\n' 543 '0.0 ,100,2012,A,100,,,A111111,1,CERT1\r\n'543 '0.00,100,2012,A,100,,,A111111,1,CERT1\r\n' 544 544 ) 545 545 return … … 560 560 'validated_by,validation_date,' 561 561 'student_id,number_of_tickets,certcode\r\n' 562 '0.0 ,100,2012,A,100,,,A111111,1,CERT1\r\n'562 '0.00,100,2012,A,100,,,A111111,1,CERT1\r\n' 563 563 ) 564 564 return … … 579 579 'validated_by,validation_date,' 580 580 'student_id,number_of_tickets,certcode\r\n' 581 '0.0 ,100,2012,A,100,,,A111111,1,CERT1\r\n'581 '0.00,100,2012,A,100,,,A111111,1,CERT1\r\n' 582 582 ) 583 583 return … … 614 614 result, 615 615 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 616 'mandatory, passmark,score,semester,title,student_id,certcode,'616 'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,' 617 617 'display_fullname\r\n' 618 '0,0,,,,,,,0, ,,,,,,\r\n'618 '0,0,,,,,,,0,0,,,,,,,\r\n' 619 619 ) 620 620 return … … 633 633 result, 634 634 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 635 'mandatory, passmark,score,semester,title,student_id,certcode,'635 'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,' 636 636 'display_fullname\r\n' 637 '1,1,CRS1,100,DEP1,FAC1,100,2012,0, 100,,2,Course 1,A111111,CERT1,'637 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,' 638 638 'Anna M. Tester\r\n' 639 639 ) … … 650 650 result, 651 651 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 652 'mandatory, passmark,score,semester,title,student_id,certcode,'652 'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,' 653 653 'display_fullname\r\n' 654 '1,1,CRS1,100,DEP1,FAC1,100,2012,0, 100,,2,Course 1,A111111,CERT1,'654 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,' 655 655 'Anna M. Tester\r\n' 656 656 ) … … 666 666 result, 667 667 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 668 'mandatory, passmark,score,semester,title,student_id,certcode,'668 'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,' 669 669 'display_fullname\r\n' 670 '1,1,CRS1,100,DEP1,FAC1,100,2012,0, 100,,2,Course 1,A111111,CERT1,'670 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,' 671 671 'Anna M. Tester\r\n' 672 672 ) … … 686 686 result, 687 687 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 688 'mandatory, passmark,score,semester,title,student_id,certcode,'688 'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,' 689 689 'display_fullname\r\n' 690 '1,1,CRS1,100,DEP1,FAC1,100,2012,0, 100,,2,Course 1,A111111,CERT1,'690 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,' 691 691 'Anna M. Tester\r\n' 692 692 ) … … 700 700 result, 701 701 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 702 'mandatory, passmark,score,semester,title,student_id,certcode,'702 'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,' 703 703 'display_fullname\r\n' 704 '1,1,CRS1,100,DEP1,FAC1,100,2012,0, 100,,2,Course 1,A111111,CERT1,'704 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,' 705 705 'Anna M. Tester\r\n' 706 706 ) … … 711 711 result, 712 712 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 713 'mandatory, passmark,score,semester,title,student_id,certcode,'713 'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,' 714 714 'display_fullname\r\n' 715 715 ) … … 724 724 result, 725 725 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 726 'mandatory, passmark,score,semester,title,student_id,certcode,'726 'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,' 727 727 'display_fullname\r\n' 728 '1,1,CRS1,100,DEP1,FAC1,110,2012,0, 100,,2,Course 1,A111111,CERT1,'728 '1,1,CRS1,100,DEP1,FAC1,110,2012,0,0,100,,2,Course 1,A111111,CERT1,' 729 729 'Anna M. Tester\r\n' 730 730 )
Note: See TracChangeset for help on using the changeset viewer.