Changeset 9565 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 7 Nov 2012, 08:27:23 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9545 r9565 62 62 63 63 from waeup.kofa.students.catalog import search as searchstudents 64 from waeup.kofa.students.catalog import StudentQueryResultItem 64 65 from waeup.kofa.university.catalog import search 65 66 from waeup.kofa.university.vocabularies import course_levels … … 1890 1891 """ 1891 1892 grok.context(ICertificate) 1892 grok.require('waeup.showStudents')1893 1893 grok.name('showcertstudents') 1894 pnav = 11895 label = _('Students')1896 1894 1897 1895 @property … … 1899 1897 hitlist = searchstudents(query=self.context.code, 1900 1898 searchtype='certcode', view=self) 1899 return hitlist 1900 1901 class ShowStudentsInCoursePage(ShowStudentsInDepartmentPage): 1902 """Page that lists all students studying a certificate. 1903 """ 1904 grok.context(ICourse) 1905 grok.name('showcoursestudents') 1906 1907 @property 1908 def getStudents(self): 1909 hitlist = [] 1910 cat = queryUtility(ICatalog, name='coursetickets_catalog') 1911 results = cat.searchResults(code=(self.context.code, self.context.code)) 1912 for result in results: 1913 hitlist.append(StudentQueryResultItem(result.student, view=self)) 1901 1914 return hitlist 1902 1915 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r9274 r9565 452 452 text = _('Manage certificate') 453 453 454 class ShowCourseStudentsActionButton(ManageActionButton): 455 """ 'Show students' button in course. 456 """ 457 grok.context(ICourse) 458 grok.view(CoursePage) 459 grok.require('waeup.showStudents') 460 icon = 'actionicon_student.png' 461 text = _('Show students') 462 target = 'showcoursestudents' 463 454 464 class ShowCertificateStudentsActionButton(ManageActionButton): 455 465 """ 'Show students' button for certificates.
Note: See TracChangeset for help on using the changeset viewer.