Ignore:
Timestamp:
30 Nov 2017, 12:57:05 (7 years ago)
Author:
Henrik Bettermann
Message:

Many customizations are needed to distinguish Diploma and Non-Diploma students in reports.

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

Legend:

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

    r14632 r14918  
    8080        final_level_obj = level_obj.student['studycourse'][final_level]
    8181        if final_level_obj.remark not in (
    82             'Pass', '3s_rd_s', '2s_2_s', '2s_1_s', '1s_st_s'):
     82            'Pass', '3s_rd_s', '2s_2_s', '2s_1_s', '1s_st_s',
     83            'Merit', 'Credit', 'Distinction'):
    8384            return True
    8485        return False
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/session_results_presentation.py

    r14673 r14918  
    123123        final_level_obj = level_obj.student['studycourse'][final_level]
    124124        if final_level_obj.remark not in (
    125             'Pass', '3s_rd_s', '2s_2_s', '2s_1_s', '1s_st_s'):
     125            'Pass', '3s_rd_s', '2s_2_s', '2s_1_s', '1s_st_s',
     126            'Merit', 'Credit', 'Distinction'):
    126127            return True
    127128        return False
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_level_report.py

    r14629 r14918  
    8787        print "Sample grad_level_report.pdf written to %s" % path
    8888        return
     89
     90    def test_create_dp_pdf(self):
     91        self.certificate.study_mode = 'dp_ft'
     92        self.student['studycourse']['100']['Course1'].ca = 0
     93        self.student['studycourse']['100']['Course1'].credits = 91
     94        self.certificate.end_level = 100
     95        self.app['faculties']['fac1'].officer_1 = 'Rosa Moonshine - Dean of Faculty'
     96        self.app['faculties']['fac1']['dep1'].officer_1 = 'Amalia Sunshine - Head of Department'
     97        report = GradLevelReport('fac1', 'dep1', 'CERT1', 2010, 100)
     98        result = report.create_pdf('JOB_ID')
     99        self.assertTrue(result.startswith('%PDF-'))
     100        path = os.path.join(samples_dir(), 'dp_grad_level_report.pdf')
     101        open(path, 'wb').write(result)
     102        print "Sample dp_grad_level_report.pdf written to %s" % path
     103        return
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_session_results_presentation.py

    r14631 r14918  
    5656        return
    5757
     58    def test_create_dp_pdf(self):
     59        self.certificate.degree = 'BA(FS)'
     60        self.certificate.study_mode = 'dp_ft'
     61        self.app['faculties']['fac1'].officer_1 = 'Rosa Moonshine - Dean of Faculty'
     62        self.app['faculties']['fac1']['dep1'].officer_1 = 'Amalia Sunshine - Head of Department'
     63        self.app['faculties']['fac1']['dep1'].officer_2 = 'Theresa Starbright - External Examiner'
     64        report = CustomSessionResultsPresentation('fac1', 'dep1', 'CERT1', 2010, 100)
     65        result = report.create_pdf('JOB_ID')
     66        self.assertTrue(result.startswith('%PDF-'))
     67        path = os.path.join(samples_dir(), 'dp_session_results_presentation.pdf')
     68        open(path, 'wb').write(result)
     69        print "Sample dp_session_results_presentation.pdf written to %s" % path
     70        return
     71
    5872 
    5973class GradSessionResultsPresentationTests(CatalogTestSetup):
Note: See TracChangeset for help on using the changeset viewer.