Ignore:
Timestamp:
5 Jan 2017, 08:36:18 (8 years ago)
Author:
Henrik Bettermann
Message:

Count and display the number of courses registered but not taken.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py

    r14356 r14368  
    6969                level_obj.gpa_params[1],
    7070                passed_params[2],
     71                passed_params[5],
    7172                level_obj.gpa,
    7273                failed_courses,
     
    116117            TTR(translate(_('Total Credits Taken'))),
    117118            TTR(translate(_('Total Credits Passed'))),
     119            TTR(translate(_('Courses Without Result'))),
    118120            TTR(translate(_('GPA'))),
    119121            translate(_('Courses Failed')),
     
    127129        # Underline mandatory (core) courses
    128130        failed_courses = Paragraph(
    129             line[5].replace('m_', '<u>').replace('_m', '</u>'), SMALL_PARA_STYLE)
    130         line = line[:5] + (failed_courses,) + line[6:]
     131            line[6].replace('m_', '<u>').replace('_m', '</u>'), SMALL_PARA_STYLE)
     132        line = line[:6] + (failed_courses,) + line[7:]
    131133        # Superscript in remarks (needed by AAUE)
    132134        remark = Paragraph(
    133             line[9].replace('s_', '<super>').replace('_s', '</super>'), SMALL_PARA_STYLE)
    134         line = line[:9] + (remark,)
     135            line[10].replace('s_', '<super>').replace('_s', '</super>'), SMALL_PARA_STYLE)
     136        line = line[:10] + (remark,)
    135137        line = (sn,) + line
    136138        table.append(line)
     
    186188        table_data = tbl_data_to_table(self.data)
    187189        #col_widths = [3.5*cm] * len(self.data[0])
    188         col_widths = [1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 1*cm,
     190        col_widths = [1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 0.8*cm, 1*cm,
    189191                      6*cm, 0.8*cm, 0.8*cm, 1*cm, 2*cm]
    190192        pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string,
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py

    r14337 r14368  
    4141        result = get_students('fac1', 'dep1', 2010, 100)
    4242        self.assertEqual(result,
    43             [(u'1234', u'Bob Tester', 90, 30, 1.667, 'm_Course2_m Course3',
     43            [(u'1234', u'Bob Tester', 90, 30, 0, 1.667, 'm_Course2_m Course3',
    4444              90, 30, 1.667, '')])
    4545        return
Note: See TracChangeset for help on using the changeset viewer.