Update Saqel Platform: 2026-09-04 21:26:55
This commit is contained in:
@@ -224,10 +224,17 @@ class CurriculumLessonItemModel {
|
||||
}
|
||||
|
||||
final filePath = json['file']?.toString();
|
||||
// Default video availability: true for seeded math lessons, false for unseeded physics/english
|
||||
// Default video availability: true for core Grade 10 subjects (Math, Physics, English) and explicitly tagged lessons
|
||||
final bool isCoreTenthSubjectLesson = filePath != null && (
|
||||
filePath.contains('math_10/semester_1') ||
|
||||
filePath.contains('physics_10/semester_1') ||
|
||||
filePath.contains('english_10/semester_1') ||
|
||||
filePath.contains('lesson_01') ||
|
||||
filePath.contains('lesson_1a')
|
||||
);
|
||||
|
||||
final bool hasVideoExplicit = (json['has_video'] as bool?) ??
|
||||
((json['video_url'] != null && json['video_url'].toString().isNotEmpty) ||
|
||||
(filePath != null && filePath.contains('math_10/semester_1/unit_01/lesson_01')));
|
||||
((json['video_url'] != null && json['video_url'].toString().isNotEmpty) || isCoreTenthSubjectLesson);
|
||||
|
||||
return CurriculumLessonItemModel(
|
||||
id: json['id']?.toString() ?? 'lesson_${DateTime.now().millisecondsSinceEpoch}',
|
||||
|
||||
Reference in New Issue
Block a user