From f5d15532f58dbed18798e1d8cd53334a954758ed Mon Sep 17 00:00:00 2001
From: PranavAwasthi <pranavawasthi01@gmail.com>
Date: Tue, 23 Jan 2024 11:23:20 +0530
Subject: [PATCH] Fixed advance question type compatibility with inline result

---
 js/qsm-quiz.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/js/qsm-quiz.js b/js/qsm-quiz.js
index 2efce226c..670663697 100644
--- a/js/qsm-quiz.js
+++ b/js/qsm-quiz.js
@@ -1867,6 +1867,13 @@ function qsm_question_quick_result_js(question_id, answer, answer_type = '', sho
 			got_ans = true;
 		}
 
-		return { "correct_index": correct_index, "success": correct_answer ? 'correct' : 'incorrect', "message": show_correct_info && got_ans ? correct_info_text : "" };
+		let returnObject = { 
+			"correct_index": correct_index, 
+			"success": correct_answer ? 'correct' : 'incorrect', 
+			"message": show_correct_info && got_ans ? correct_info_text : "" 
+		};
+
+		jQuery(document).trigger('qsm_question_quick_result_js_after', [returnObject, correct_answer, answer, answer_array, answer_type, settings, decrypt, question_id]);
+		return returnObject;
 	}
 }