Changeset 9743


Ignore:
Timestamp:
30 Nov 2012, 09:02:08 (12 years ago)
Author:
Henrik Bettermann
Message:

Remove unused views.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r9738 r9743  
    20002000        hitlist = []
    20012001        for ticket in coursetickets:
     2002            # XXX: If students have registered the same courses twice
     2003            # they will be listed twice.
    20022004            hitlist.append(StudentQueryResultItem(ticket.student, view=self))
    2003         return hitlist
    2004 
    2005 class ShowStudentsInDepartmentPage(FilterStudentsInDepartmentPage):
    2006     """Page that lists all students in the department.
    2007     """
    2008     grok.context(IDepartment)
    2009     grok.require('waeup.showStudents')
    2010     grok.name('showdepstudents')
    2011     grok.template('showstudentspage')
    2012     pnav = 1
    2013     label = _('Students')
    2014 
    2015     @property
    2016     def getStudents(self):
    2017         hitlist = searchstudents(query=self.context.code,
    2018             searchtype='depcode', view=self)
    2019         return hitlist
    2020 
    2021     def update(self, *args, **kw):
    2022         datatable.need()
    2023         return
    2024 
    2025 class ShowStudentsInCertificatePage(ShowStudentsInDepartmentPage):
    2026     """Page that lists all students studying a certificate.
    2027     """
    2028     grok.context(ICertificate)
    2029     grok.name('showcertstudents')
    2030 
    2031     @property
    2032     def getStudents(self):
    2033         hitlist = searchstudents(query=self.context.code,
    2034             searchtype='certcode', view=self)
    2035         return hitlist
    2036 
    2037 class ShowStudentsInCoursePage(ShowStudentsInDepartmentPage):
    2038     """Page that lists all students studying a certificate.
    2039     """
    2040     grok.context(ICourse)
    2041     grok.name('showcoursestudents')
    2042 
    2043     @property
    2044     def getStudents(self):
    2045         hitlist = []
    2046         cat = queryUtility(ICatalog, name='coursetickets_catalog')
    2047         results = cat.searchResults(code=(self.context.code, self.context.code))
    2048         for result in results:
    2049             hitlist.append(StudentQueryResultItem(result.student, view=self))
    20502005        return hitlist
    20512006
Note: See TracChangeset for help on using the changeset viewer.