Add time answered
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
<th>Answer Value</th>
|
<th>Answer Value</th>
|
||||||
<th style="width: 100px;">Score</th>
|
<th style="width: 100px;">Score</th>
|
||||||
<th>Comment</th>
|
<th>Comment</th>
|
||||||
|
<th>Time answered</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -60,6 +61,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td><small class="text-muted">{{ rev.comment|default:"-" }}</small></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>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -5347,6 +5347,7 @@ def view_answer_history(request, app_name, model_name, pk):
|
|||||||
elif model_name.lower() == "useranswer" and app_name.lower() == "physics":
|
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')}"
|
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({
|
history_data.append({
|
||||||
"revision_id": v.revision_id,
|
"revision_id": v.revision_id,
|
||||||
"date": v.revision.date_created,
|
"date": v.revision.date_created,
|
||||||
@@ -5354,6 +5355,7 @@ def view_answer_history(request, app_name, model_name, pk):
|
|||||||
"answer_text": ans_text,
|
"answer_text": ans_text,
|
||||||
"score": fields.get("score", ""),
|
"score": fields.get("score", ""),
|
||||||
"comment": v.revision.comment,
|
"comment": v.revision.comment,
|
||||||
|
"time_answered": fields.get("time_answered", ""),
|
||||||
})
|
})
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
|
|||||||
Reference in New Issue
Block a user