.
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
{% extends 'anatomy/base.html' %}
|
||||
|
||||
{% block navigation %}
|
||||
{{block.super}}
|
||||
<br/>
|
||||
Exams: {{exam.name}}-> <a href="{% url 'anatomy:exam_overview' pk=exam.pk %}">Overview</a> / <a href="{% url 'anatomy:mark_overview' pk=exam.pk %}">Mark</a> / <a href="{% url 'anatomy:exam_scores_cid' pk=exam.pk %}">Scores</a>
|
||||
{% endblock %}
|
||||
{{block.super}}
|
||||
<br/>
|
||||
Exams: {{exam.name}}->
|
||||
<a href="{% url 'anatomy:exam_overview' pk=exam.pk %}">Overview</a> /
|
||||
{% if exam.exam_mode %}
|
||||
<a href="{% url 'anatomy:mark_overview' pk=exam.pk %}">Mark</a> /
|
||||
<a href="{% url 'anatomy:exam_scores_cid' pk=exam.pk %}">Scores</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'anatomy:anatomy_create_exam' pk=exam.pk %}">Add New Question</a>
|
||||
{% endblock %}
|
||||
|
||||
@@ -20,6 +20,7 @@ urlpatterns = [
|
||||
views.AnatomyQuestionCreate.as_view(),
|
||||
name="anatomy_question_create",
|
||||
),
|
||||
path("create/exam/<int:pk>", views.AnatomyQuestionCreate.as_view(), name="anatomy_create_exam"),
|
||||
path(
|
||||
"question/<int:pk>/update",
|
||||
views.AnatomyQuestionUpdate.as_view(),
|
||||
|
||||
+7
-1
@@ -730,7 +730,13 @@ class AnatomyQuestionCreate(AnatomyQuestionCreateBase):
|
||||
# initial = {'laterality': AnatomyQuestion.NONE}
|
||||
|
||||
def get_initial(self):
|
||||
pass
|
||||
if "pk" in self.kwargs:
|
||||
initial = super().get_initial()
|
||||
exam = get_object_or_404(Exam, pk=self.kwargs["pk"])
|
||||
|
||||
initial["exams"] = [exam.id]
|
||||
|
||||
return initial
|
||||
|
||||
|
||||
# # There has to be a better way...
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
{% extends 'rapids/base.html' %}
|
||||
|
||||
{% block navigation %}
|
||||
{{block.super}}
|
||||
<br/>
|
||||
Exams: {{exam.name}}-> <a href="{% url 'rapids:exam_overview' pk=exam.pk %}">Overview</a> / <a href="{% url 'rapids:mark_overview' pk=exam.pk %}">Mark</a> / <a href="{% url 'rapids:exam_scores_cid' pk=exam.pk %}">Scores</a> / <a href="{% url 'rapids:rapid_create_exam' pk=exam.pk %}">Add Question</a>
|
||||
{% endblock %}
|
||||
{{block.super}}
|
||||
<br/>
|
||||
Exams: {{exam.name}}->
|
||||
<a href="{% url 'rapids:exam_overview' pk=exam.pk %}">Overview</a> /
|
||||
{% if exam.exam_mode %}
|
||||
<a href="{% url 'rapids:mark_overview' pk=exam.pk %}">Mark</a> /
|
||||
<a href="{% url 'rapids:exam_scores_cid' pk=exam.pk %}">Scores</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'rapids:rapid_create_exam' pk=exam.pk %}">Add New Question</a>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user