The Quiz and Survey Master Extra Shortcodes addon gives you more shortcodes to use with the Quiz and Survey Master Plugin.
INSTALLATION/SETUP
Once you have purchased the add-on, you will have access to download the add-on. To install it, simply upload the add-on as a normal WordPress plugin. To do so, go to the Plugins page and click Add New. Then, click Upload.
From there, upload the zip file that you downloaded when installing the add-on. Once the add-on has been uploaded, you should have the QSM—Extra Shortcodes listed in your list of plugins. Activate that plugin. Once activated, the plugin will add a new tab to your Addon Settings page.
If you have a QSM Add-on Installer, then you can quickly install and activate the Extra Shortcode plugin from there.
Refer to this documentation to understand how you can install add-ons through QSm Add-on Installer – How to Install Add-ons.
Adding Your License Key & Addon Settings
Enter your license key from your account into the “Addon License Key” field on the “Extra Shortcodes” tab of the “Addon Settings.”
Once you have entered your license key, be sure to click the “Validate” button to validate your license key.
Manage QSM Shortcodes
On the Extra Shortcodes settings page, you will see a list of shortcodes with an explanation of how to use them. To use the shortcodes, simply hit the copy button and paste them into the results or emails tab or any post or page of your website.
- Replace the quiz_id value with your quiz’s specific ID. Use the settings icon in each shortcode to add quizzes for the shortcode variable.
- If the shortcode includes a score or point value, update it with your quiz’s pass/fail score. Adjust these variables in each shortcode’s settings options.
Following are all the extra shortcodes you get with the add-on:
Show participants with high scores [ qsm_passed quiz_id=1 score=90 ] – It will display the number of users who passed the quiz with a score higher than the value provided.
Show participants with high points [ qsm_passed_points quiz_id=1 score=90 ] – It will display the number of participants who passed the quiz with points higher than the value provided.
Show participants with low scores [ qsm_failed quiz_id=1 score=90 ] – It will display the number of users who scored below the value provided.
Show participants with low points [ qsm_failed_points quiz_id=1 score=90 ] – It will display the number of users who failed the quiz with a point score below the value provided.
Average Score Shortcode [ qsm_average quiz_id=1 decimal=2] – It will display the average score earned by the users in quizzes. Here, decimal is the decimal place to display. For example, If the shortcode is customized as [ qsm_average quiz_id=1 decimal=5 ] it displays value as - 85.12564
Average Point Shortcode [ qsm_average_points quiz_id=1 decimal=2] – It will display the average point score the users earned in quizzes. Here, decimal is the decimal place to display. For example, if its [ qsm_average_points quiz_id=1 decimal=3 ] it displays 47.236
Total Attempts Shortcode [ qsm_taken quiz_id=1 ] – It will display the number of times the quiz has been taken by all users.
Show list of recently added quizzes [ qsm_recent amount=1 ] – It will display the most recent quizzes with links to the quiz. Set the amount limit from the shortcode settings.
Show list of all quizzes [qsm_all_quizzes button_text=”Preview” limit=90 date_range=””] – It will display a list of created quizzes filtered by a date range. You can customize the following variables in the shortcode settings:
- date_range: Filters quizzes by their last activity date using comma-separated dates (YYYY-MM-DD format, e.g., 2023-01-01, 2023-12-31).
- button_text: Sets the text for the action button (e.g., “Take Quiz,” “Preview”) that lets users start the quiz.
- limit: Determines how many quizzes appear in the list.
Show list of popular quizzes [ qsm_popular amount=1 ] – It will display the quizzes that have been taken the most. Set the amount limit to display the most popular quizzes from the settings option in the shortcode.
Display user assessment percentage in chart [ qsm_assessment_compare value1=’10’ value2=’20’ label1=’Label1′ label2=’Label2′ color=’#2880B9′] – The shortcode generates a comparison chart (bar or pie) based on the provided values and labels, styled according to the specified color.
The following are the values to be used; you can customize them from the settings option of the shortcode:
- Value 1: Any integer-returning variable such as:
- Assessment label points score
- Category points and score
- Question points and score
- Other integer-based variables (e.g., %POINT_SCORE%, %MAXIMUM_POINTS%, %MINIMUM_POINTS%, %AVERAGE_POINT%, %AMOUNT_CORRECT%, %AMOUNT_INCORRECT%, %AMOUNT_ATTEMPTED%, %TOTAL_QUESTIONS%, %CORRECT_SCORE%, %CATEGORY_POINTS_X%, %CATEGORY_SCORE_X%, %CATEGORY_AVERAGE_POINTS%, %ANSWER_LABEL_POINTS_X%, %ANSWER_LABEL_COUNTS_X%, etc.)
- Value 2: Similar to Value 1.
- Label 1: Text to display on the left side of the bar.
- Label 2: Text to display on the right side of the bar.
- Color: Choose from the color panel or color code to change the chart color.
Quiz Score Shortcode [qsm_display_score scoreby=average mlw_quiz=] – It will display all the scores earned by a user in the quizzes. You can customise the “scoreby” variable based on average scores, lowest scores, or top scores from the settings option in the shortcode.
Calculate Variable Values (Quiz Calc) – The [qsm_calc] shortcode allows you to perform mathematical calculations using numerical variables and operators and to display the results of those calculated variables.
Note – The “settings” button for parameter customization is not available in the Quiz Calc shortcode, as you’ve to manually add the numerical variable in the result page.
📌 To know how to implement [qsm_calc] shortcode through examples, refer to this documentation – QSM Calculation
Optimized Merged Shortcodes
To simplify usage, we have merged several of the above shortcodes into unified shortcodes with increased and better parameter support.
1. Quiz List Shortcode
Previous individual shortcodes like: [qsm_all_quizzes], [ qsm_recent amount=1 ], and [ qsm_popular amount=1 ] have been merged into one shortcode named – Quiz List Shortcode [qsm_quizzes].
It allows you to display the results of all quizzes, popular quizzes, and recent quizzes.
Below is the list of all supported parameters that can be customized through the Settings button in the shortcode.
- Select quiz – Choose the list of quizzes or all quizzes that you want to display results for. (display: quiz_id)
- View – Choose how quizzes are displayed: list or grid. (default: list)
- Filter by (filter_by) – Display quizzes that match a specific condition, such as price, search, or sort.
- Sort by (sort_by) – Define the order in which quizzes are displayed, such as popularity, latest, or oldest first.
- Limit– Set the maximum number of quizzes to display
- Filter by Date Range – Show quizzes created within a specific date range.
- No Results Text – Message displayed when no quizzes match the criteria. (default: No quizzes found)
- Paid button label – Add custom button text for paid quizzes (default value: “Purchase”)
- Free button label – Add custom button text for free quizzes (default value: “Start Quiz”)
- Paid button background (button_bg_color_paid) – Background color of paid quiz button.
- Paid button text color (button_text_color_paid) – Text color of paid quiz button.
- Free button background (button_bg_color_free) – Background color of free quiz button.
- Free button text color (button_text_color_free) – Text color of free quiz button.
2. Results Count Shortcode
The previously existing four shortcodes related to scores & points (passed and failed categories) are now merged into one single Results Count shortcode [qsm_result_counts].
Old Shortcodes –
[qsm_passed quiz_id=1 score=90]
[qsm_passed_points quiz_id=1 score=90]
[qsm_failed quiz_id=1 score=90]
[qsm_failed_points quiz_id=1 score=90]
New Shortcode (with default value) – [qsm_result_counts quiz_id=”” operation=”greater_than” score_value=”90″]
The following are the “results count shortcode” parameters that you can customize from the shortcode settings button.
- Select quiz – Choose from the list of quizzes or all quizzes to display the total number of results.
- Grade type (score_value) – Select whether the results should be based on quiz score or points. (default: score)
- Operation (operation) – Choose the type of statistic to display: Greater than or less than score/points value. (default: greater_than)
- Value – Set the score threshold value to measure for pass or fail calculations. (default: 90)
3. Quiz Average Shortcode
The quiz average shortcode is the merged and optimized shortcode of the two individual shortcodes – average score [qsm_average_points quiz_id=1 decimal=2] and average point shortcodes [qsm_average quiz_id=1 decimal=2].
This shortcode allows you to display the average points or scores earned in quizzes.
New shortcode with default value is – [qsm_average quiz_id=”” score_type=”score” decimal=”2″]
The shortcode includes the following parameters to customize.
- Select Quiz – select the quizzes you want to show the average score or points for
- Score Type – select whether you want to display the average result of scores or points
- Set decimal – Define how many decimal places to show when displaying averages. (default: 2)
Backward Compatibility
The old shortcode functions have not been removed. This ensures that any users still using old shortcodes will continue to see the same behavior as before. We strongly recommend migrating to the new unified shortcodes for improved flexibility and better maintenance in the future.
Example of the extra shortcodes addon in action
If you have any trouble implementing the Extra Shortcodes Addon or have more questions about the process, please fill out a support ticket by going to the WordPress dashboard and selecting ‘help’ in the QSM plugin and our support guru will be able to help you.