Update Saqel Platform: 2026-09-02 01:23:51

This commit is contained in:
Hamza-Ayed
2026-09-02 01:23:51 +03:00
parent f4ab43d49a
commit a1c7029838
4 changed files with 43 additions and 6 deletions
@@ -392,6 +392,17 @@ class VideoController
$lesson = Database::selectOne("SELECT * FROM lessons WHERE id = ? LIMIT 1", [(int)$rawId]);
} elseif (!empty($rawId)) {
$lesson = Database::selectOne("SELECT * FROM lessons WHERE title LIKE ? OR local_path LIKE ? OR markdown_content LIKE ? LIMIT 1", ["%{$rawId}%", "%{$rawId}%", "%{$rawId}%"]);
// Flutter curriculum lessons use the manifest slug (e.g. u1_l1_*),
// while the database stores the canonical lesson title.
if (!$lesson) {
$manifestLesson = CurriculumService::findLessonById($rawId);
if ($manifestLesson && !empty($manifestLesson['title'])) {
$lesson = Database::selectOne(
"SELECT * FROM lessons WHERE title = ? OR markdown_content LIKE ? LIMIT 1",
[$manifestLesson['title'], '%' . ($manifestLesson['file'] ?? '') . '%']
);
}
}
}
if (!$lesson) {