Refactor lesson types and update review handling
All checks were successful
Deploy to production / deploy (push) Successful in 2m22s

- Changed lesson type from 'review' to 'weekly_review' in multiple lesson definitions across phase 3 and phase 4 extensions.
- Updated the logic in the vocabService to accommodate 'weekly_review' in various methods, ensuring proper handling of weekly review lessons.
- Modified the VocabLessonView component to recognize 'weekly_review' as a valid lesson type for calculations and access checks.
- Enhanced the didactics update script to include 'weekly_review' in the lesson type checks.
- Adjusted the create scripts to reflect the new lesson type for weekly reviews.
This commit is contained in:
Torsten Schulz (local)
2026-05-27 11:34:03 +02:00
parent 664a7b3530
commit d441b4fa31
9 changed files with 131 additions and 67 deletions

View File

@@ -806,7 +806,7 @@ function generateExercisesFromDidactics(lesson) {
if (String(lesson.title || '').toLowerCase().includes('zeitformen')) {
generated.push(...buildZeitformenDrills(lesson.title));
}
} else if (lesson.lessonType === 'review' || lesson.didacticMode === 'intensive_review') {
} else if (lesson.lessonType === 'review' || lesson.lessonType === 'weekly_review' || lesson.didacticMode === 'intensive_review') {
generated = [
buildReviewChoiceExercise(lesson, didactics, patternA, lessonPool),
buildReviewChoiceExercise(lesson, didactics, patternB, lessonPool),
@@ -6188,8 +6188,8 @@ async function createBisayaCourseContent() {
exerciseNumber,
title: exercise.title,
instruction: exercise.instruction,
questionData: JSON.stringify(exercise.questionData),
answerData: JSON.stringify(exercise.answerData),
questionData: exercise.questionData,
answerData: exercise.answerData,
explanation: exercise.explanation,
createdByUserId: course.ownerUserId || systemUser.id
};
@@ -6266,8 +6266,8 @@ async function createBisayaCourseContent() {
exerciseNumber: exerciseNumber++,
title: exercise.title,
instruction: exercise.instruction,
questionData: JSON.stringify(exercise.questionData),
answerData: JSON.stringify(exercise.answerData),
questionData: exercise.questionData,
answerData: exercise.answerData,
explanation: exercise.explanation,
createdByUserId: course.ownerUserId || systemUser.id
});