diff --git a/spec/learnwords2/LWBoxOfQuestionsSpec.js b/spec/learnwords2/LWBoxOfQuestionsSpec.js index 22235bb..e925542 100644 --- a/spec/learnwords2/LWBoxOfQuestionsSpec.js +++ b/spec/learnwords2/LWBoxOfQuestionsSpec.js @@ -480,7 +480,7 @@ describe("BoxOfQuestions", function() { expect(updatedWord.step).toBe(0); - // this assumes we do not have a learn mode yet + }); @@ -550,7 +550,10 @@ describe("BoxOfQuestions", function() { expect(s.factorForDelayValue).toBeArray(); expect(s.factorForDelayValue.length).toBeGreaterThan(0); - expect(s.offerLearnMode).toBeBoolean(); + expect(s.defaultInitialStepValue).toBe(-1); + expect(s.numberOfOptions).toBe(4); + expect(s.sessionExpiryTimeInSeconds).toBe(1800); + expect(s.suggestedNumberOfWordsInASession).toBe(7); }); @@ -565,7 +568,7 @@ describe("BoxOfQuestions", function() { expect(st.numberOfWords).toBe(12); // FIXME - // add number of words in wordsToRepeat + // add more expect statements }); diff --git a/src/BoxOfQuestions.js b/src/BoxOfQuestions.js index bbb78a6..6e1ad48 100644 --- a/src/BoxOfQuestions.js +++ b/src/BoxOfQuestions.js @@ -196,27 +196,8 @@ function BoxOfQuestions(db) { _question.date = new Date().valueOf() + (this.db.getSettings()).delay; - // put the question back at the correct step - - var s = this.db.getSettings(); - // FIXME learnMode has a new interpretation - if (s.offerLearnMode) { _question.step = 1; - // step 0 is the learnmode, thus do not put - // it at step 0 - // step 1 is the lowest step of the repeat mode. - } - else { // treat all the steps the same way, as repeat mode - // thus the lowest step value is 0 - _question.step = 0; + _question.step = 0; - } - - - // An alternative which is not implemented: - // - // Set new step value to step - 1 - // With the result being not less than 1 or 0 depending on offerLearnMode. - this.db.putWord(_question); diff --git a/src/LWdb.js b/src/LWdb.js index 14e8dda..36d6845 100644 --- a/src/LWdb.js +++ b/src/LWdb.js @@ -331,7 +331,6 @@ var LWdb = function(name) { value = { "delay": 8640000, "numberOfOptions": 4, "factorForDelayValue": [1,1,3,7,45,90,360,1000], - "offerLearnMode": false, "defaultInitialStepValue" : _defaultInitialStepValue, "sessionExpiryTimeInSeconds" : 1800, "suggestedNumberOfWordsInASession" : 20