Option Execute JavaScript will give you opportunity to run JavaScript code when a user answers all questions of the quiz.
To modify JavaScript, click the Customize button in the Properties ->Result -> Reporting area.
The JavaScript Editor window will open.
You can insert quiz variables in Insert Variable drop-down and set Target to define script execution area.
Variable | Description |
---|
PASSING_SCORE | Quiz passing score (for graded quizzes only). |
AWARDED_SCORE | User score for the quiz (for graded quizzes only). |
PASSING_PERCENT | Quiz passing percent is a number from 1 to 100. |
AWARDED_PERCENT | User score for the quiz in percent of total. Percent is a number from 1 to 100. |
QUIZ_STATUS | Status of the quiz: "Passed", "Failed", "Completed". |
QUIZ_DURATION | Time in seconds spent by the user to pass the quiz. |
Note: Quiz variable must be surrounded by "%" characters. Otherwise it will be defined as a string.