diff options
author | Thanos Apollo <[email protected]> | 2023-12-12 18:21:55 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-12 18:21:55 +0200 |
commit | 43f231c22a05f2f4acd0b84872859f1771688392 (patch) | |
tree | abad3282cad382ee1ba8ea04f17a2b0d9297c3b5 | |
parent | e9ee5cd8c6a2958d5b5f867eb016b335110b8ccd (diff) |
Rename gnosis--get to gnosis--get-id
-rw-r--r-- | gnosis.el | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -59,13 +59,13 @@ "Insert VALUES to TABLE-NAME." (emacsql gnosis-db `[:insert :into ,table-name :values ,values])) -(defun gnosis--get (table value id) +(defun gnosis--get-id (table value id) "Get VALUE for question ID from TABLE." (caar (gnosis--select table value `(= id ,id)))) (defun gnosis--display-question (id) "Display main row for question ID." - (let ((question (gnosis--get 'notes 'main id))) + (let ((question (gnosist--get-id 'notes 'main id))) ;; Animate.el is used only for testing purposes. (animate-string question 5))) @@ -117,14 +117,14 @@ use it like this: (defun gnosis-mcq-answer (id) "Choose the correct answer, from mcq choices for question ID." - (let ((choices (gnosis--get 'notes 'options id)) + (let ((choices (gnosist--get-id 'notes 'options id)) (history-add-new-input nil)) ;; Disable history (completing-read "Answer: " choices))) (defun gnosis-review-mcq-choices (id) "Display multiple choice answers for question ID." - (let ((canswer (gnosis--get 'notes 'answer id)) - (choices (gnosis--get 'notes 'options id)) + (let ((canswer (gnosist--get-id 'notes 'answer id)) + (choices (gnosist--get-id 'notes 'options id)) (user-choice (gnosis-mcq-answer id))) (if (equal (nth (- canswer 1) choices) user-choice) (message "Correct!") @@ -132,7 +132,7 @@ use it like this: (defun gnosis-review (id) "Start review for question ID." - (let ((type (gnosis--get 'notes 'type id))) + (let ((type (gnosist--get-id 'notes 'type id))) (pcase type ("mcq" (gnosis-review-mcq-choices id)) ("basic" (message "Not Ready yet.")) |