Skip to content

Commit

Permalink
show grading progress and average in assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
IonMich committed Oct 8, 2022
1 parent 968c066 commit 8085a45
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions assignments/templates/assignments/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,38 @@
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{{assignment.course.get_absolute_url}}">{{assignment.course.course_code}}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{assignment.name}}</li>
<li class="breadcrumb-item active" aria-current="page">{{assignment.name}}
<span class="badge bg-dark" title="Average Grade">
{% if assignment.get_grading_progress != 0 %}
{{assignment.get_average_grade}}
{% else %}
-
{% endif %}/ {{ assignment.max_score }}
</span>
</li>
</ol>
</nav>

<h1> {{assignment.name}} </h1>

{% comment %} show the assignment grading progress and the average grade {% endcomment %}
<h1>
{{ assignment.name }}
<span class="badge bg-light text-dark" title="Percentage Graded">
{{ assignment.get_grading_progress }} %
</span>
</h1>

{% if assignment.description %}
<p> {{assignment.description}} </p>
{% comment %} show description if it exists in italics {% endcomment %}
<div class="alert alert-info" role="alert" style="max-height: 200px; overflow-y: scroll; max-width: 500px;">
<i class="text-muted">
{{assignment.description | safe}}
</i>
</div>
{% endif %}



{% comment %} list assignment submissions {% endcomment %}
<div class="row mt-4">
{% if qs %}
Expand Down

0 comments on commit 8085a45

Please sign in to comment.