Add time answered
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{% load help_tags %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container py-4">
|
||||
<div class="container py-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-lg-10">
|
||||
<div class="card shadow mb-4">
|
||||
@@ -35,6 +35,7 @@
|
||||
<th>Answer Value</th>
|
||||
<th style="width: 100px;">Score</th>
|
||||
<th>Comment</th>
|
||||
<th>Time answered</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -60,6 +61,13 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><small class="text-muted">{{ rev.comment|default:"-" }}</small></td>
|
||||
<td>
|
||||
{% if rev.time_answered %}
|
||||
{{ rev.time_answered }}
|
||||
{% else %}
|
||||
<span class="text-muted
|
||||
">-</span>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@@ -98,5 +106,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -5347,6 +5347,7 @@ def view_answer_history(request, app_name, model_name, pk):
|
||||
elif model_name.lower() == "useranswer" and app_name.lower() == "physics":
|
||||
ans_text = f"A: {fields.get('a')}, B: {fields.get('b')}, C: {fields.get('c')}, D: {fields.get('d')}, E: {fields.get('e')}"
|
||||
|
||||
|
||||
history_data.append({
|
||||
"revision_id": v.revision_id,
|
||||
"date": v.revision.date_created,
|
||||
@@ -5354,6 +5355,7 @@ def view_answer_history(request, app_name, model_name, pk):
|
||||
"answer_text": ans_text,
|
||||
"score": fields.get("score", ""),
|
||||
"comment": v.revision.comment,
|
||||
"time_answered": fields.get("time_answered", ""),
|
||||
})
|
||||
|
||||
context = {
|
||||
|
||||
Reference in New Issue
Block a user