Self-Assessment Creator

Tool to easily create formative web-based self-assessment quizzes

Version 3.5

04.02.2016 (Jerome)

Core

  • Added setting in self-assessment.js to bypass jquery-history States:
    • var useHistory = false;
    • Removes url get var generated by History.Adapter (?page=2) which seems broken and stops page reloads (i.e. on quiz retry)
    • Can be re-enabled by setting to true.

Version 3.4.3

29.01.2016 (Jerome)

Minor bug fixes

  • 'Reveal' button on MCQ now properly displays any general feedback for that question.
  • Sort into columns CSS highlight was reversed, now corrected with yellow on active hover.

Version 3.4

19.05.2015 (Jerome)

  • Moved the generic feedback from the javascript file to a node in the json file:
{
	"questions": [
	...
	],
	"endPage": [
	{
	    "title":"<h4>Quiz Complete</h4>",
	    "textAllCorrect":"<p>Awesome! You've obviously mastered the subject.</p>",
	    "textPass":"<p>Well done! You've passed this quiz.</p>",
	    "failPercentage":75,
	    "textFail":"<p>You didn't do so well and need to go back over the materials again.</p>",
	    "showScore":true,
	    "showRetry":true	
	}
	]
}
  • title displays on last page (intended for a heading)
  • textAllCorrect shows if the score is 100%
  • textPass shows if the score is above the failPercentage (but less than 100%)
  • textFail shows if the score is less than the failPercentage
  • showScore set to true displays the user's score in the quiz
  • showRetry set to true displays a message to the user to try the quiz again to improve their score (nb. even if set to true this won't display if the score gained = 100%)
MCQ
  • Bug fixes to the new 'all correct' option:
    • Generic feedback box no longer shows when empty
  • Added 'all correct' option for instant submit MCQ type

Version 3.3

29.04.2015 (Jerome)

MCQ
  • New 'all correct' option in JSON file for MCQ question types. Clicking on a selection automatically submits the question for marking (no submit button):

To turn on, set the 'correct' attribute to 'all' i.e.
"correct": "all"
rather than the usual
"correct": "d" or "correct": "b,c,e".

Note that this overrides the showAllFeedbackOnCorrect default from true to false (unless explicitly set in the json file) as it doesn't make sense to show all feedback if all are correct.

Version 3.2

04.02.2015 (Jerome)

MCQ
  • New 'instantsubmit' option in JSON file for MCQ question types. Clicking on a selection automatically submits the question for marking (no submit button):

Note that this can't work for multiple answer - the option will only be available (activated) if there is only one correct answer for that question. Also, the 'reveal answer' help button doesn't make much sense in this context and is not currently implemented (although it could be added if really necessary).

NB. This is currently implemented on a per question basis (as an attribute of each question's JSON settings). However, it might make more sense for it to be a single setting at the quiz level (in the root 'questions' node of the JSON file). A user would expect an entire quiz to behave in the same way so, currently, all questions need to have that attribute ( "instantsubmit": "true" ) added. Would probably be better to only have to set it once.

Version 3.1

20.01.2015 (Jerome)

Sort Column
  • New 'table orientation' setting allows sorting into rows:
  • Minor bug fixes
    • Error check for non-existent or incorrect answers in the sortorder array
    • Removed unecessary console.log debugging

Version 3.0

13.01.2015 (Jerome)

Sort Column

Version 2.9

11.12.2014 (Jerome)

Core
  • Bug Fix: Raphael not always loading (added additional loadScript and callback)

Version 2.8

04.12.2014 (Jerome)

Draggable Arrows
  • minor bug fixes
  • added ability to have duplicate dropzones
    • i.e. two options going to the same answer
  • added instructions for this question type
Core
  • Deleted orphaned js folder in ./examples/

Version 2.7

25.11.2014 (Jerome)

MCQ
  • fixed bug with generalFeedback not appearing correctly after clicking 'reveal answer'
  • added new option in JSON file: "showAllFeedbackOnCorrect"
    • defaults to true: on clicking correct option(s) or choosing 'reveal answer' all feedback for all options are shown. (this is the new MCQ feature added in v2.5)
    • setting to false: display only the correct answer's feedback.
      • In multiple answer MCQ this also changes the feedback from “You chose X out Y correct” (in a question where all the options are correct this gives away the answer) to “You chose X  correct options but this is not yet the correct answer to the question.”
{
	"questiontype": "mcq",
	"question": "<h3>Step-wise approach to asthma therapy</h3><p>Here is a plan showing what drugs are recommended for asthmatics based on the severity of their condition (defined by FEV).</p><p><img src=\"images/asthma_steps_0.jpg\" width=\"600\" height=\"400\" /></p><p>Which one of the following should you prescribe for <strong>Step 1</strong>?</p>",
	"answers":{
		"a":"SR theophylline",
		"b":"Inhaled short acting beta2 agonist",
		"c":"Inhaled long acting beta2 agonist",
		"d":"Oral beta2 agonist",
		"e":"Oral steroid",
		"f":"Leukotriene receptor antagonist",
		"g":"Daily i.v. injection of antibodies against TNFa",
		"h":"Inhaled dose of antibodies against IL-1",
		"i":"Inhaled low dose of steroid"
	},
	"feedback": {
		"a":"No way you'd never use...",
		"b":"<p>Inhaled short acting beta2 agonist is the correct treatment at this stage.</p>",
		"c":"No way you'd never use...",
		"d":"No way you'd never use...",
		"e":"No way you'd never use...",
		"f":"No way you'd never use...",
		"g":"No way you'd never use...",
		"h":"No way you'd never use...",
		"i":"No way you'd never use..."
	},
	"showAllFeedbackOnCorrect":"false",
	"correct":"b"
},

KNOWN BUGS:
  • mcq question type: if using individual feedback, json file must not use numbers for each option.

This is ok and works:

{
            "questiontype": "mcq",
            "question": "<h3>Step-wise approach to asthma therapy</h3><p>Which one of the following should you prescribe for <strong>Step 2</strong> (in addition to the drug prescribed in step 1)?</p><p><img src=\"images/asthma_steps_1.jpg\" width=\"600\" height=\"400\" /></p>",
            "answers":{
				"4":"Leukotriene receptor antagonist",
				"1":"Inhaled short acting beta2 agonist",
				"9":"Inhaled dose of antibodies against IL-1",
				"3":"Inhaled long acting beta2 agonist",
				"7":"Oral steroid",
				"5":"SR theophylline",
				"6":"Oral beta2 agonist",
				"2":"Inhaled low dose of steroid",
				"8":"Daily i.v. injection of antibodies against TNFa"
			},
			"correct":"2",
			"feedbackGeneral": "<p>Inhaled low dose of steroid is the correct treatment at this stage.</p>"
        },

This breaks, with the error: "Uncaught SyntaxError: Unexpected number --> data.questions[1].feedback.1"

{
			"questiontype": "mcq",
			"question": "<h3>Step-wise approach to asthma therapy</h3><p>Here is a plan showing what drugs are recommended for asthmatics based on the severity of their condition (defined by FEV).</p><p><img src=\"images/asthma_steps_0.jpg\" width=\"600\" height=\"400\" /></p><p>Which one of the following should you prescribe for <strong>Step 1</strong>?</p>",
			"answers":{
				"1":"SR theophylline",
				"2":"Inhaled short acting beta2 agonist",
				"3":"Inhaled long acting beta2 agonist",
				"4":"Oral beta2 agonist",
				"5":"Oral steroid",
				"6":"Leukotriene receptor antagonist",
				"7":"Daily i.v. injection of antibodies against TNFa",
				"8":"Inhaled dose of antibodies against IL-1",
				"9":"Inhaled low dose of steroid"
			},
			"feedback": {
				"1":"No way you'd never use...",
				"2":"<p>Inhaled short acting beta2 agonist is the correct treatment at this stage.</p>",
				"3":"No way you'd never use...",
				"4":"No way you'd never use...",
				"5":"No way you'd never use...",
				"6":"No way you'd never use...",
				"7":"No way you'd never use...",
				"8":"No way you'd never use...",
				"9":"No way you'd never use..."
			},
			"correct":"2"
        },

This is the temp solution (note use of a,b,c instead of 1,2,3):

{
			"questiontype": "mcq",
			"question": "<h3>Step-wise approach to asthma therapy</h3><p>Here is a plan showing what drugs are recommended for asthmatics based on the severity of their condition (defined by FEV).</p><p><img src=\"images/asthma_steps_0.jpg\" width=\"600\" height=\"400\" /></p><p>Which one of the following should you prescribe for <strong>Step 1</strong>?</p>",
			"answers":{
				"a":"SR theophylline",
				"b":"Inhaled short acting beta2 agonist",
				"c":"Inhaled long acting beta2 agonist",
				"d":"Oral beta2 agonist",
				"e":"Oral steroid",
				"f":"Leukotriene receptor antagonist",
				"g":"Daily i.v. injection of antibodies against TNFa",
				"h":"Inhaled dose of antibodies against IL-1",
				"i":"Inhaled low dose of steroid"
			},
			"feedback": {
				"a":"No way you'd never use...",
				"b":"<p>Inhaled short acting beta2 agonist is the correct treatment at this stage.</p>",
				"c":"No way you'd never use...",
				"d":"No way you'd never use...",
				"e":"No way you'd never use...",
				"f":"No way you'd never use...",
				"g":"No way you'd never use...",
				"h":"No way you'd never use...",
				"i":"No way you'd never use..."
			},
			"correct":"b"
        },

  • Core: reloading page when URL displays page query string, i.e. http://ehealth.kcl.ac.uk/tel/pharmacology/asthma/?page=2 breaks the navigation;
    • it restart the quiz from the beginning but after first question clicking on 'continue' goes nowehere (no error thrown in console)

Version 2.6

13.11.2014 (Jerome)

Core
  • fixed intermittent (critical) bugs caused by inconsistent timing of function calls;
      • data undefined or questions undefined in setUpQuiz() > setUpQuiz called too soon
      • History.Adapter undefined in setUpQuiz() > jquery.history not loaded in time
      • addTouch() not a function in createQuestion > jquery.ui.touch not loaded in time
    • better error handling code, use of callbacks and jQuery promises
dropLabel Quiz Type
  • dropLabels placement fixed for use within a Bootstrap theme (adds necessary offset inherited from div.container and div.title-container)
    • uses: new global var bootstrap3_enabled - can be used by other activity types, as required.
  • fixed label placement when the page is resized – previously they became orphaned on page (stayed static while fluid elements changed their placement)
    • uses a new resizer() method (bound to $(window).on("resize") which can be overwritten by individual quiz types, if the same happens to other activity types
  • dropLabels activity hover states
    • added .drop-active and .drop-hover classes for better UX
CSS / Styling
  • added "cursor: default;" to .draggableLabelPlaceholder (to remove text select cursor)
  • option in css files to make dropLabel text smaller (if content is too long to fit)
Miscellaneous
  • added versioning information to main JavaScript and CSS files

Version 2.5

27.01.2014

  • Bug Fixes.
  • For MCQs: if individual feedback exists for each option, this is now shown below each option after the correct answer is revealed.
  • Now possible to allow the students to complete the sections of the quiz in any order - set the option "createLinks" to true to enable creation of links to each question in the progress bar when the quiz is created.

  • Version 2.4

    18.07.2013

  • No longer necessary to link to the CSS file. The JavaScript will automatically load it. The CSS file can also be specified using the "data-css" attribute of the div. This change makes it possible to embed the quiz in KEATS as both the CSS and JSON files can be added to KEATS, avoiding XSS issues.

  • Version 2.3

    10.07.2013

    • Overall settings can be changed in the JSON file:
      • Highlight colour for incorrect answers: "colourRed"
      • Highlight colour for correct answers: "colourGreen"
      • Default correct answer feedback text "defaultCorrectFeedback"
      • Default incorrect answer feedback text "defaultIncorrectFeedback"
      • Default number of incorrect attempts before "reveal answers" shown: "attempts"
    • Alternative css file provided removing border-radius from all elements - to fit in better on sites with more angular themes - just link to self-assessment_square.css instead of self-assessment.css.
    • Can specify the JSON file using the "data-json" attribute of the self-assessment div instead of requiring to have it named the same as the HTML file.

    Version 2.2

    03.07.2013

    • Allow moving forward and back through questions. Allow use of browser navigation buttons and linking directly to different pages
    • Results page shows up in progress bar so can be navigated to and from when reviewing questions
    • CSS bugfixes

    Version 2.0.3

    03.06.2013

    • Variant of 2.0.2 but with rounded corners removed from all elements.

    Version 2.0.2

    03.06.2013

    • Variant of 2.0.1 but with different red and orange progress/correct colours. And blue highlight colour removed for "submit" button.

    Version 1.0

    16.05.2013

    • Allows use of multiple correct answers for MCQ. Separate correct answers with a comma.
    • 'Reveal answers' button. Appears after 3 wrong attempts. Can be changed by setting a value for "attempts" for the question in the json file.
    • 'Reflection' and 'Information' question types added. Reflection type gives user a textarea. When they click submit they are presented with a model answer ("feedbackGeneral").

    Version 2.0

    02.05.2013

    Major update

    • Single question mode - if only 1 question in the json file, progress bar omitted, completion page not used and "Question X of X" text removed.
    • "questiontype" can now be "dragarrows", "draglabels" or "mcq". Omission implies "mcq". jqueryui and raphael js libraries are automatically loaded (todo - only load these libraries if these questions used).
    • "draggableslocation" - for draggable type exercises, can be set to "top" or "right". A bit buggy, may need to experiment with each.
    • "dropzones" - coordinates of droppable locations. For "draglabels", coordinates indicate the centre of the dropzone (size is worked out automatically according to draggables). For "dragarrows", at least 2 coordinates are required. 2 coordinates for top-left and bottom-right corners of a rectangle. 3 or more coordinates indicate vertices of a polygon.
    • "feedbackGeneral" - feedback for drag and drop exercises - individual feedback for each answer currently ignored for these question types.

    Version 1.0

    12.02.2013

    • First version made for ophthalmology exercises. MCQ questions only fed by json file.