Quiz and Survey Master uses a template variable system for all the text that you will customize. This system allows you to put a variable in your template and that variable be replaced with the corresponding value when the user takes the quiz. For example, when we write the results page template, we won’t be able to put the points the user has earned because the user hasn’t taken the quiz yet. So, we can put the variable %POINT_SCORE% into the results page. Then, when the user takes the quiz, the plugin will put the total points in place of the variable for you.
For example, in our Twitter Sharing Text template, we might have put “I just scored %CORRECT_SCORE%% on %QUIZ_NAME%!”. So, when the quiz is taken and the user tweets this, it will become something like this: “I just scored 87% on Frank’s Test Quiz!”.
There are lots of variables you can use in your templates. Each template includes a list of variables that work in that template. For example, the Message Displayed Before Quiz template can only have the variables %QUIZ_NAME% and %CURRENT_DATE%. So be sure to check which variables are allowed before you write that masterpiece in the template.
For a complete list of variables and how to use them, keep reading. Or, now that we understand the basics, let’s create our first quiz!
%POINT_SCORE% – this is used to show the amount of points a user earned during the quiz. For example:
Great job! You earned %POINT_SCORE% points!
%AVERAGE_POINT% – this is the average amount of points the user earned per question. For example:
Great Job! You averaged %AVERAGE_POINT% points per question!
%AMOUNT_CORRECT% – the amount of questions the user answered correctly. For example:
You answered %AMOUNT_CORRECT% questions correctly!
%TOTAL_QUESTIONS% – the total amount of questions that was displayed for the user. For example:
The quiz you just took had %TOTAL_QUESTIONS% questions!
%CORRECT_SCORE% – the percentage score the user earned during the quiz. For example:
Great job! You scored %CORRECT_SCORE% % on this quiz!
%USER_NAME% – the name the user entered into the Name text box. For example:
Thank you %USER_NAME% for taking this quiz!
%USER_BUSINESS% – the company the user entered into the Business text box. For example:
%USER_NAME% from the company of %USER_BUSINESS% just took this quiz!
%USER_PHONE% – the phone number the user entered into the Phone text box. For example:
%USER_NAME% just took the quiz. This user can be reached at %USER_PHONE%.
%USER_EMAIL% – the email the user entered into the Email text box. For example:
%USER_NAME% just took the quiz and can be emailed at %USER_EMAIL%
%QUIZ_NAME% – the name of the quiz. For example:
Great Job %USER_NAME%! You have just taken the %QUIZ_NAME%.
%QUESTIONS_ANSWERS% – shows the questions, answers, and comments. This variable can be edited on the Text tab. An example of usage would be:
Great Job %USER_NAME%! You earned %POINT_SCORE% points. Review your answers below to see which questions you answered correctly and which ones you did not. %QUESTIONS_ANSWERS%
%COMMENT_SECTION% – the text the user entered into the quiz comment section (if enabled). An example of usage would be:
%USER_NAME% took the quiz and left these comments: %COMMENT_SECTION%
%TIMER% – the amount of seconds the user took to complete the quiz. For example:
The user took %TIMER% seconds to complete this test.
%CERTIFICATE_LINK% – the link to the certificate generated for the user (if enabled). For example:
Be sure to download your certificate here: %CERTIFICATE_LINK%
%CATEGORY_POINTS%%/CATEGORY_POINTS% – the amount of points a user earned in a specific category. An example of usage would be:
You earned %CATEGORY_POINTS%History%/CATEGORY_POINTS% points in the History category.
%CATEGORY_SCORE%%/CATEGORY_SCORE% – the percentage score of questions the user answered correctly in a specific category. For example:
You earned %CATEGORY_SCORE%Math%/CATEGORY_SCORE% % in the Math category of this quiz.
%CATEGORY_AVERAGE_POINTS% – the average amount of points the user earned between all categories.
On average, you earned %CATEGORY_AVERAGE_POINTS% points per category for this quiz.
%CATEGORY_AVERAGE_SCORE% – the average percentage score of questions the user answered in all categories. For example:
On average, you earned %CATEGORY_AVERAGE_SCORE% % per category for this quiz.
%FACEBOOK_SHARE% – displays the button to share on Facebook
Be sure to share your results on Facebook by using the button below! %FACEBOOK_SHARE%
%TWITTER_SHARE% – displays the button to share on Twitter
Be sure to share your results on Twitter by using the button below. %TWITTER_SHARE%