diff --git a/anatomy/migrations/0028_exam_post_survey_exam_pre_survey.py b/anatomy/migrations/0028_exam_post_survey_exam_pre_survey.py new file mode 100644 index 00000000..347d710f --- /dev/null +++ b/anatomy/migrations/0028_exam_post_survey_exam_pre_survey.py @@ -0,0 +1,25 @@ +# Generated by Django 6.0.1 on 2026-06-28 20:59 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('anatomy', '0027_alter_anatomyquestion_primary_answer_and_more'), + ('survey', '__first__'), + ] + + operations = [ + migrations.AddField( + model_name='exam', + name='post_survey', + field=models.ForeignKey(blank=True, help_text='Survey to be filled out AFTER completing this collection/exam.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_post_surveys', to='survey.survey'), + ), + migrations.AddField( + model_name='exam', + name='pre_survey', + field=models.ForeignKey(blank=True, help_text='Survey to be filled out BEFORE taking this collection/exam.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_pre_surveys', to='survey.survey'), + ), + ] diff --git a/atlas/forms.py b/atlas/forms.py index cb52a0ca..83185669 100755 --- a/atlas/forms.py +++ b/atlas/forms.py @@ -361,6 +361,8 @@ class CaseCollectionForm(ModelForm): "question_time_limit", "answer_entry_grace_period", "prerequisites", + "pre_survey", + "post_survey", Fieldset( "Custom Start Screen", "start_screen_content", diff --git a/atlas/migrations/0109_casecollection_post_survey_casecollection_pre_survey.py b/atlas/migrations/0109_casecollection_post_survey_casecollection_pre_survey.py new file mode 100644 index 00000000..15b70f00 --- /dev/null +++ b/atlas/migrations/0109_casecollection_post_survey_casecollection_pre_survey.py @@ -0,0 +1,25 @@ +# Generated by Django 6.0.1 on 2026-06-28 20:59 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('atlas', '0108_multiusersession'), + ('survey', '__first__'), + ] + + operations = [ + migrations.AddField( + model_name='casecollection', + name='post_survey', + field=models.ForeignKey(blank=True, help_text='Survey to be filled out AFTER completing this collection/exam.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_post_surveys', to='survey.survey'), + ), + migrations.AddField( + model_name='casecollection', + name='pre_survey', + field=models.ForeignKey(blank=True, help_text='Survey to be filled out BEFORE taking this collection/exam.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_pre_surveys', to='survey.survey'), + ), + ] diff --git a/atlas/templates/atlas/collection_take_overview.html b/atlas/templates/atlas/collection_take_overview.html index 9115b90f..890fdee0 100644 --- a/atlas/templates/atlas/collection_take_overview.html +++ b/atlas/templates/atlas/collection_take_overview.html @@ -51,6 +51,18 @@ + {% if post_survey_url %} +
Please take a moment to complete the feedback survey for this case collection.
+The platform supports reusable and shareable feedback forms and surveys that can be configured by administrators and staff to assess educational improvement and collect feedback.
+ +Surveys can also be distributed as standalone links (e.g. /survey/take/<id>/) for general platform feedback or course evaluation not tied to a specific exam.
Are you sure you want to delete the survey "{{ survey.name }}"?
+This action will permanently delete all associated questions, responses, and answers.
+ + +Create and manage reusable feedback forms and post-exam surveys.
+| Survey Name | +Created By | +Questions | +Responses | +Status | +Type | +Actions | +
|---|---|---|---|---|---|---|
| + {{ survey.name }} + {% if survey.description %} + {{ survey.description }} + {% endif %} + | +{{ survey.created_by.username|default:"System" }} | ++ {{ survey.questions.count }} + | ++ {{ survey.responses.count }} + | ++ {% if survey.active %} + Active + {% else %} + Inactive + {% endif %} + | ++ {% if survey.anonymous %} + Anonymous + {% else %} + Standard + {% endif %} + | ++ + | +
| + + No surveys created yet. Click "Create Survey" to get started. + | +||||||
Add, reorder, or remove questions in this survey.
+No questions added yet. Use the form on the right to add your first question.
+ {% endif %} +Analytics and details for the feedback questions.
+Answers: {{ item.answers_count }} / {{ responses_count }} submissions
+ + + {% if item.question.question_type == 'RATING' %} +No choice options selected yet.
+ {% endfor %} +{{ ans|linebreaksbr }}
+No text responses submitted yet.
+ {% endfor %} +{{ survey.description|linebreaksbr }}
+ {% endif %} + {% if pre_or_post == 'PRE' %} +Your feedback has been successfully submitted. We appreciate your response.
+ + + Continue + +