Changeset 9688 for main/waeup.uniben/trunk/src/waeup
- Timestamp:
- 19 Nov 2012, 18:19:35 (12 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r9686 r9688 191 191 self.redirect(self.url(self.context)) 192 192 return 193 if self. total_credits > self.max_credits:193 if self.context.total_credits > self.max_credits: 194 194 self.flash(_('Maximum credits of ${a} exceeded.', 195 195 mapping = {'a':self.max_credits})) -
main/waeup.uniben/trunk/src/waeup/uniben/students/browser_templates/studyleveleditpage.pt
r9686 r9688 5 5 Course Tickets 6 6 (Total Credits: 7 <span i18n:name="total_credits" tal:replace="view/total_credits">TOTAL</span>) 7 <span i18n:name="total_credits" 8 tal:replace="view/context/total_credits">TOTAL</span>) 8 9 </h3> 9 10 <table class="display dataTableManage"> -
main/waeup.uniben/trunk/src/waeup/uniben/students/browser_templates/studylevelpage.pt
r9686 r9688 20 20 </td> 21 21 <td> 22 <span tal:replace="view/total_credits">TOTAL</span> 22 <span tal:replace="view/context/total_credits">TOTAL</span> 23 </td> 24 </tr> 25 <tr> 26 <td i18n:translate=""> 27 Momentary GPA: 28 </td> 29 <td> 30 <span tal:replace="python: '%4.2f' % view.context.gpa">2.33</span> 23 31 </td> 24 32 </tr> -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r9686 r9688 342 342 # A level with one course ticket was created 343 343 self.assertEqual(self.student['studycourse']['100'].number_of_tickets, 1) 344 self.student['studycourse']['100']['COURSE1'].score = 55 344 345 self.browser.getLink("100").click() 346 # GPA has been properly calculated and is shown on the page 347 self.assertTrue('3.00' in self.browser.contents) 348 self.assertEqual(self.student['studycourse']['100'].gpa, 3.0) 349 # Score is not shown but grade 345 350 self.assertTrue('<th>Grade</th>' in self.browser.contents) 346 351 self.assertFalse('<th>Score</th>' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.