Ignore:
Timestamp:
23 Feb 2017, 11:44:30 (8 years ago)
Author:
Henrik Bettermann
Message:

Add outstanding attribute to course tickets.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r14392 r14574  
    25762576        return
    25772577
     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
    25782615    def test_postgraduate_student_access(self):
    25792616        self.certificate.study_mode = 'pg_ft'
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r14443 r14574  
    492492            'validated_by,validation_date,'
    493493            'student_id,number_of_tickets,certcode\r\n'
    494             '0.0,,,0,0,,,,0,\r\n'
     494            '0.00,,,0,0,,,,0,\r\n'
    495495            )
    496496        return
     
    510510            'validated_by,validation_date,'
    511511            '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'
    513513            )
    514514        return
     
    526526            'validated_by,validation_date,'
    527527            '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'
    529529            )
    530530        return
     
    541541            'validated_by,validation_date,'
    542542            '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'
    544544            )
    545545        return
     
    560560            'validated_by,validation_date,'
    561561            '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'
    563563            )
    564564        return
     
    579579            'validated_by,validation_date,'
    580580            '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'
    582582            )
    583583        return
     
    614614            result,
    615615            '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,'
    617617            'display_fullname\r\n'
    618             '0,0,,,,,,,0,,,,,,,\r\n'
     618            '0,0,,,,,,,0,0,,,,,,,\r\n'
    619619            )
    620620        return
     
    633633            result,
    634634            '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,'
    636636            '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,'
    638638            'Anna M. Tester\r\n'
    639639            )
     
    650650            result,
    651651            '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,'
    653653            '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,'
    655655            'Anna M. Tester\r\n'
    656656            )
     
    666666            result,
    667667            '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,'
    669669            '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,'
    671671            'Anna M. Tester\r\n'
    672672            )
     
    686686            result,
    687687            '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,'
    689689            '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,'
    691691            'Anna M. Tester\r\n'
    692692            )
     
    700700            result,
    701701            '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,'
    703703            '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,'
    705705            'Anna M. Tester\r\n'
    706706            )
     
    711711            result,
    712712            '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,'
    714714            'display_fullname\r\n'
    715715            )
     
    724724            result,
    725725            '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,'
    727727            '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,'
    729729            'Anna M. Tester\r\n'
    730730            )
Note: See TracChangeset for help on using the changeset viewer.