Ignore:
Timestamp:
12 Aug 2013, 08:57:26 (11 years ago)
Author:
Henrik Bettermann
Message:

Reinvent temporary/unrectified/momentary/sessional gpa as a property attribute of study levels. The sessional gpa shown on transcript slips is now called 'rectified sessional gpa'.

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

    r10472 r10479  
    799799        self.browser.open(self.student_path + '/studycourse/100')
    800800        # total credits
    801         self.assertEqual(self.student['studycourse']['100'].gpa_params[1], 23)
     801        self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[1], 23)
    802802        # weigheted credits = 3 * 10 + 4 * 13
    803         self.assertEqual(self.student['studycourse']['100'].gpa_params[2], 82.0)
     803        self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[2], 82.0)
    804804        # sgpa = 82 / 23
    805         self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 3.57)
     805        self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[0], 3.57)
    806806        # Carry-over courses will be collected when next level is created
    807807        self.browser.open(self.student_path + '/studycourse/manage')
     
    833833        studylevel['COURSE1'].score = studylevel['COURSE1'].passmark + 1
    834834        # GPA is 1.
    835         self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 1.0)
     835        self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[0], 1.0)
    836836        # Set score below passmark.
    837837        studylevel['COURSE1'].score = studylevel['COURSE1'].passmark - 1
    838838        # GPA is still 0.
    839         self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 0.0)
     839        self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[0], 0.0)
    840840        studylevel2 = createObject(u'waeup.StudentStudyLevel')
    841841        studylevel2.level = 200
     
    847847        # The score of the carry-over course is now used for calculation of the
    848848        # GPA at level 100 ...
    849         self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 4.0)
     849        self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[0], 4.0)
    850850        # ... but not at level 200
    851         self.assertEqual(self.student['studycourse']['200'].gpa_params[0], 0.0)
     851        self.assertEqual(self.student['studycourse']['200'].gpa_params_rectified[0], 0.0)
    852852        return
    853853
     
    18971897        self.student['studycourse']['110']['COURSE2'] = courseticket
    18981898        self.student['studycourse']['100']['COURSE1'].score = 55
    1899         self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 3.0)
    1900         self.assertEqual(self.student['studycourse']['110'].gpa_params[0], 4.0)
     1899        self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[0], 3.0)
     1900        self.assertEqual(self.student['studycourse']['110'].gpa_params_rectified[0], 4.0)
    19011901        # Get transcript data
    19021902        td = self.student['studycourse'].getTranscriptData()
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r10458 r10479  
    403403        self.assertEqual(
    404404            result,
    405             'level,level_session,level_verdict,total_credits,'
     405            'gpa,level,level_session,level_verdict,total_credits,'
    406406            'validated_by,validation_date,'
    407407            'student_id,number_of_tickets,certcode\r\n'
    408             ',,0,0,,,,0,\r\n'
     408            '0.0,,,0,0,,,,0,\r\n'
    409409            )
    410410        return
     
    421421        self.assertEqual(
    422422            result,
    423             'level,level_session,level_verdict,total_credits,'
     423            'gpa,level,level_session,level_verdict,total_credits,'
    424424            'validated_by,validation_date,'
    425425            'student_id,number_of_tickets,certcode\r\n'
    426             '100,2012,A,100,,,A111111,1,CERT1\r\n'
     426            '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'
    427427            )
    428428        return
     
    437437        self.assertEqual(
    438438            result,
    439             'level,level_session,level_verdict,total_credits,'
     439            'gpa,level,level_session,level_verdict,total_credits,'
    440440            'validated_by,validation_date,'
    441441            'student_id,number_of_tickets,certcode\r\n'
    442             '100,2012,A,100,,,A111111,1,CERT1\r\n'
     442            '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'
    443443            )
    444444        return
     
    452452        self.assertEqual(
    453453            result,
    454             'level,level_session,level_verdict,total_credits,'
     454            'gpa,level,level_session,level_verdict,total_credits,'
    455455            'validated_by,validation_date,'
    456456            'student_id,number_of_tickets,certcode\r\n'
    457             '100,2012,A,100,,,A111111,1,CERT1\r\n'
     457            '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'
    458458            )
    459459        return
     
    471471        self.assertEqual(
    472472            result,
    473             'level,level_session,level_verdict,total_credits,'
     473            'gpa,level,level_session,level_verdict,total_credits,'
    474474            'validated_by,validation_date,'
    475475            'student_id,number_of_tickets,certcode\r\n'
    476             '100,2012,A,100,,,A111111,1,CERT1\r\n'
     476            '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'
    477477            )
    478478        return
Note: See TracChangeset for help on using the changeset viewer.