Changeset 14517 for main/waeup.aaue/trunk
- Timestamp:
- 8 Feb 2017, 08:17:02 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students/reports
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/level_report.py
r14489 r14517 17 17 ## 18 18 19 import grok 19 20 from waeup.kofa.students.reports.level_report import ( 20 21 LevelReport, LevelReportGenerator) … … 31 32 #""" 32 33 33 signatures = [ 34 'Head of Department', 'Dean of Faculty'] 34 @property 35 def signatures(self): 36 site = grok.getSite() 37 dean = site['faculties'][self.faccode].officer_1 38 hod = site['faculties'][self.faccode][self.depcode].officer_1 39 if not dean: 40 dean = 'Dean of Faculty' 41 if not hod: 42 hod = 'Head of Department' 43 return [hod, dean] 35 44 36 45 class LevelReportGenerator(LevelReportGenerator): -
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/raw_score_report.py
r14496 r14517 17 17 ## 18 18 19 import grok 19 20 from waeup.kofa.students.reports.raw_score_report import ( 20 21 RawScoreReport, RawScoreReportGenerator) … … 23 24 class CustomRawScoreReport(RawScoreReport): 24 25 25 signatures = ['Head of Department', 'Dean of Faculty'] 26 @property 27 def signatures(self): 28 site = grok.getSite() 29 dean = site['faculties'][self.faccode].officer_1 30 hod = site['faculties'][self.faccode][self.depcode].officer_1 31 if not dean: 32 dean = 'Dean of Faculty' 33 if not hod: 34 hod = 'Head of Department' 35 return [hod, dean] 26 36 27 37 -
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/session_results_presentation.py
r14508 r14517 31 31 @property 32 32 def introduction (self): 33 site = grok.getSite() 34 degrees_dict = getUtility(IKofaUtils).DEGREES_DICT 35 if self.certcode == 'all': 36 text = """I present to Senate, on behalf of the Faculty Board, 33 text = """I present to Senate, on behalf of the Faculty Board, 37 34 the results of courses taught and examinations held this academic session. 38 35 The following candidate(s) have/have not satisfied the degree requirements 39 of the Faculty and have/have not qualified for the award of an academic 40 degree as stated below: 36 of the Faculty and have/have not qualified for the award of a degree as follows: 41 37 """ 42 else:43 certificate = site['faculties'][self.faccode][44 self.depcode].certificates[self.certcode]45 degree = degrees_dict.get(certificate.degree, '[undefined]')46 text = """I present to Senate, on behalf of the Faculty Board,47 the results of courses taught and examinations held this academic session.48 The following candidate(s) have/have not satisfied the degree requirements49 of the Faculty and have/have not qualified for the award of a %s as stated50 below:51 """ % degree52 38 return text 53 39 … … 59 45 #""" 60 46 61 signatures = ['Head of Department', 'External Examiner', 'Dean of Faculty'] 47 @property 48 def signatures(self): 49 site = grok.getSite() 50 dean = site['faculties'][self.faccode].officer_1 51 hod = site['faculties'][self.faccode][self.depcode].officer_1 52 examiner = site['faculties'][self.faccode][self.depcode].officer_2 53 if not dean: 54 dean = 'Dean of Faculty' 55 if not hod: 56 hod = 'Head of Department' 57 if not examiner: 58 examiner = 'External Examiner' 59 return [hod, examiner, dean] 62 60 63 61 class CustomSessionResultsPresentationGenerator( -
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_level_report.py
r14506 r14517 36 36 def test_create_pdf(self): 37 37 self.student['studycourse']['100']['Course1'].ca = 0 38 self.app['faculties']['fac1'].officer_1 = 'Rosa Moonshine (Dean of Faculty)' 39 self.app['faculties']['fac1']['dep1'].officer_1 = 'Amalia Sunshine (Head of Department)' 38 40 report = CustomLevelReport('fac1', 'dep1', 'CERT1', 2010, 100) 39 41 result = report.create_pdf('JOB_ID') -
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py
r14506 r14517 61 61 self.app['faculties']['fac1']['dep1'].certificates[ 62 62 'CERT1'].addCertCourse(self.course, level=100) 63 self.app['faculties']['fac1'].officer_1 = 'Rosa Moonshine (Dean of Faculty)' 64 self.app['faculties']['fac1']['dep1'].officer_1 = 'Amalia Sunshine (Head of Department)' 63 65 studylevel = createObject('waeup.StudentStudyLevel') 64 66 studylevel.level = 200 -
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_session_results_presentation.py
r14503 r14517 42 42 def test_create_pdf(self): 43 43 self.certificate.degree = 'BA(FS)' 44 self.app['faculties']['fac1'].officer_1 = 'Rosa Moonshine (Dean of Faculty)' 45 self.app['faculties']['fac1']['dep1'].officer_1 = 'Amalia Sunshine (Head of Department)' 46 self.app['faculties']['fac1']['dep1'].officer_2 = 'Theresa Starbright (External Examiner)' 44 47 report = CustomSessionResultsPresentation('fac1', 'dep1', 'CERT1', 2010, 100) 45 48 result = report.create_pdf('JOB_ID')
Note: See TracChangeset for help on using the changeset viewer.