diff options
author | Thanos Apollo <[email protected]> | 2023-12-28 04:06:50 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-28 04:07:37 +0200 |
commit | 297338ffb376be27b60ff2c58ed54575222d39b2 (patch) | |
tree | 56cd447042d7f1a9ef687d0568f7a557ba777464 /gnosis-dev.el | |
parent | 62a42174cbbb796f7d8bfa4df12ef844d35a6a72 (diff) |
Add gnosis-dev-add-fields
Function to for testing with items > 1000
Diffstat (limited to 'gnosis-dev.el')
-rw-r--r-- | gnosis-dev.el | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/gnosis-dev.el b/gnosis-dev.el index 2457300..0a742d7 100644 --- a/gnosis-dev.el +++ b/gnosis-dev.el @@ -20,6 +20,33 @@ (setq selected-items (cons item selected-items)) (setq shuffled-list (append (butlast shuffled-list index) (nthcdr (1+ index) shuffled-list))))) selected-items)) + +(defun gnosis-dev-add-fields () + "Add random inputs to test." + (dotimes (_ 500) + (gnosis-add-note-mcq :deck "Anatomy" + :question "A 37-year-old man is admitted to the +emergency department after a severe car crash. After examining the +patient the emergency medicine physician concludes that the serratus +anterior muscle is damaged. Which of the following nerves innervates +the serratus anterior muscle?" + :choices '("Long thoracic" "Axillary" "Spinal accessory" "Dorsal scapular" "Thoracodorsal") + :correct-answer 1 + :extra "The long thoracic is the only nerve that +innervates the serratus anterior. The axillary nerve innervates the +deltoid, the spinal accessory nerve innervates the sternocleidomastoid +and trapezius, the dorsal scapular nerve supplies the rhomboid muscles +and levator scapulae, and the latissimus dorsi is the muscle supplied +by the thoracodorsal nerve." + :tags (gnosis-dev-random-items gnosis-dev-tags 2))) + (dotimes (_ 500) + (gnosis-add-note-basic :deck "Anatomy" + :question "A question" + :hint "hint" + :answer "answer" + :extra "extra" + :tags (gnosis-dev-random-items gnosis-dev-tags 2)))) + (defun gnosis-dev-test () "Start testing env." (interactive) @@ -30,7 +57,10 @@ (make-directory gnosis-testing-dir)) (setf gnosis-db (emacsql-sqlite-open (concat gnosis-testing-dir "/testing.db"))) (gnosis-init)) - (setf gnosis-db (emacsql-sqlite-open (concat gnosis-dir "/" "gnosis.db")))))) + (setf gnosis-db (emacsql-sqlite-open (concat gnosis-dir "/" "gnosis.db")))) + (message "Adding testing values...") + (gnosis-dev-add-fields) + (message "Done."))) (provide 'gnosis-dev) ;;; gnosis-dev.el ends here |