feat(vocab): enhance vocabService and VocabLessonView for improved exercise handling
All checks were successful
Deploy to production / deploy (push) Successful in 2m58s
All checks were successful
Deploy to production / deploy (push) Successful in 2m58s
- Updated VocabService to include validation for synthetic exercise IDs and added methods for generating multiple-choice exercises based on chapter lexemes. - Implemented a seeded shuffle function to randomize distractor options in multiple-choice questions, ensuring varied user experiences. - Modified VocabLessonView to adjust target calculations for lesson goals and unlock attempts, increasing the maximum limits for better flexibility in user progress tracking.
This commit is contained in:
@@ -979,7 +979,7 @@ export default {
|
||||
const durationBonus = Math.max(0, Math.round((this.lesson?.targetMinutes || 0) / 5) - 1);
|
||||
const baseTarget = Math.ceil((Math.max(vocabCount, 4) * 1.35) + (exerciseCount * 0.35) + durationBonus);
|
||||
const weightedTarget = Math.ceil(baseTarget * this.lessonComplexityWeight);
|
||||
return Math.min(24, Math.max(6, weightedTarget));
|
||||
return Math.max(6, Math.min(120, weightedTarget));
|
||||
},
|
||||
trainerReviewBlendStart() {
|
||||
return Math.max(3, Math.ceil(this.trainerNewFocusTarget * 0.4));
|
||||
@@ -989,7 +989,7 @@ export default {
|
||||
},
|
||||
trainerExerciseUnlockAttempts() {
|
||||
const unlockTarget = this.trainerNewFocusTarget + Math.ceil((this.effectiveExercises?.length || 0) * 0.25);
|
||||
return Math.min(28, Math.max(6, unlockTarget));
|
||||
return Math.max(6, Math.min(140, unlockTarget));
|
||||
},
|
||||
currentReviewShare() {
|
||||
if (!this.hasPreviousVocab) {
|
||||
|
||||
Reference in New Issue
Block a user