Changeset 14650


Ignore:
Timestamp:
23 Mar 2017, 06:09:02 (8 years ago)
Author:
Henrik Bettermann
Message:

Use and show course categories.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r14573 r14650  
    455455        Title = translate(_('Title'), target_language=portal_language)
    456456        Cred = translate(_('Cred.'), target_language=portal_language)
     457        CC = translate(_('Cat.'), target_language=portal_language)
    457458        if self.show_results:
    458459            Score = translate(_('Score'), target_language=portal_language)
     
    475476                tableheader.append([(Code,'code', 2.0),
    476477                                   (Title,'title', 7),
    477                                    (Cred, 'credits', 1.5),
     478                                   (Cred, 'credits', 1.4),
     479                                   (CC, 'course_category', 1.2),
    478480                                   (Score, 'score', 1.4),
    479481                                   #(CA, 'ca', 1.4),
     
    485487                                   (Title,'title', 7),
    486488                                   (Cred, 'credits', 1.5),
     489                                   (CC, 'course_category', 1.2),
    487490                                   (Signature, 'dummy', 3),
    488491                                   ])
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studyleveleditpage.pt

    r14576 r14650  
    2020      <th i18n:translate="">CO</th>
    2121      <th i18n:translate="">OS</th>
     22      <th i18n:translate="">CC</th>
    2223    </tr>
    2324  </thead>
     
    3940      <td tal:content="value/carry_over">CO</td>
    4041      <td tal:content="value/outstanding">OS</td>
     42      <td tal:content="value/course_category">CC</td>
    4143    </tr>
    4244  </tbody>
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studylevelmanagepage.pt

    r14614 r14650  
    4949            <th i18n:translate="">CO</th>
    5050            <th i18n:translate="">OS</th>
     51            <th i18n:translate="">CC</th>
    5152            <th i18n:translate="">Auto</th>
    5253          </tr>
     
    7172            <td tal:content="value/carry_over">CO</td>
    7273            <td tal:content="value/outstanding">OS</td>
     74            <td tal:content="value/course_category">CC</td>
    7375            <td tal:content="value/automatic">AUTO</td>
    7476          </tr>
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studylevelpage.pt

    r14614 r14650  
    3333      <th i18n:translate="">CO</th>
    3434      <th i18n:translate="">OS</th>
     35      <th i18n:translate="">CC</th>
    3536      <th i18n:translate="">Auto</th>
    3637    </tr>
     
    5253      <td tal:content="value/carry_over">CO</td>
    5354      <td tal:content="value/outstanding">OS</td>
     55      <td tal:content="value/course_category|nothing">CC</td>
    5456      <td tal:content="value/automatic">AUTO</td>
    5557    </tr>
     
    6062  CO: Carry-over course<br />
    6163  OS: Outstanding course<br />
     64  CC: Course Category (C, R or E)<br />
    6265  Mand.: Mandatory course<br />
    6366  Auto: Automatically created course ticket
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py

    r14630 r14650  
    3838        rsr =  CustomRawScoreReport('fac1', 'dep1', 'CERT1', 2010, 100)
    3939        result = rsr._get_courses('fac1', 'dep1', 'CERT1', 2010, 100)
    40         self.assertEqual(result, [u'Course1'])
     40        self.assertEqual(result, [self.certificate.values()[0]])
     41        self.assertEqual(
     42            result,
     43            [self.app['faculties']['fac1']['dep1'].certificates[
     44                'CERT1']['Course1_100']])
    4145        return
    4246
     
    5660
    5761    def test_create_pdf(self):
     62        self.app['faculties']['fac1']['dep1'].certificates[
     63                'CERT1']['Course1_100'].course_category = 'xyz'
    5864        self.course2 = createObject('waeup.Course')
    5965        self.course2.code = 'Course2'
     
    126132        rsr =  GradRawScoreReport('fac1', 'dep1', 'CERT1', 2010, 100)
    127133        result = rsr._get_courses('fac1', 'dep1', 'CERT1', 2010, 100)
    128         self.assertEqual(result, [u'Course1'])
     134        self.assertEqual(result, [self.certificate.values()[0]])
     135        self.assertEqual(
     136            result,
     137            [self.app['faculties']['fac1']['dep1'].certificates[
     138                'CERT1']['Course1_100']])
    129139        return
    130140
     
    151161    def test_create_pdf(self):
    152162        self.certificate.end_level = 200
     163        self.app['faculties']['fac1']['dep1'].certificates['CERT1']['Course1_100'].course_category = 'xyz'
    153164        self.course2 = createObject('waeup.Course')
    154165        self.course2.code = 'Course2'
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_export.py

    r14622 r14650  
    192192        self.assertEqual(
    193193            result,
    194             'automatic,ca,carry_over,code,credits,dcode,fcode,level,level_session,'
     194            'automatic,ca,carry_over,code,course_category,credits,dcode,fcode,level,level_session,'
    195195            'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,'
    196196            'display_fullname,matric_number\r\n'
    197             '1,,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,'
     197            '1,,1,CRS1,,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,'
    198198            '"TESTER, Anna M.",234\r\n'
    199199            )
  • main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py

    r14621 r14650  
    2727
    2828    PREFERRED_LANGUAGES_DICT = {
     29        }
     30
     31    COURSE_CATEGORY_DICT = {
     32        'C':'Core Course (C)',
     33        'R':'Required Courses (R)',
     34        'E':'Elective Courses (E)',
    2935        }
    3036
Note: See TracChangeset for help on using the changeset viewer.