diff --git a/ref-test/app/admin/static/js/script.js b/ref-test/app/admin/static/js/script.js index caaee59..7a6a3e6 100644 --- a/ref-test/app/admin/static/js/script.js +++ b/ref-test/app/admin/static/js/script.js @@ -88,6 +88,19 @@ $('.test-action').click(function(event) { }) } else if (action == 'edit') { window.location.href = `/admin/test/${id}/` + } else if (action == 'analyse') { + $.ajax({ + url: `/admin/analysis/`, + type: 'POST', + data: JSON.stringify({'id': id, 'class': 'test'}), + contentType: 'application/json', + success: function(response) { + window.location.href = response + }, + error: function(response){ + error_response(response) + }, + }) } event.preventDefault() @@ -123,6 +136,19 @@ $('.edit-question-dataset').click(function(event) { window.location.href = `/admin/view/${id}` } else if (action == 'download') { window.location.href = `/admin/settings/questions/download/${id}/` + } else if (action == 'analyse') { + $.ajax({ + url: `/admin/analysis/`, + type: 'POST', + data: JSON.stringify({'id': id, 'class': 'dataset'}), + contentType: 'application/json', + success: function(response) { + window.location.href = response + }, + error: function(response){ + error_response(response) + }, + }) } } event.preventDefault() diff --git a/ref-test/app/admin/templates/admin/result-detail.html b/ref-test/app/admin/templates/admin/result-detail.html index daffa8e..4709eaa 100644 --- a/ref-test/app/admin/templates/admin/result-detail.html +++ b/ref-test/app/admin/templates/admin/result-detail.html @@ -108,7 +108,7 @@ {% for tag, scores in entry.result.tags.items() %}
- This page lists all the questions in the selected dataset. + Analysis for {{ type }} {{ subject }}.
- Questions in the test are arranged in blocks. Blocks can be of two types: Blocks of multiple related questions, and Single Questions that are not part of a block. - You can add, remove, or edit both Blockss and Questions through this editor. -
-- Blocks are useful when you have a section of the test that contains multiple questions that are related to each other, for example if there is a scenario-based section where a series of questions are about the same situation. -
-- Blocks can contain any number of questions within them, but cannot contain nested blocks. -
-- When you set up a block, you can also add header text that will be displayed with each question. - You can use this to provide common information for a scenario across a series of questions. -
-- Questions come in three types: -
- Normally, multiple choice questions will have the order of the options randomised. -
-- Questions will be displayed to candidates in a randomised order. - Blocks of questions will be kept together, but the order within the block will also be randomised. -
-- Questions can also be categorised using tags. -
-- Placeholder for Questions Remaining in a Block -
-
- In order to show how many questions are remaining inside a block, e.g. to say ‘the next n questions are about a specific scenario’, the app uses the placeholder <block_remaining_questions>
.
-
+ Question + | ++ Percent Correct + | ++ Answers + | ++ Tags + | + + + {% for question in questions %} +||
---|---|---|---|---|---|
+ {{ question.q_no + 1 }} + | ++ {{ ((analysis.answers[question.q_no][question.correct] or 0)*100/(analysis.answers[question.q_no].values())|sum())|round(2) }} + | +
+
|
+
+
|
+