Skip to content

Commit

Permalink
Merge pull request #2425 from QuizandSurveyMaster/dev-zubair
Browse files Browse the repository at this point in the history
fixed JS issue with Add class for correct/incorrect answers option
  • Loading branch information
zubairraeen authored Dec 21, 2023
2 parents 0394b6c + 8240166 commit d7f4f7d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions php/classes/class-qmn-quiz-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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).';
Expand Down

0 comments on commit d7f4f7d

Please sign in to comment.