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

« back to all changes in this revision

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

Merge from submissions-admin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
        self.plugin_styles[Plugin] = ["project.css"]
169
169
        self.plugin_scripts[Plugin] = ["project.js"]
170
170
        ctx['offering'] = self.context
171
 
        ctx['subject'] = self.context.subject.short_name
172
 
        ctx['year'] = self.context.semester.year
173
 
        ctx['semester'] = self.context.semester.semester
174
 
 
175
171
        ctx['projectsets'] = []
176
172
 
177
173
        #Open the projectset Fragment, and render it for inclusion
187
183
        for projectset in self.context.project_sets:
188
184
            settmpl = loader.load(set_fragment)
189
185
            setCtx = Context()
190
 
            setCtx['group_size'] = projectset.max_students_per_group
191
 
            setCtx['projectset_id'] = projectset.id
 
186
            setCtx['projectset'] = projectset
192
187
            setCtx['new_project_url'] = self.new_project_url(projectset)
193
188
            setCtx['projects'] = []
194
189
 
233
228
        for assessed in self.context.assesseds:
234
229
            if assessed.submissions.count() > 0:
235
230
                ctx['submissions'].append(
236
 
                        assessed.submissions.order_by(ProjectSubmission.date_submitted)[-1])
237
 
 
 
231
                        assessed.submissions.order_by(
 
232
                            ProjectSubmission.date_submitted)[-1])
 
233
        ctx['assigned'] = self.context.project_set.get_assigned()
238
234
 
239
235
class Plugin(ViewPlugin, MediaPlugin):
240
236
    urls = [