Ignore:
Timestamp:
5 Jun 2013, 09:07:33 (11 years ago)
Author:
Henrik Bettermann
Message:

Use carry over tickets in next level for GPA calculation. Ignore carry over tickets in current level.

File:
1 edited

Legend:

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

    r10276 r10277  
    819819        self.assertTrue(
    820820            self.student['studycourse']['200']['COURSE1'].carry_over)
     821        return
     822
     823    def test_gpa_calculation_with_carryover(self):
     824        studylevel = createObject(u'waeup.StudentStudyLevel')
     825        studylevel.level = 100
     826        studylevel.level_session = 2005
     827        self.student['studycourse'].entry_mode = 'ug_ft'
     828        self.student['studycourse'].addStudentStudyLevel(
     829            self.certificate, studylevel)
     830        # First course has been added automatically.
     831        # Set score above passmark.
     832        studylevel['COURSE1'].score = studylevel['COURSE1'].passmark + 1
     833        # GPA is 1.
     834        self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 1.0)
     835        # Set score below passmark.
     836        studylevel['COURSE1'].score = studylevel['COURSE1'].passmark - 1
     837        # GPA is still 0.
     838        self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 0.0)
     839        studylevel2 = createObject(u'waeup.StudentStudyLevel')
     840        studylevel2.level = 200
     841        studylevel2.level_session = 2006
     842        self.student['studycourse'].addStudentStudyLevel(
     843            self.certificate, studylevel2)
     844        # Carry-over course has been autonatically added.
     845        studylevel2['COURSE1'].score = 66
     846        # The score of the carry-over course is now used for calculation of the
     847        # GPA at level 100 ...
     848        self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 4.0)
     849        # ... but not at level 200
     850        self.assertEqual(self.student['studycourse']['200'].gpa_params[0], 0.0)
    821851        return
    822852
     
    18161846            'temp_password generated: %s' % temp_password in logcontent)
    18171847
    1818     def test_transcrtipts(self):
    1819         self.student.date_of_birth = date(1981, 2, 4)
     1848    def test_transcripts(self):
    18201849        studylevel = createObject(u'waeup.StudentStudyLevel')
    18211850        studylevel.level = 100
Note: See TracChangeset for help on using the changeset viewer.