Added cross-reference to question viewer

Changed question number countint to be consistent with viewer
This commit is contained in:
Vivek Santayana 2022-08-17 16:36:16 +01:00
parent 3a0abaac6a
commit 2da8eb7712
2 changed files with 10 additions and 5 deletions

View File

@ -243,5 +243,9 @@ $('.adjustment-delete').click(function(event){
event.preventDefault()
})
event.preventDefault();
});
// Detailed Results view questions
$('.view-full-questions').click(function(event) {
var dataset = $(this).data('dataset')
window.open(`/admin/view/${dataset}`, '_blank')
event.preventDefault()
})

View File

@ -114,7 +114,7 @@
{{ scores.scored }}
</td>
<td>
{{scores.max}}
{{ scores.max }}
</td>
</tr>
{% endfor %}
@ -131,6 +131,7 @@
</h2>
<div id="by-question-breakdown" class="accordion-collapse collapse" aria-labelledby="by-question" data-bs-parent="#results-breakdown">
<div class="accordion-body">
<a class="view-full-questions" data-dataset="{{ entry.test.dataset.id }}">View Questions</a>
<table class="table table-striped">
<thead>
<tr>
@ -146,7 +147,7 @@
{% for question, answer in entry.answers.items() %}
<tr>
<td>
{{ question }}
{{ question|int + 1 }}
</td>
<td>
{{ answers[question|int][answer|int] }}