From 8240166c9a53dee2e9e683b6615e0bf74c63a50c Mon Sep 17 00:00:00 2001 From: Mohammad Zubair Ali Date: Thu, 21 Dec 2023 18:12:13 +0530 Subject: [PATCH] fixed JS issue with Add class for correct/incorrect answers option --- php/classes/class-qmn-quiz-manager.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/php/classes/class-qmn-quiz-manager.php b/php/classes/class-qmn-quiz-manager.php index 7dfaec1ab..d1400366c 100644 --- a/php/classes/class-qmn-quiz-manager.php +++ b/php/classes/class-qmn-quiz-manager.php @@ -520,7 +520,7 @@ public function display_shortcode( $atts ) { $encryption[ $question['question_id'] ]['correct_info_text'] = isset( $question['question_answer_info'] ) ? html_entity_decode( $question['question_answer_info'] ) : ''; $encryption[ $question['question_id'] ]['correct_info_text'] = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $encryption[ $question['question_id'] ]['correct_info_text'], "correctanswerinfo-{$question['question_id']}" ); } - if ( ( isset($qmn_json_data['end_quiz_if_wrong']) && 0 < $qmn_json_data['end_quiz_if_wrong'] ) || ( ! empty( $qmn_json_data['enable_quick_result_mc'] ) && 1 == $qmn_json_data['enable_quick_result_mc'] ) ) { + if ( ( isset($qmn_json_data['end_quiz_if_wrong']) && 0 < $qmn_json_data['end_quiz_if_wrong'] ) || ( ! empty( $qmn_json_data['enable_quick_result_mc'] ) && 1 == $qmn_json_data['enable_quick_result_mc'] ) || ( ! empty( $qmn_json_data['ajax_show_correct'] ) && 1 == $qmn_json_data['ajax_show_correct'] ) ) { $quiz_id = $qmn_json_data['quiz_id']; $qsm_inline_encrypt_js = ' if (encryptionKey === undefined) { @@ -535,11 +535,6 @@ public function display_shortcode( $atts ) { if (encryptedData === undefined) { var encryptedData = {}; } - - - - - encryptionKey['.$quiz_id.'] = "'.hash('sha256',time().$quiz_id).'"; data['.$quiz_id.'] = '.wp_json_encode($encryption).';