This commit is contained in:
Ross
2021-12-09 17:38:35 +00:00
parent c4ce73b649
commit cf016e6991
3 changed files with 16 additions and 0 deletions
@@ -16,6 +16,7 @@
{% if request.user.is_superuser %}
<a href="{% url 'admin:anatomy_anatomyquestion_change' question.id %}"
title="Edit the Question using the admin interface">Admin Edit</a>
<a href="{% url 'anatomy:question_user_answers' question.id %}" title="View user answers associated with this question">User answers</a>
{% endif %}
{% if exam %}
<div>
@@ -0,0 +1,10 @@
{% extends 'anatomy/base.html' %}
{% block content %}
<ul>
{% for answer in answers %}
<li><a href="{% url 'anatomy:user_answer_view' pk=answer.pk %}">{{answer}}</a></li>
{% endfor %}
</ul>
{% endblock %}
+5
View File
@@ -42,6 +42,11 @@ urlpatterns = [
views.QuestionDelete.as_view(),
name="question_delete",
),
path(
"question/<int:pk>/user_answers",
views.GenericViews.question_user_answers,
name="question_user_answers",
),
path(
"exam/<int:pk>/review",
views.GenericViews.question_review,