From 2da8eb771271c67352fa15bb1913b1f8eb590d73 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Wed, 17 Aug 2022 16:36:16 +0100 Subject: [PATCH] Added cross-reference to question viewer Changed question number countint to be consistent with viewer --- ref-test/app/admin/static/js/script.js | 10 +++++++--- ref-test/app/admin/templates/admin/result-detail.html | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ref-test/app/admin/static/js/script.js b/ref-test/app/admin/static/js/script.js index 3b45528..caaee59 100644 --- a/ref-test/app/admin/static/js/script.js +++ b/ref-test/app/admin/static/js/script.js @@ -242,6 +242,10 @@ $('.adjustment-delete').click(function(event){ event.preventDefault() }) - - event.preventDefault(); -}); \ No newline at end of file + +// Detailed Results view questions +$('.view-full-questions').click(function(event) { + var dataset = $(this).data('dataset') + window.open(`/admin/view/${dataset}`, '_blank') + event.preventDefault() +}) \ No newline at end of file diff --git a/ref-test/app/admin/templates/admin/result-detail.html b/ref-test/app/admin/templates/admin/result-detail.html index 4c60d80..6a8bd6b 100644 --- a/ref-test/app/admin/templates/admin/result-detail.html +++ b/ref-test/app/admin/templates/admin/result-detail.html @@ -114,7 +114,7 @@ {{ scores.scored }} - {{scores.max}} + {{ scores.max }} {% endfor %} @@ -131,6 +131,7 @@
+ View Questions @@ -146,7 +147,7 @@ {% for question, answer in entry.answers.items() %}
- {{ question }} + {{ question|int + 1 }} {{ answers[question|int][answer|int] }}