add new lesson mode and started code refraction

This commit is contained in:
Rene Kievits
2025-12-20 04:31:15 +01:00
parent 6438660b03
commit 4428a2b7be
101 changed files with 12255 additions and 8172 deletions

View File

@@ -34,6 +34,11 @@ export const getUserStats = async (user) => {
}).select('srsLevel');
const queueCount = queueItems.length;
const lessonCount = await StudyItem.countDocuments({
userId: userId,
srsLevel: 0
});
let hasLowerLevels = false;
let lowerLevelCount = 0;
if (queueCount > 0) {
@@ -94,6 +99,7 @@ export const getUserStats = async (user) => {
distribution: dist,
forecast: forecast,
queueLength: queueCount,
lessonCount: lessonCount,
hasLowerLevels,
lowerLevelCount,
heatmap: heatmap,