-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: add a view for browsering all the submissions within a cours…
…e, with tag filter enabled
- Loading branch information
1 parent
d20f05f
commit b8b2552
Showing
5 changed files
with
176 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 124 additions & 0 deletions
124
course/templates/course/staff/all_exercise_submissions.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
{% extends "course/course_base.html" %} | ||
{% load i18n %} | ||
{% load course %} | ||
{% load exercise %} | ||
{% load static %} | ||
{% load colortag %} | ||
|
||
{% block title %}{% translate "ALL_SUBMISSIONS" %} | {{ block.super }}{% endblock %} | ||
{% block view_tag %}{% translate "ALL_SUBMISSIONS" %}{% endblock %} | ||
|
||
{% block breadcrumblist %} | ||
{{ block.super }} | ||
<li class="active">{% translate "ALL_SUBMISSIONS" %}</li> | ||
{% endblock %} | ||
|
||
{% block columns %} | ||
<div class="col-md-12"> | ||
<div class="clearfix"> | ||
<p> | ||
{% if count <= default_limit and not limited %} | ||
{% blocktranslate trimmed with count=count url=all_url %} | ||
NUM_OF_SUBMISSIONS_DISPLAYED -- {{ count }}, {{ url }} | ||
{% endblocktranslate %} | ||
{% elif limited %} | ||
{% blocktranslate trimmed with limit=default_limit url=all_url %} | ||
NUM_OF_SUBMISSIONS_DISPLAYED_AND_SHOW_ALL_BTN -- {{ limit }}, {{ url }} | ||
{% endblocktranslate %} | ||
{% else %} | ||
{% blocktranslate trimmed with count=count url=not_all_url limit=default_limit %} | ||
NUM_OF_SUBMISSIONS_DISPLAYED_AND_SHOW_LATEST_BTN -- {{ count }}, {{ url }}, {{ limit }} | ||
{% endblocktranslate %} | ||
{% endif %} | ||
</p> | ||
</div> | ||
|
||
<p class="filter-submissions"> | ||
<small>{% trans "FILTER_SUBMISSIONS_BY_TAG" %}:</small> | ||
{% for tag in tags %} | ||
<button class="btn btn-default btn-xs filter-tag" style="background-color:{{ tag.color }};color:{{ tag.font_color }};" data-tagslug="{{ tag.slug }};" data-status="{{ tag.status }}" > | ||
<span class="glyphicon glyphicon-unchecked" aria-hidden="true"></span> | ||
{{ tag.name }} | ||
</button> | ||
{% endfor %} | ||
</p> | ||
|
||
<table class="table table-bordered{% if not limited or count < default_limit %} filtered-table ordered-table{% endif %}" id="submissions_table"> | ||
<thead> | ||
<tr> | ||
<th>{% translate "SUBMITTERS" %}</th> | ||
<th>{% translate "TIME" %}</th> | ||
<th>{% translate "STATUS" %}</th> | ||
<th>{% translate "GRADE" %}</th> | ||
<th>{% translate "TAGS" %}</th> | ||
|
||
<th | ||
data-filter-type="options" | ||
data-filter-options="{% translate 'YES' %}|{% translate 'NO' %}" | ||
data-order-disable="true" | ||
> | ||
{% translate "ASSESSED_MANUALLY" %} | ||
</th> | ||
<th data-filter-type="none" data-order-disable="true">{% translate "INSPECT" %}</th> | ||
<th>{% translate "EXERCISE" %}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for summary in submission_data %} | ||
<tr id="summary.submission-{{ summary.submission.id }}"> | ||
<td> | ||
{% profiles summary.submitters instance summary.is_teacher %} | ||
</td> | ||
<td data-datetime="{{ summary.submission.submission_time|date:'Y-m-d H:i:s' }}"> | ||
{{ summary.submission.submission_time|date:'DATETIME_SECONDS_FORMAT' }} | ||
{% if summary.submission.late_penalty_applied %} | ||
<span class="label label-warning"> | ||
{% blocktranslate trimmed with percent=summary.submission.late_penalty_applied|percent %} | ||
LATE_W_PENALTY -- {{ percent }} | ||
{% endblocktranslate %} | ||
</span> | ||
{% endif %} | ||
</td> | ||
<td> | ||
{{ summary.submission.status|submission_status }} | ||
</td> | ||
<td> | ||
{% format_points summary.submission.grade True True %} | ||
</td> | ||
<td id="submission_tags"> | ||
{% for tagging in summary.submission.submission_taggings.all %} | ||
{{ tagging.tag|colortag }} | ||
{% endfor %} | ||
</td> | ||
<td> | ||
{% if summary.submission.grader %} | ||
<span class="glyphicon glyphicon-ok"></span> | ||
{% translate "YES" %} | ||
{% else %} | ||
<span class="glyphicon glyphicon-remove"></span> | ||
{% translate "NO" %} | ||
{% endif %} | ||
</td> | ||
<td> | ||
<a href="{{ summary.submission|url:'submission-inspect' }}" class="aplus-button--secondary aplus-button--xs"> | ||
<span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span> | ||
{% translate "INSPECT" %} | ||
</a> | ||
</td> | ||
<td> | ||
<a href="{{ summary.exercise|url }}"> | ||
{{summary.exercise}} | ||
</a> | ||
</td> | ||
</tr> | ||
{% empty %} | ||
<tr> | ||
<td class="5">{% translate "NO_SUBMISSIONS" %}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<script src="{% static 'exercise/filter_submissions_by_tag.js' %}"></script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters