~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/subject.py

  • Committer: Matt Giuca
  • Date: 2009-12-08 06:34:19 UTC
  • Revision ID: matt.giuca@gmail.com-20091208063419-yl88zjiw4oh5l2fp
Added a new view under Offering/+enrolments to display all staff and students in an offering.

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
    user = formencode.All(NoEnrolmentValidator(), UserValidator())
100
100
 
101
101
 
 
102
class EnrolmentsView(XHTMLView):
 
103
    """A page which displays all users enrolled in an offering."""
 
104
    template = 'templates/enrolments.html'
 
105
    permission = 'edit'
 
106
 
 
107
    def populate(self, req, ctx):
 
108
        ctx['offering'] = self.context
 
109
 
102
110
class EnrolView(XHTMLView):
103
111
    """A form to enrol a user in an offering."""
104
112
    template = 'templates/enrol.html'
216
224
    reverse_routes = (subject_url, offering_url, projectset_url, project_url)
217
225
 
218
226
    views = [(ApplicationRoot, ('subjects', '+index'), SubjectsView),
 
227
             (Offering, ('+enrolments', '+index'), EnrolmentsView),
219
228
             (Offering, ('+enrolments', '+new'), EnrolView),
220
229
             (Offering, ('+projects', '+index'), OfferingProjectsView),
221
230
             (Project, '+index', ProjectView),