This commit is contained in:
Ross
2021-09-21 18:23:23 +01:00
parent e4fba3eff3
commit 9a464eb43a
7 changed files with 27 additions and 13 deletions
+2 -2
View File
@@ -36,8 +36,8 @@
<br /> <br />
{{ question.question_type }}: {{ question.get_primary_answer }} {{ question.question_type }}: {{ question.get_primary_answer }}
<br /> <br />
Modality: {{ question.modality }}, <a href="{% url 'anatomy:question_detail' pk=question.pk %}">View</a>, <a href="{% url 'anatomy:mark' pk=exam.pk sk=forloop.counter0 %}">Mark</a> Modality: {{ question.modality }}, <a href="{% url 'anatomy:mark' pk=exam.pk sk=forloop.counter0 %}">Mark</a>
<span class="id">[id: {{question.pk}}]</span> <span class="id"><a href="{% url 'anatomy:question_detail' pk=question.pk %}">[id: {{question.pk}}]</a></span>
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>
@@ -9,6 +9,8 @@
<a href="{% url 'anatomy:anatomy_question_update' question.id %}" title="Edit the Question">Edit</a> <a href="{% url 'anatomy:anatomy_question_update' question.id %}" title="Edit the Question">Edit</a>
<a href="{% url 'anatomy:question_clone' question.id %}" title="Clone the Question">Clone</a> <a href="{% url 'anatomy:question_clone' question.id %}" title="Clone the Question">Clone</a>
<a href="{% url 'anatomy:question_delete' pk=question.pk %}" title="Delete the Question">Delete</a> <a href="{% url 'anatomy:question_delete' pk=question.pk %}" title="Delete the Question">Delete</a>
<a href="{% url 'anatomy:question_delete' pk=question.pk %}" title="Delete the Question">Delete</a>
<a href="{% url 'feedback_create' question_type='anatomy' pk=question.pk %}"> Add Note</a>
<a href="{% url 'admin:anatomy_anatomyquestion_change' question.id %}" <a href="{% url 'admin:anatomy_anatomyquestion_change' question.id %}"
title="Edit the Question using the admin interface">Admin Edit</a> title="Edit the Question using the admin interface">Admin Edit</a>
{% if exam %} {% if exam %}
@@ -64,6 +66,7 @@
<div> <div>
Open access: {{ question.open_access }} Open access: {{ question.open_access }}
</div> </div>
{% include 'question_notes.html' %}
<div> <div>
<span id="annotation-json-toggle">Annotation JSON (+/-):</span> <span id="annotation-json-content"> <span id="annotation-json-toggle">Annotation JSON (+/-):</span> <span id="annotation-json-content">
<pre>{{ question.image_annotations }}</pre> <pre>{{ question.image_annotations }}</pre>
+6 -1
View File
@@ -35,7 +35,9 @@ from longs.models import Exam as LongExam
from anatomy.models import AnatomyQuestion as AnatomyQuestion from anatomy.models import AnatomyQuestion as AnatomyQuestion
from anatomy.models import Exam as AnatomyExam from anatomy.models import Exam as AnatomyExam
from sbas.models import Question as SbasQuestion from sbas.models import Question as SbasQuestion
from sbas.models import Exam as SbasExam #from sbas.models import Exam as SbasExam
from physics.models import Question as PhysicsQuestion
#from physics.models import Exam as PhysicsExam
from django.db.models import Case, When from django.db.models import Case, When
from django.conf import settings from django.conf import settings
@@ -58,6 +60,9 @@ def get_question_and_content_type(question_type):
elif question_type == "sbas": elif question_type == "sbas":
question = SbasQuestion question = SbasQuestion
content_type = ContentType.objects.get(app_label="sbas", model="question") content_type = ContentType.objects.get(app_label="sbas", model="question")
elif question_type == "physics":
question = PhysicsQuestion
content_type = ContentType.objects.get(app_label="physics", model="question")
else: else:
raise PermissionError() raise PermissionError()
@@ -5,6 +5,9 @@
{% load thumbnail %} {% load thumbnail %}
<div class="physics"> <div class="physics">
<h1>Exam: {{ exam.name }}</h1> <h1>Exam: {{ exam.name }}</h1>
{% include 'exam_notes.html' %}
This exam has {{question_number}} questions. This exam has {{question_number}} questions.
<div class="parent-help" title="Click to enable / disable the exam"> <div class="parent-help" title="Click to enable / disable the exam">
@@ -2,6 +2,7 @@
{% block content %} {% block content %}
<div class="question"> <div class="question">
<a href="{% url 'feedback_create' question_type='physics' pk=question.pk %}"> Add Note</a>
<a href="{% url 'admin:physics_question_change' question.id %}" title="Edit the Question using the admin interface">Admin Edit</a> <a href="{% url 'admin:physics_question_change' question.id %}" title="Edit the Question using the admin interface">Admin Edit</a>
<div class="date"> <div class="date">
Created: {{ question.created_date|date:"d/m/Y" }} Created: {{ question.created_date|date:"d/m/Y" }}
@@ -32,5 +33,6 @@
{{ author }}, {{ author }},
{% endfor %} {% endfor %}
</div> </div>
{% include 'question_notes.html' %}
</div> </div>
{% endblock %} {% endblock %}
+9 -9
View File
@@ -1,18 +1,18 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} {% block title %}
Sbas Sbas
{% endblock %} {% endblock %}
{% block navigation %} {% block navigation %}
Sbas: Sbas:
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<a href="{% url 'sbas:exam_list' %}">Exams</a> / <a href="{% url 'sbas:exam_list' %}">Exams</a> /
<a href="{% url 'sbas:question_view' %}">Questions</a> <a href="{% url 'sbas:question_view' %}">Questions</a>
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
/ <a href="{% url 'sbas:user_answer_table_view' %}" title="User answers">Answers</a> / <a href="{% url 'sbas:user_answer_table_view' %}" title="User answers">Answers</a>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% endblock %} {% endblock %}
+1
View File
@@ -4,6 +4,7 @@
<div class="question"> <div class="question">
<a href="{% url 'admin:sbas_question_change' question.id %}" <a href="{% url 'admin:sbas_question_change' question.id %}"
title="Edit the Question using the admin interface">Admin Edit</a> title="Edit the Question using the admin interface">Admin Edit</a>
<a href="{% url 'feedback_create' question_type='sbas' pk=question.pk %}"> Add Note</a>
<div class="date"> <div class="date">
Created: {{ question.created_date|date:"d/m/Y"}} Created: {{ question.created_date|date:"d/m/Y"}}
</div> </div>