Commit a2a258a1 authored by Curtis Adam's avatar Curtis Adam

Leitner workload: Add a setting to reverse the fill up direction and enable it by default

parent 93cdf6c4
......@@ -289,6 +289,10 @@ export let LeitnerUtilities = class LeitnerUtilities {
console.log("===> Sum of missing cards: " + missingCardsSum);
}
let fillUpCount = 0;
if (!config.fillUpFromLeftToRight) {
boxActiveCardCap.reverse();
missingCardCount.reverse();
}
for (let i = 0; i < missingCardCount.length; i++) {
if (missingCardsSum > 0 && missingCardCount[i] < 0) {
if (missingCardsSum > (-missingCardCount[i])) {
......@@ -300,6 +304,9 @@ export let LeitnerUtilities = class LeitnerUtilities {
missingCardsSum -= fillUpCount;
}
}
if (!config.fillUpFromLeftToRight) {
boxActiveCardCap.reverse();
}
return boxActiveCardCap;
}
......
//For Leitner Modal related settings, see bonusForm.js
// Attempt to fill missing slots if there are not enough cards available to reach the max workload
let fillUpMissingCards = true;
// true = Start from box1
// false = Start from box5
let fillUpFromLeftToRight = false;
// What should happen to a persons workload if the deadline got passed (Excludes cards in box 6 = learned)?
// 0 = Reset all active cards to the previous box
// 1 = Reset all active cards to the first box
......@@ -19,6 +25,7 @@ let boxAlgorithm = [0.5, 0.2, 0.15, 0.1, 0.05];
module.exports = {
fillUpMissingCards,
fillUpFromLeftToRight,
boxAlgorithm,
resetDeadlineMode,
wrongAnswerMode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment