Ignore:
Timestamp:
16 Aug 2016, 11:14:45 (8 years ago)
Author:
Henrik Bettermann
Message:

Add two property attributes: remark and final_remark.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_level_report.py

    r13965 r14082  
    2525    def test_get_students(self):
    2626        # we can get a table with one student
     27        self.student['studycourse']['100']['Course1'].ca = 0
    2728        result = get_students('fac1', 'dep1', 2010, 100)
    2829        self.assertEqual(result,
    29             [(u'1234', u'TESTER, Bob', 30, 30, 5.0, '', 30, 30, 5.0)])
     30            [(u'1234', u'TESTER, Bob', 30, 30, 5.0, '', 30, 30, 5.0, 'Proceed')])
    3031        return
    3132
    3233    def test_create_pdf(self):
     34        self.student['studycourse']['100']['Course1'].ca = 0
    3335        report = LevelReport('fac1', 'dep1', 2010, 100)
    3436        result = report.create_pdf()
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py

    r14076 r14082  
    4242    def test_get_students(self):
    4343        # we can get a table with one student
     44        self.student['studycourse']['100']['Course1'].ca = 0
    4445        course_codes = get_courses('fac1', 'dep1', 2010, 100)
    4546        result = get_students('fac1', 'dep1', 2010, 100, course_codes)
  • main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py

    r14075 r14082  
    116116        return False
    117117
     118    # only AAUE
     119    @property
     120    def remark(self):
     121        if self.cumulative_params[0] < 1.5:
     122            return 'Probation'
     123        if self.cumulative_params[0] < 5.1:
     124            return 'Proceed'
     125        return 'N/A'
     126
     127    # only AAUE
     128    @property
     129    def final_remark(self):
     130        if self.cumulative_params[0] < 1.5:
     131            return 'Fail'
     132        if self.cumulative_params[0] < 2.4:
     133            return 'Third Class (Honours)'
     134        if self.cumulative_params[0] < 3.5:
     135            return 'Second Class (Honours) Lower Division'
     136        if self.cumulative_params[0] < 4.5:
     137            return 'Second Class (Honours) Upper Division'
     138        if self.cumulative_params[0] < 5.1:
     139            return 'First Class Honours'
     140        return 'N/A'
     141
    118142    def addCourseTicket(self, ticket, course):
    119143        """Add a course ticket object.
Note: See TracChangeset for help on using the changeset viewer.