124
124
ctx['offering'] = self.context
125
125
ctx['errors'] = errors
127
class SubjectProjectSetView(XHTMLView):
128
"""View the ProjectSets for a subject."""
129
template = 'subject_projects.html'
132
def __init__(self, req, subject, year, semester):
133
self.context = req.store.find(Offering,
134
Offering.subject_id == Subject.id,
135
Subject.short_name == subject,
136
Offering.semester_id == Semester.id,
137
Semester.year == year,
138
Semester.semester == semester).one()
143
def populate(self, req, ctx):
144
self.plugin_styles[Plugin] = ["project.css"]
145
ctx['offering'] = self.context
147
class ProjectSetView(XHTMLView):
148
"""View the submissions for a ProjectSet"""
149
template = 'projectsubmissions.html'
128
152
class Plugin(ViewPlugin, MediaPlugin):
130
154
('subjects/', SubjectsView),
131
155
('subjects/:subject/:year/:semester/+enrolments/+new', EnrolView),
156
('subjects/:subject/:year/:semester/+projects', SubjectProjectSetView),