- Timestamp:
- 10 Feb 2017, 17:03:20 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/locales/en/LC_MESSAGES/waeup.kofa.po
r14522 r14532 160 160 msgstr "Name (Surname First)" 161 161 162 msgid "Total Credits Registered"163 msgstr "Total Units Registered"162 msgid "Total Credits Taken" 163 msgstr "Total Units Taken" 164 164 165 165 msgid "Total Credits Passed" 166 166 msgstr "Total Units Passed" 167 167 168 msgid "Cum. Credits Registered"169 msgstr "Cum. Units Registered"168 msgid "Cum. Credits Taken" 169 msgstr "Cum. Units Taken" 170 170 171 171 msgid "Cum. Credits Passed" -
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r14527 r14532 33 33 IStudentsUtils, IStudent, IStudentRequestPW) 34 34 from waeup.kofa.students.workflow import PAID, REGISTERED, RETURNING 35 from waeup.kofa.students.studylevel import getGradeWeightFromScore36 35 from waeup.kofa.students.browser import ( 37 36 StartClearancePage, … … 865 864 # In AAUE only editable tickets can be printed 866 865 for ticket in sorted_tickets: 867 if None in (ticket.score, ticket.ca):866 if ticket.total_score is None: 868 867 total = 'n/a' 869 868 grade = 'n/a' 870 869 else: 871 total = ticket. score + ticket.ca872 grade = getGradeWeightFromScore(total, ticket.student)[0]873 if grade == 'F':870 total = ticket.total_score 871 grade = ticket._getGradeWeightFromScore[0] 872 if grade in ('F', '-'): 874 873 failed += 1 875 874 else: -
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py
r14528 r14532 37 37 # we can get a list with one course code 38 38 result = get_courses('fac1', 'dep1', 'CERT1', 2010, 100) 39 self.assertEqual(result, [ (u'Course1')])39 self.assertEqual(result, [u'Course1']) 40 40 return 41 41 … … 54 54 55 55 def test_create_pdf(self): 56 self.course = createObject('waeup.Course')57 self.course .code = 'Course2'58 self.course .credits = 3056 self.course2 = createObject('waeup.Course') 57 self.course2.code = 'Course2' 58 self.course2.credits = 30 59 59 self.app['faculties']['fac1']['dep1'].courses.addCourse( 60 self.course )60 self.course2) 61 61 self.app['faculties']['fac1']['dep1'].certificates[ 62 'CERT1'].addCertCourse(self.course, level=100) 62 'CERT1'].addCertCourse(self.course2, level=100) 63 self.course3 = createObject('waeup.Course') 64 self.course3.code = 'Course3' 65 self.course3.credits = 30 66 self.app['faculties']['fac1']['dep1'].courses.addCourse( 67 self.course3) 68 self.app['faculties']['fac1']['dep1'].certificates[ 69 'CERT1'].addCertCourse(self.course3, level=100) 63 70 self.app['faculties']['fac1'].officer_1 = 'Rosa Moonshine - Dean of Faculty' 64 71 self.app['faculties']['fac1']['dep1'].officer_1 = 'Amalia Sunshine - Head of Department' … … 73 80 ticket.ca = 10 74 81 self.student['studycourse']['200']['Course2'] = ticket 82 ticket = createObject('waeup.CourseTicket') 83 ticket.code = 'Course3' 84 ticket.credits = 30 85 # core course, no result available 86 ticket.score = -1 87 ticket.ca = 0 88 self.student['studycourse']['200']['Course3'] = ticket 89 self.assertEqual(ticket.grade, '-') 75 90 self.student.firstname = u'Osahenokese Tessy' 76 91 self.student.lastname = u'Emwinyomwanru' -
main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
r14509 r14532 68 68 level_gpa = 0.0 69 69 for ticket in self.values(): 70 if None not in (ticket.score, ticket.ca):70 if ticket.total_score is not None: 71 71 credits_counted += ticket.credits 72 72 credits_weighted += ticket.credits * ticket.weight … … 94 94 courses_not_taken = '' 95 95 for ticket in self.values(): 96 if None not in (ticket.score, ticket.ca):96 if ticket.total_score is not None: 97 97 if ticket.total_score < ticket.passmark: 98 98 failed += 1 … … 361 361 362 362 @property 363 def _getGradeWeightFromScore(self): 364 """Nigerian Course Grading System 365 """ 366 if self.score == -1: 367 return ('-',0) # core course and result not yet available (used by AAUE) 368 if self.total_score is None: 369 return (None, None) 370 if self.total_score >= 70: 371 return ('A',5) 372 if self.total_score >= 60: 373 return ('B',4) 374 if self.total_score >= 50: 375 return ('C',3) 376 if self.total_score >= 45: 377 return ('D',2) 378 if self.total_score >= self.passmark: # passmark changed in 2013 from 40 to 45 379 return ('E',1) 380 return ('F',0) 381 382 @property 363 383 def total_score(self): 364 384 """Returns ca + score. 365 385 """ 386 if self.score == -1: 387 return 0 366 388 if not None in (self.score, self.ca): 367 389 return self.score + self.ca 390 return None 368 391 369 392 @property -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r14515 r14532 405 405 # A course ticket slip can be downloaded 406 406 self.login_as_lecturer() 407 self.student['studycourse']['100']['COURSE1'].score = 55 408 self.student['studycourse']['100']['COURSE1'].ca = 11 407 409 pdf_url = '%s/coursetickets.pdf' % self.course_url 408 410 self.browser.open(pdf_url)
Note: See TracChangeset for help on using the changeset viewer.