Update Saqel Platform: 2026-09-02 01:23:51
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user