summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnosis.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/gnosis.el b/gnosis.el
index bb74bb8..f60bf09 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -102,7 +102,9 @@ use it like this:
:choices (gnosis--ask-input "Choices")
:correct-answer (string-to-number (read-string "Which is the correct answer (number)? "))
:tags (gnosis--ask-input "Tags")))
- (gnosis--insert-into 'notes `([nil "mcq" ,question ,choices ,correct-answer 0 0 ,tags])))
+ (when (equal (numberp correct-answer))
+ (error "The correct answer must be the number of the correct answer"))
+ (gnosis--insert-into 'notes `([nil "mcq" ,question ,choices ,correct-answer ,tags, nil, nil nil])))
(defun gnosis-create-question (type)
"Create question as TYPE."