summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-27 06:34:57 +0200
committerThanos Apollo <[email protected]>2023-12-27 06:34:57 +0200
commit2351a8563f67cef842bece987571204912721497 (patch)
treebfc913fbdad94b0a163a4445bbca946c9f8cd9ec
parent1075592142d973873d2c953b4b90af02c2814281 (diff)
mcq: Update display of correct answer
-rw-r--r--gnosis.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 35d8432..72f300d 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -110,6 +110,15 @@ Example:
(propertize answer 'face 'gnosis-face-correct-answer)
"\nYour answer: "
(propertize user-choice 'face 'gnosis-face-user-choice))))))
+(defun gnosis-display--correct-answer-mcq (answer user-choice)
+ "Display correct ANSWER & USER-CHOICE for MCQ note."
+ (with-current-buffer
+ (switch-to-buffer
+ (get-buffer-create "*gnosis*"))
+ (insert (concat "\n\nCorrect answer: "
+ (propertize answer 'face 'gnosis-face-correct-answer)
+ "\nYour answer: "
+ (propertize user-choice 'face 'gnosis-face-user-choice)))))
(defun gnosis-display--extra (id)
"Display extra information for note ID."