word/quiz: report table to save user actions
[sheet.git] / word / multichoice.js
index ca6843af1e992be47e3e8777b006f8fda121c177..f0520f9d428cccbcc376a89eecb7e2f2c960d884 100644 (file)
@@ -9,9 +9,11 @@ class WordMultiChoice extends WordQuiz {
 
                let answers = [word[0], this.words[0][0], this.words[1][0], this.words[2][0]]
                        .shuffle()
+               this.log('ask', word[2], answers);
                answers.forEach(suggest => {
                        let label = suggest.replace(/\/.*/, '');
                        let option = put(form, 'li', label, {onclick: () => {
+                               this.log('pick', suggest, null, word[0]);
                                if (suggest != word[0]) {
                                        // incorrect
                                        put(option, '.wrong');