Skip to content

Commit

Permalink
Merge pull request #2437 from QuizandSurveyMaster/dev-zubair
Browse files Browse the repository at this point in the history
fix js error with save and resume addon
  • Loading branch information
zubairraeen authored Jan 3, 2024
2 parents 98a0290 + 2946076 commit b18d002
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,10 @@ function qmnInit() {
jQuery('.qmn-multiple-choice-input, .qsm_dropdown, .qsm-multiple-response-input').change(function () {
let $this = jQuery(this);
let value = $this.val();
let quiz_form_id = $this.parents('.qsm-quiz-form').attr('id');
let quiz_id = quiz_form_id.replace('quizForm', '');
let question_id = $this.attr('name').replace(/question/i, '');
let data = qsm_question_quick_result_js(question_id, value, '', qmn_quiz_data[key].enable_quick_correct_answer_info,key);
let data = qsm_question_quick_result_js(question_id, value, '', qmn_quiz_data[quiz_id].enable_quick_correct_answer_info,quiz_id);
if (data.success == 'correct') {
$this.parent().addClass("qmn_correct_answer");
} else if (data.success == 'incorrect') {
Expand Down Expand Up @@ -1333,7 +1335,7 @@ function qmnInitPagination(quiz_id) {
jQuery(document).on('qsm_next_button_click_after qsm_previous_button_click_after', function(event, quiz_id) {
let video_sections = jQuery(`.qsm-quiz-container-${quiz_id}.qmn_quiz_container`).find('video');
let iframeVideos = jQuery(`.qsm-quiz-container-${quiz_id}.qmn_quiz_container`).find('iframe');

iframeVideos.each(function() {
let src = this.src;
jQuery(this).attr('src', src);
Expand Down

0 comments on commit b18d002

Please sign in to comment.