summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-23 14:08:56 +0200
committerThanos Apollo <[email protected]>2023-12-23 14:08:56 +0200
commit153025fcab5367e9195432521b469853f34a986c (patch)
treecd3ba8761db3684ecaa06b8d597f92e060d3abb3 /gnosis.el
parentf2da68563a89b76c7e3613dbc2d67e288a864bb6 (diff)
Update review process for MCQ
- Update function names - Add message with total number of notes reviewed for session
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/gnosis.el b/gnosis.el
index a25a673..64ce09c 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -214,13 +214,14 @@ Change last-rev to current date."
(let ((date (gnosis-algorithm-date)))
(gnosis-update 'review-log `(= last-rev ',date) `(= id ,id))))
-(defun gnosis-review-mcq-choices (id)
+(defun gnosis-review-mcq (id)
"Display multiple choice answers for question ID."
(let ((answer (gnosis-get 'answer 'notes `(= id ,id)))
(choices (gnosis-get 'options 'notes `(= id ,id)))
(user-choice (gnosis-mcq-answer id)))
(if (equal (nth (- answer 1) choices) user-choice)
- (message "Correct!")
+ (progn (gnosis-review--success id)
+ (message "Correct!"))
(message "False")))
(sit-for 0.5))
@@ -229,7 +230,7 @@ Change last-rev to current date."
(let ((type (gnosis-get 'type 'notes `(= id id))))
(gnosis--display-question id)
(pcase type
- ("mcq" (gnosis-review-mcq-choices id))
+ ("mcq" (gnosis-review-mcq id))
("basic" (message "Not Ready yet."))
("cloze" (message "Not Ready yet."))
(_ (error "Malformed note type")))))
@@ -242,8 +243,9 @@ Change last-rev to current date."
(if (null due-notes)
(message "No due notes.")
(cl-loop for note in due-notes
- do (gnosis-review-note (car note)))))
- (message "Review session finished."))
+ do (progn (gnosis-review-note (car note))
+ (setf note-count (+ note-count 1)))
+ finally (message "Review session finished. %d note(s) reviewed." note-count)))))
;;; Database Schemas
;; Enable foreign_keys