The [qsm_calc]
is a feature of an Extra Shortcode Add-on that enables users to perform custom calculations using dynamic numerical variables. It is designed to offer advanced result evaluation, analytics, and personalised feedback by allowing mathematical expressions in your results and email pages.
This shortcode acts like an inline calculator, letting you combine QSM template variables using standard arithmetic operators ( +, −, ×, ÷). With [qsm_calc], you can calculate for custom use cases like;
- Calculating category-wise or overall percentages
- Creating weighted scores
- Measuring quiz efficiency (e.g., points per minute)
- Displaying user-specific performance metrics
- Supporting adaptive scoring or feedback conditions
For example, [qsm_calc] (%CORRECT_SCORE% / %MAXIMUM_POINTS%) * 100 [/qsm_calc]
This example returns the user’s score percentage based on their correct answers.
The [qsm_calc]
shortcode supports all available numerical QSM template variables, including time, category scores, total points, and more.
Different Use Cases of Using QSM Calculation Shortcode
Below are practical examples of how the [qsm_calc] shortcode can be used to perform different meaningful calculations in different scenarios.
All the variables used in these examples are part of the QSM Core, ensuring full compatibility without requiring any additional add-ons.
1. Weighted Scoring Analysis
Applies a weighted scoring model where correct answers are rewarded more heavily, and incorrect answers result in penalties. Each correct response earns double weight, while each incorrect response subtracts from the total.
[qsm_calc] %AMOUNT_CORRECT% * 2 - %AMOUNT_INCORRECT% [/qsm_calc]
2. Performance Efficiency Score
Calculates how many points a participant scored per minute by converting the total time spent (in seconds) into minutes.
[qsm_calc] %POINT_SCORE% / (%TIMER_SECONDS% / 60) [/qsm_calc]
3. Accuracy Ratio
Shows the percentage of correct answers from attempted questions.
[qsm_calc] %AMOUNT_CORRECT% / %AMOUNT_ATTEMPTED% * 100 [/qsm_calc]
4. Category-Based Score Percentage
Calculate the percentage score across selected categories relative to the total available points.
[qsm_calc] %CATEGORY_POINTS_category1% + %CATEGORY_POINTS_category2% + %CATEGORY_POINTS_category3% / %MAXIMUM_POINTS% * 100 [/qsm_calc]
5. Time Per Question
Displays the average time (in seconds) spent per question.
[qsm_calc] %TIMER% / %TOTAL_QUESTIONS% [/qsm_calc]
6. Projected Score Estimation
Estimates the total possible score if all questions were answered correctly.
[qsm_calc] %AVERAGE_POINT% * %TOTAL_QUESTIONS% [/qsm_calc]
7. Calculate Individual Category Percentage
Determines what percentage of the total points earned across selected categories came specifically from one category.
[qsm_calc] ( CATEGORY_POINTS_category1 / ( CATEGORY_POINTS_category1 + CATEGORY_POINTS_category2 + CATEGORY_POINTS_category3 )) * 100 [/qsm_calc]
8. Penalty Score
Calculate penalties for incorrect answers to the total score.
[qsm_calc] %POINT_SCORE% - %AMOUNT_INCORRECT% * 2 [/qsm_calc]
Usecase of [qsm_calc] with QSM Add-ons Variables
QSM supports a variety of add-on variables. In this section, you will find practical examples of using the [qsm_calc] shortcode with variables from the Advanced Assessment Add-on and the Extra Template Variables Add-on.
Using [qsm_calc] with Advanced Assessment Add-on
1. Weighted Label Performance
Calculate the average points per response for a specific label by dividing the total points accumulated under that label by the number of times it was selected.
[qsm_calc] %ANSWER_LABEL_POINTS_X% / %ANSWER_LABEL_COUNT_X% [/qsm_calc]
2. Label Contribution to Overall Score (in %)
This calculation shows what percentage of the user’s total score was earned from a specific answer label.
[qsm_calc] %ANSWER_LABEL_POINTS_creativity% / %POINT_SCORE% * 100 [/qsm_calc]
3. Personality Type Scaling
This calculation generates a weighted personality profile score by assigning importance levels to specific personality traits based on their label percentages.
[qsm_calc] %ANSWER_LABEL_PERCENTAGE_label1% * 0.6 + %ANSWER_LABEL_PERCENTAGE_label2% * 0.4 [/qsm_calc]
Using [qsm_calc] with the Extra Template Variables Add-on
1. Unattempted Question Impact
Calculates the percentage of questions the user skipped or left unattempted during the quiz.
[qsm_calc] %COUNT_UNATTEMPTED% / %TOTAL_QUESTIONS% * 100 [/qsm_calc]
2. Calculate Efficiency by Time
Determines how many points were scored per minute based on the quiz time.
[qsm_calc] %POINT_SCORE% / %QUIZ_TIME% [/qsm_calc]
3. Performance vs. Maximum Category Potential
Calculates the percentage score achieved in a specific category, relative to the maximum possible points in that category.
[qsm_calc] %CATEGORY_POINTS_X% / %CATEGORY_MAX_POINTS_X% * 100 [/qsm_calc]
4. Category Performance Comparison
This variable calculates the difference in percentage scores between two specific categories, helping to identify gaps or disparities in user performance across different quiz categories.
[qsm_calc] ABS(%CATEGORY_WISE_PERCENTAGE_X% - %CATEGORY_WISE_PERCENTAGE_X%) [/qsm_calc]