Show explanation based on user answer is correct or not

In wplms 3.4 we have added two shortcodes that you can use to show the explanation content of question based on user answer is correct or not .
Add the shortcodes like this in your question explanation settings :

[check_answer_incorrect ques_id=”210″ quiz_id=”144″ ] Correctly marked hurray!! [/check_answer_incorrect]

[check_answer_correct ques_id=”210″ quiz_id=”144″ ] Sorry wrongly marked [/check_answer_correct]

shortcode has two parameters :
ques_id : it should be the id of the question in which you are adding explanation.
quiz_id :  it should be the id of the quiz in which question is added  .
Both these params are required to make that shortcode work .

if user’s answer is correct then content from [check_answer_correct ]  [/check_answer_correct] will show otherwise content from [check_answer_incorrect ]  [/check_answer_incorrect] will show .

PS : You can use shortcodes also inside the shortcode like this :

[check_answer_incorrect ques_id=”210″ quiz_id=”144″ ]

[button url=”#” class=”” bg=”” hover_bg=”” size=”0px” color=”” radius=”0px” width=”0px” height=”0px” target=”_self”] Wrong [/button]

[/check_answer_incorrect]

[check_answer_correct ques_id=”210″ quiz_id=”144″ ]

[button url=”#” class=”” bg=”” hover_bg=”” size=”0px” color=”” radius=”0px” width=”0px” height=”0px” target=”_self”] Right [/button]

[/check_answer_correct]

Was this article helpful?

Related Articles

Leave A Comment?