diff --git a/anatomy/forms.py b/anatomy/forms.py index c9541749..1c47f28d 100644 --- a/anatomy/forms.py +++ b/anatomy/forms.py @@ -203,4 +203,4 @@ class BodyPartForm(ModelForm): class ExamForm(ModelForm): class Meta: model = Exam - fields = ["name", "time_limit", "exam_mode", "active"] \ No newline at end of file + fields = ["name", "time_limit", "exam_mode", "active", "archive"] \ No newline at end of file diff --git a/anatomy/migrations/0044_auto_20210816_1306.py b/anatomy/migrations/0044_auto_20210816_1306.py new file mode 100644 index 00000000..8d51aebd --- /dev/null +++ b/anatomy/migrations/0044_auto_20210816_1306.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.6 on 2021-08-16 12:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('anatomy', '0043_rename_json_creation_id_exam_exam_json_id'), + ] + + operations = [ + migrations.AddField( + model_name='exam', + name='archive', + field=models.BooleanField(default=False, help_text='Archived exams will remain on the test system but will not be displayed by default'), + ), + migrations.AlterField( + model_name='exam', + name='active', + field=models.BooleanField(default=False, help_text='If an exam should be available to take'), + ), + ] diff --git a/anatomy/static/css/anatomy.css b/anatomy/static/css/anatomy.css index ee13097a..6267450b 100644 --- a/anatomy/static/css/anatomy.css +++ b/anatomy/static/css/anatomy.css @@ -22,7 +22,7 @@ a, a:link { .answer-list .answer:hover{ z-index: 99999; position: relative; - background: rgba(167, 167, 167, 0.7); + background: black; } .answer-list .correct { @@ -34,6 +34,9 @@ a, a:link { content: " [Score = 2]"; font-size: small; } +.answer-list.rapid .correct::after{ + content: " [Score = 1]"; +} .answer-list .half-correct { color: yellow; @@ -43,6 +46,9 @@ a, a:link { content: " [Score = 1]"; font-size: small; } +.answer-list.rapid .half-correct::after{ + content: " [Score = 0.5]"; +} .answer-list .incorrect { color: red; @@ -507,6 +513,7 @@ td.user-answer-score-2::after { border: 1px dotted gray; opacity: 20%; border-radius: 4px; + display: none; } .published-icon:hover { @@ -517,10 +524,23 @@ td.user-answer-score-2::after { border: 1px solid purple; color: purple; opacity: 100%; + display: inline-block; } textarea, input { border-radius: 2px; background-color: #343a40; color: lightgray; + } + + .exam-list li, #full-question-list li { + display: flex; + } + + .exam-list li .flex-col, #full-question-list li .flex-col { + flex: 1; + } + +#full-question-list li .flex-col-4 { + flex: 4; } \ No newline at end of file diff --git a/anatomy/tables.py b/anatomy/tables.py index f96de558..5a6f6b34 100644 --- a/anatomy/tables.py +++ b/anatomy/tables.py @@ -58,7 +58,7 @@ class AnatomyQuestionTable(tables.Table): class AnatomyUserAnswerTable(tables.Table): select = tables.CheckBoxColumn(accessor=("pk")) delete = tables.LinkColumn( - "anatomy:anatomy_user_answer_delete", text="Delete", args=[A("pk")], orderable=False + "anatomy:user_answer_delete", text="Delete", args=[A("pk")], orderable=False ) class Meta: model = CidUserAnswer diff --git a/anatomy/templates/anatomy/exam_list.html b/anatomy/templates/anatomy/exam_list.html index 04388808..fb646100 100644 --- a/anatomy/templates/anatomy/exam_list.html +++ b/anatomy/templates/anatomy/exam_list.html @@ -4,22 +4,22 @@
{{ answer }}
@@ -30,7 +30,7 @@ Region: {{ question.get_regions }}, Abnormalities: {{ question.get_abnormalities
{% endfor %}
{{ answer }}
@@ -47,7 +47,7 @@ Region: {{ question.get_regions }}, Abnormalities: {{ question.get_abnormalities