Changeset 14495 for main/waeup.kofa/trunk/src/waeup/kofa/students/reports
- Timestamp:
- 2 Feb 2017, 07:58:49 (8 years ago)
- 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/raw_score_report.py
r14493 r14495 84 84 for ticket in level_obj.values(): 85 85 if ticket.code in course_codes: 86 if not None in (ticket.score, ticket.ca): 87 scores[ticket.code] = ( 88 ticket.score + ticket.ca, ticket.grade) 86 if ticket.total_score is not None: 87 scores[ticket.code] = (ticket.total_score, ticket.grade) 89 88 else: 90 89 scores[ticket.code] = ('NIL', '') … … 120 119 canvas.rotate(25) 121 120 canvas.drawString( 0, -1, self.text) 122 123 #def wrap(self,aW,aH):124 # canv = self.canv125 # return canv._leading, canv.stringWidth(self.text)126 121 127 122 def tbl_data_to_table(data, course_codes): … … 176 171 177 172 note = "" 178 179 # note = """ 180 #<br /><br /><br /><br /> 181 #<font size='10'> 182 #<strong>Note:</strong> This copy is subject to correction for typographical errors and ratification by the departmental board. 183 #</font> 184 #""" 185 186 signatures = [ 187 translate(_('Head of Department')), 188 translate(_('Dean of Faculty'))] 173 signatures = None 189 174 190 175 def __init__(self, faccode, depcode, certcode, session, level, -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_raw_score_report.py
r14494 r14495 7 7 from waeup.kofa.students.tests.test_browser import StudentsFullSetup 8 8 from waeup.kofa.tests.test_async import FunctionalAsyncTestCase 9 from waeup.kofa.testing import FunctionalLayer 9 10 from waeup.kofa.browser.tests.test_pdf import samples_dir 10 11 from waeup.aaue.students.reports.raw_score_report import ( 11 from waeup.kofa.students.reports.raw_score_report import ( 12 12 get_students, RawScoreReport, IRawScoreReport, 13 13 get_courses) 14 from waeup.aaue.testing import FunctionalLayer 14 15 15 16 16 class RawScoreReportTests(CatalogTestSetup): … … 22 22 self.course = createObject('waeup.Course') 23 23 self.course.code = 'Course1' 24 self.course.credits = 25 24 25 self.app['faculties']['fac1']['dep1'].courses.addCourse( 25 26 self.course) … … 42 43 def test_get_students(self): 43 44 # we can get a table with one student 44 self.student['studycourse']['100']['Course1'].ca = 045 45 course_codes = get_courses('fac1', 'dep1', 'CERT1', 2010, 100) 46 46 result = get_students('fac1', 'dep1', 'CERT1', 2010, 100, course_codes) 47 47 self.assertEqual(result, 48 [(u'1234', u' TESTER, Bob', {'Course1': (70, 'A')})])49 self.student['studycourse']['100']['Course1']. ca= None48 [(u'1234', u'Bob Tester', {'Course1': (70, 'A')})]) 49 self.student['studycourse']['100']['Course1'].score = None 50 50 result = get_students('fac1', 'dep1', 'CERT1', 2010, 100, course_codes) 51 51 self.assertEqual(result, 52 [(u'1234', u' TESTER, Bob', {'Course1': ('NIL', '')})])52 [(u'1234', u'Bob Tester', {'Course1': ('NIL', '')})]) 53 53 return 54 54 … … 56 56 self.course = createObject('waeup.Course') 57 57 self.course.code = 'Course2' 58 self.course.credits = 30 58 59 self.app['faculties']['fac1']['dep1'].courses.addCourse( 59 60 self.course)
Note: See TracChangeset for help on using the changeset viewer.