Changeset 13764 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 7 Mar 2016, 08:56:46 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r13617 r13764 508 508 grok.view(CoursePage) 509 509 grok.name('showcoursestudents') 510 grok.require('waeup. showStudents')510 grok.require('waeup.viewStudent') 511 511 icon = 'actionicon_student.png' 512 512 text = _('Show students') -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r13711 r13764 3023 3023 """ 3024 3024 grok.context(ICourse) 3025 grok.require('waeup.viewStudent') 3025 3026 3026 3027 session_label = _('Session') -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r13711 r13764 1793 1793 self.app['users']['mrslecturer'].email = 'mrslecturer@foo.ng' 1794 1794 self.app['users']['mrslecturer'].title = u'Mercedes Benz' 1795 # Add course ticket 1796 studylevel = createObject(u'waeup.StudentStudyLevel') 1797 studylevel.level = 100 1798 studylevel.level_session = 2004 1799 self.student['studycourse'].addStudentStudyLevel( 1800 self.certificate, studylevel) 1795 1801 # Assign local Lecturer role for a certificate. 1796 1802 course = self.app['faculties']['fac1']['dep1'].courses['COURSE1'] … … 1822 1828 self.browser.getLink( 1823 1829 "http://localhost/app/faculties/fac1/dep1/courses/COURSE1").click() 1824 # ... and view the list of students 1825 self.browser.getLink("Show students").click() 1826 self.browser.getControl(name="session").value = ['2004'] 1827 self.browser.getControl(name="level").value = ['100'] 1828 self.browser.getControl("Show").click() 1829 self.assertTrue('No student found.' in self.browser.contents) 1830 # No student in course so far. 1831 self.assertFalse(self.student_id in self.browser.contents) 1832 studylevel = createObject(u'waeup.StudentStudyLevel') 1833 studylevel.level = 100 1834 studylevel.level_session = 2004 1835 self.student['studycourse'].addStudentStudyLevel( 1836 self.certificate, studylevel) 1837 # Now the student has registered the course and can 1838 # be seen by the lecturer. 1839 self.browser.open("http://localhost/app/faculties/fac1/dep1/courses/COURSE1/students") 1840 self.browser.getControl(name="session").value = ['2004'] 1841 self.browser.getControl(name="level").value = ['100'] 1842 self.browser.getControl("Show").click() 1843 self.assertTrue(self.student_id in self.browser.contents) 1844 # Lecturer can neither access the student ... 1830 # Lecturers can neither filter students ... 1831 self.assertRaises( 1832 Unauthorized, self.browser.open, 1833 "http://localhost/app/faculties/fac1/dep1/courses/COURSE1/students") 1834 # ... nor access the student ... 1845 1835 self.assertRaises( 1846 1836 Unauthorized, self.browser.open, self.student_path)
Note: See TracChangeset for help on using the changeset viewer.