From d008a0d509e05273e19c5bb3c74a71e02b9285f9 Mon Sep 17 00:00:00 2001 From: PranavAwasthi Date: Thu, 29 Feb 2024 16:39:29 +0530 Subject: [PATCH] Added two hooks for quz retake with wrong answer feature --- php/classes/class-qmn-quiz-manager.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/php/classes/class-qmn-quiz-manager.php b/php/classes/class-qmn-quiz-manager.php index 707e22ec4..7fca97b2c 100644 --- a/php/classes/class-qmn-quiz-manager.php +++ b/php/classes/class-qmn-quiz-manager.php @@ -1804,6 +1804,7 @@ public function submit_results( $qmn_quiz_options, $qmn_array_for_variables ) { $results_array['total_attempted_questions'] = $qmn_array_for_variables['total_attempted_questions']; $results_array['minimum_possible_points'] = $qmn_array_for_variables['minimum_possible_points']; $results_array['quiz_start_date'] = $qmn_array_for_variables['quiz_start_date']; + $qmn_array_for_variables = apply_filters( 'qsm_array_for_variables_before_db_query', $qmn_array_for_variables ); // If the store responses in database option is set to Yes. if ( 1 === intval( $qmn_quiz_options->store_responses ) ) { // Inserts the responses in the database. @@ -1894,6 +1895,7 @@ public function submit_results( $qmn_quiz_options, $qmn_array_for_variables ) { $qmn_array_for_variables['result_id'] = $results_id; $qmn_array_for_variables['result_unique_id'] = $unique_id; setcookie("question_ids_".$qmn_array_for_variables['quiz_id'], "", time() - 36000, "/"); + $qmn_array_for_variables = apply_filters( 'qsm_array_for_variables_after_db_query', $qmn_array_for_variables, $qmn_quiz_options ); // Converts date to the preferred format $qmn_array_for_variables = $mlwQuizMasterNext->pluginHelper->convert_to_preferred_date_format( $qmn_array_for_variables );