A new shortcode in WatuPRO (from version 184.108.40.206) lets you perform basic math on two of the user’s answers. This shortcode should be used only in the “Final screen” of a test.
Here is the shortcode with all its possible parameters:
[watupro-calculator math=”152+256″ output=”1″ var=”my_var”]
- math (required) shows the math you want to perform. Note that the numbers in the formula are question IDs and not actual numbers. I.e. you are not telling the shortcode to add 152 and 256, that would be pointless. You are telling the shortcode to add the answer to question with ID 152 to the answer of 256. It assumes answers are numeric and will work properly on numeric answers – i.e. it’s good for single-choice or open-end questions.
The math can contain expression of 2 questions only with any of the four standard math operations: +, -, /, *.
- output (optional) defines whether the result will be shown on the screen. The patameter defaults to 1 which means result will be shown. It makes sense to set it to 0 (don’t show) only if you are going to get the result in a variable for next shortcode usage on the same final screen.
- var (optional) is a variable name where to assign the result for next shortcode usage. Use only letters and underscore.
To make the whole thing above clearer and simpler, let’s make an example.
Let’s pretend to make a simple investment calculator without compounding. We will ask the user for their current savings, the yearly interest (expressed as decimal and NOT percentage) and how many years they want to save.
Here are our questions:
Here is how the shortcode is used in the Final screen:
Here is the example input:
And here is the result:
We took the multiplication of answers to Question 1 (with ID 901) and Question 2 (with ID 902) and put it into variable called “yearly”.
Then we took the yearly interest from the variable and multiplied it by the number of years (question 3 with ID 903) to get the total accumulated simple interest. We also placed this result in the variable total_interest.
Finally we added the answer to Question 1 with ID 901 to the variable total_interest to get the final result.
From version 5.5.8 the quiz/survey plugin WatuPRO supports yet another interesting option for grading the user’s performance: a grade based on the performance in each question category / theme.
What Does It Mean?
This is different than showing grade/performance per category. It’s a method to grade the whole test (and typically determine whether it’s passed or failed) based on how the user did in the different topics in the test.
For example for a traffic law test you may have a “Passed” grade with the following requirements:
For category “General rules” require at least 90% correct answers.
For category “Street Signs” require between 80% and 100% correct answers.
For category “Priority” require between 70% and 100% correct answers.
On top of this you can also set a general requirement for the test, for example min. 85% correct answers on average for all categories.
The requirements can be based on points, percent correct answer, or percentage points achieved from the maximum points possible in the test.
How Does It Work?
- Go to the Grades or Manage Grades page for a selected quiz. Make sure “Manage grades / results for the [Whole test]” is selected and check the option “The final grade in this test will depend on the performance on different question categories” as shown below:
- The page will refresh and will show you the grade forms for adding or editing grades with new options – from/to fields for each question category (topic) that contains questions in the selected quiz:
- You can skip any of the categories by leaving both fields blank – this means there will be no specific requirement for that category. You can optionally set a requirement for the whole test (in the above example it’s min. 80% correct answers) or use only category based requirements.
- A setting in the Edit Quiz -> General settings tab defines whether what will be the type of criteria to check:
a) By default all tests are graded based on number of points collected.
b) If you check the above checkbox and save your quiz will be graded based on % correctly answered questions from total questions given to the test taker.
c) If you check the above option but select “% from maximum points” from the drop-down menu, it will be graded based on the % achieved points from the maximum possible points in the quiz.This setting defines grading the quiz as a whole, grading based on category performance, and category grades if any.
This feature requires Watu PRO version 5.1.7 or newer and can be used on quizzes that require user log in. The idea is that when user retakes the quiz they won’t see questions already answered in a previous attempt (even if same question was used in another quiz).
The setting will be available on quizzes that meet ALL of the following criteria:
- The quiz requires user log in (before version 5.1.7 more criteria were required)
Be careful with this setting and the number of attempts you allow on a quiz. If the user answers all the questions in previous attempts, they will again end up with a quiz with no questions at some point. In such case the user will be shown a message”There are no questions to answer. Looks like you have already answered them all! “. You may want to avoid this by controlling the number of questions and number of attempts. Especially watch out for cases when multiple quizzes reuse the same pool of questions.