diff options
author | Thanos Apollo <[email protected]> | 2024-02-16 23:58:33 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-02-16 23:58:33 +0200 |
commit | 2c5709390330fbf7a0d01a0d59e76af3e673301d (patch) | |
tree | 6bc29477d28ea43ab4cb180c5a353e4b10f0ffac /gnosis.el | |
parent | e4ca956cc7da0de1ec18e8ff844cb07896894f4d (diff) |
Add gnosis-display-mcq-options
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -234,6 +234,15 @@ FACE-FOR-INFO is the face used to display info for option." (erase-buffer) (fill-paragraph (insert "\n" (propertize question 'face 'gnosis-face-main))))) +(defun gnosis-display-mcq-options (id) + "Display answer options for mcq note ID." + (let ((options (apply #'append (gnosis-select 'options 'notes `(= id 1) t))) + (option-num 1)) + (insert "\n\n" (propertize "Options:" 'face 'gnosis-face-directions)) + (cl-loop for option in options + do (insert (format "\n%s. %s" option-num option)) + (setf option-num (1+ option-num))))) + (defun gnosis-display-cloze-sentence (sentence clozes) "Display cloze sentence for SENTENCE with CLOZES." (erase-buffer) |