Skip to content

Commit e9a471a

Browse files
committed
fix #126
1 parent 77dadb6 commit e9a471a

File tree

3 files changed

+7
-24
lines changed

3 files changed

+7
-24
lines changed

spec/learnwords2/LWBoxOfQuestionsSpec.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ describe("BoxOfQuestions", function() {
480480

481481

482482
expect(updatedWord.step).toBe(0);
483-
// this assumes we do not have a learn mode yet
483+
484484

485485
});
486486

@@ -550,7 +550,10 @@ describe("BoxOfQuestions", function() {
550550
expect(s.factorForDelayValue).toBeArray();
551551
expect(s.factorForDelayValue.length).toBeGreaterThan(0);
552552

553-
expect(s.offerLearnMode).toBeBoolean();
553+
expect(s.defaultInitialStepValue).toBe(-1);
554+
expect(s.numberOfOptions).toBe(4);
555+
expect(s.sessionExpiryTimeInSeconds).toBe(1800);
556+
expect(s.suggestedNumberOfWordsInASession).toBe(7);
554557

555558

556559
});
@@ -565,7 +568,7 @@ describe("BoxOfQuestions", function() {
565568
expect(st.numberOfWords).toBe(12);
566569

567570
// FIXME
568-
// add number of words in wordsToRepeat
571+
// add more expect statements
569572

570573
});
571574

src/BoxOfQuestions.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -196,27 +196,8 @@ function BoxOfQuestions(db) {
196196
_question.date = new Date().valueOf() + (this.db.getSettings()).delay;
197197

198198

199-
// put the question back at the correct step
200-
201-
var s = this.db.getSettings();
202-
// FIXME learnMode has a new interpretation
203-
if (s.offerLearnMode) { _question.step = 1;
204-
// step 0 is the learnmode, thus do not put
205-
// it at step 0
206-
// step 1 is the lowest step of the repeat mode.
207-
}
208-
else { // treat all the steps the same way, as repeat mode
209-
// thus the lowest step value is 0
210-
_question.step = 0;
199+
_question.step = 0;
211200

212-
}
213-
214-
215-
// An alternative which is not implemented:
216-
//
217-
// Set new step value to step - 1
218-
// With the result being not less than 1 or 0 depending on offerLearnMode.
219-
220201

221202
this.db.putWord(_question);
222203

src/LWdb.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ var LWdb = function(name) {
331331
value = { "delay": 8640000,
332332
"numberOfOptions": 4,
333333
"factorForDelayValue": [1,1,3,7,45,90,360,1000],
334-
"offerLearnMode": false,
335334
"defaultInitialStepValue" : _defaultInitialStepValue,
336335
"sessionExpiryTimeInSeconds" : 1800,
337336
"suggestedNumberOfWordsInASession" : 20

0 commit comments

Comments
 (0)