Changeset 14453 for main/waeup.aaue/trunk/src/waeup/aaue
- Timestamp:
- 24 Jan 2017, 09:32:47 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r14385 r14453 675 675 """ Page to display course tickets 676 676 """ 677 form_fields = grok.AutoFields(ICustomCourseTicket) 677 678 @property 679 def show_results(self): 680 isStudent = getattr( 681 self.request.principal, 'user_type', None) == 'student' 682 if isStudent: 683 return False 684 return True 685 686 @property 687 def form_fields(self): 688 if self.show_results: 689 return grok.AutoFields(ICustomCourseTicket) 690 else: 691 return grok.AutoFields(ICustomCourseTicket).omit('score').omit('ca') 678 692 679 693 class CustomCourseTicketManageFormPage(CourseTicketManageFormPage): -
main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studylevelpage.pt
r14000 r14453 28 28 <th i18n:translate="">Cred.</th> 29 29 <th i18n:translate="">Requ.</th> 30 <th i18n:translate="" >Score</th>31 <th i18n:translate="" >CA</th>32 <th i18n:translate="" >Grade</th>30 <th i18n:translate="" tal:condition="view/show_results" >Score</th> 31 <th i18n:translate="" tal:condition="view/show_results" >CA</th> 32 <th i18n:translate="" tal:condition="view/show_results" >Grade</th> 33 33 <th i18n:translate="">CO</th> 34 34 <th i18n:translate="">Auto</th> … … 49 49 <td tal:condition="view/show_results" tal:content="value/ca|nothing">CA</td> 50 50 <td tal:condition="view/show_results" tal:content="value/grade|nothing">GRADE</td> 51 <td tal:con dition="view/show_results" tal:content="value/carry_over">CO</td>51 <td tal:content="value/carry_over">CO</td> 52 52 <td tal:content="value/automatic">AUTO</td> 53 53 </tr> -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r14384 r14453 833 833 print "Sample PDF pg_course_registration_slip.pdf written to %s" % path 834 834 835 # Students cant' view scores, cas and grades. 836 self.browser.open(self.student_path + '/studycourse/100') 837 self.assertFalse('Score' in self.browser.contents) 838 self.assertFalse('CA' in self.browser.contents) 839 self.assertFalse('Grade' in self.browser.contents) 840 self.browser.getLink("COURSE1").click() 841 self.browser.open(self.student_path + '/studycourse/100') 842 self.assertFalse('Score' in self.browser.contents) 843 self.assertFalse('CA' in self.browser.contents) 844 self.assertFalse('Grade' in self.browser.contents) 845 835 846 def test_student_2nd_semester_course_registration(self): 836 847 IWorkflowState(self.student).setState('school fee paid')
Note: See TracChangeset for help on using the changeset viewer.