Quiz ID not defined
-
show_correct_info: qmn_quiz_data[quizID].enable_quick_correct_answer_infoI am trying to get my quiz to work. It has recently stopped working since I developed it on a staging site and put it live. It is saying that QuizID is not defined.
The page I need help with: [log in to see the link]
-
Hi @scruffymonkeydm
I need to discuss this with my development team. Hopefully, I will get back to you with the solution.Regards,
SumitIt seems to be an issue with the function ‘end quiz if wrong answer selected’. Have they managed to find anything out?
Hi @scruffymonkeydm ,
I would like to provide you with an update on the issue we are currently working on. Rest assured that our team is dedicatedly addressing the matter, and I will keep you informed of any further developments as they arise.
Thank you for your patience and understanding.
Best regards,
SumitHi @scruffymonkeydm,
I wanted to inform you that the issue you reported has been resolved in the latest version of QSM. To avoid any further inconvenience, may I kindly request you to update QSM to its latest version, which is v8.1.6, and verify if the issue has been resolved.
Please feel free to contact me if you require any further assistance or if the issue persists.
Thank you for your patience and understanding.
Best regards,
SumitHi,
It’s still not working. The quiz is supposed to end if there is an incorrect answer but it doesn’t. it also doesn’t display the results page if they select an incorrect answer.
We need an urgent fix to this as our clients site has just gone live with this feature now not working.
Hi @scruffymonkeydm
Can you please share the quiz link with us so we will check and help you to fix the issue.
Regards,
SumitHi @scruffymonkeydm
Thank you for sharing the quiz link with us.
It seems that you are specific facing this issue only.You can replace qsm_submit_quiz_if_answer_wrong function code in quiz-master-next/js/qsm-quiz.js file at line 1739
Please replace the existing code with the below-given code.function qsm_submit_quiz_if_answer_wrong(question_id, value, $this, $quizForm) { let quiz_id = $quizForm.closest('.qmn_quiz_container').find('.qmn_quiz_id').val(); jQuery.ajax({ type: 'POST', url: qmn_ajax_object.ajaxurl, data: { action: "qsm_get_question_quick_result", question_id: question_id, answer: value, show_correct_info: qmn_quiz_data[quiz_id].enable_quick_correct_answer_info }, success: function (response) { var data = jQuery.parseJSON(response); $this.find('.quick-question-res-p').remove(); $this.find('.qsm-inline-correct-info').remove(); jQuery(document).trigger('qsm_after_answer_input', [data.success, $this, $quizForm]); if (data.success == 'correct') { } else if (data.success == 'incorrect') { $this.append('<div style="color: red" class="quick-question-res-p">' + qmn_quiz_data[quiz_id].quick_result_wrong_answer_text + '</div>') $this.append('<div class="qsm-inline-correct-info">' + data.message + '</div>'); setTimeout(function () { $quizForm.closest('.qmn_quiz_container').find('[class*="Required"]').removeClass(); $quizForm.closest('.qmn_quiz_container').find('.qsm-submit-btn').trigger('click'); }, 1000); } if (1 != qmn_quiz_data[quiz_id].disable_mathjax) { MathJax.typesetPromise(); } }, error: function (errorThrown) { alert(errorThrown); } }); }Do let me know if you need more help.
Regards,
SumitNo that is still not working. This is how our quiz works:
1: The questions are all Yes / No
2: The ‘wrong’ answer is given a numerical score of 1. If they choose the wrong answer, it then displays a specific results page depending on the total score for a question category.
3: ‘Correct’ answers are given a score of 0 and allows them to move to the next question.
At the moment, it is going to the next question regardless of whether it is correct or not. It is also not showing the Result page when an incorrect answer is given.
Hi @scruffymonkeydm
Can you please tell me what grading system you are using right now.
If possible please share screenshot of the grading system from the options tab of the quiz.
Looking forward to your reply.
Regards,
SumitWe are using points and correct/incorrect. It does appear to be working now – must have been cache. When it is supposed to end the quiz, it does show the next question for a bit before showing the result screen which it didn’t do before….but at least the functionality is back. Hopefully this can be sorted in the next update.
Actually – the client has come back and the wait time is too long for the result page to come up as people are able to just answer the next question instead of stopping the quiz. Can you look at this for us please?
Hi @scruffymonkeydm
We have tested it and we did not face such issue. It may be taking some time to process the validation. but it’s a very common process if normally user answers the question it’s validating in just 1, 2 seconds.
Regards,
SumitWe have left this a few days now to see if it starts to work better but it isn’t. The next question is being displayed and the user has time to answer before the Results page can come up. Can you look at this again for us please?
Please can we have an update on this?
The topic ‘Quiz ID not defined’ is closed to new replies.