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

« back to all changes in this revision

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

ProjectView now uses Project.latest_submissions, rather than miscalculating itself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
        ctx['format_datetime_short'] = ivle.date.format_datetime_for_paragraph
223
223
        ctx['project'] = self.context
224
224
 
225
 
        ctx['submissions'] = []
226
 
        for assessed in self.context.assesseds:
227
 
            if assessed.submissions.count() > 0:
228
 
                ctx['submissions'].append(
229
 
                        assessed.submissions.order_by(
230
 
                            ProjectSubmission.date_submitted)[-1])
231
 
 
232
225
class Plugin(ViewPlugin, MediaPlugin):
233
226
    urls = [
234
227
        ('subjects/', SubjectsView),