summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-19 20:22:59 +0200
committerThanos Apollo <[email protected]>2023-12-19 20:22:59 +0200
commit5034063ffa17f795ed35bfdacc8a484506c7b4f7 (patch)
treefd401e009fbd18d80dcdf2166a5f82b72b6e02cd /gnosis.el
parent33075f7f7cddfdf5c3fc9f1d198322a0ca3e8dbe (diff)
Add gnosis-review--success
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 8a25f06..f05c1f2 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -190,6 +190,14 @@ SUCCESS is a binary value, 1 = success, 0 = failure."
(if (equal success 1)
(nth 0 ef)
(nth 1 ef))))
+
+(defun gnosis-review--success (id)
+ "Update review-log for note with value of id ID."
+ (let ((ef (gnosis-review--new-ef id 1)))
+ ;; (gnosis-update 'review-log `(= last-rev ',(gnosis-algorithm-date)) `(= id ,id))
+ (gnosis-update 'review-log `(= next-rev ',(car (gnosis-review--algorithm id 1))) `(= id ,id))
+ (gnosis-update 'review `(= ef ,ef) `(= id ,id))))
+
(defun gnosis-review-mcq-choices (id)
"Display multiple choice answers for question ID."
(let ((answer (gnosis-get 'answer 'notes `(= id ,id)))