Update Saqel Platform: 2026-09-04 02:04:43

This commit is contained in:
Hamza-Ayed
2026-09-04 02:04:43 +03:00
parent 58c3c48f69
commit 1fe97bf3eb
16 changed files with 5996 additions and 183 deletions
@@ -371,6 +371,31 @@ class CurriculumService
return [];
}
public static function saveLessonLabData(string $relativePath, array $labData): bool
{
self::ensureStorage();
$baseName = preg_replace('/\.md$/i', '', ltrim($relativePath, '/'));
$jsonPath = self::$storagePath . '/' . $baseName . '_lab.json';
$dir = dirname($jsonPath);
if (!is_dir($dir)) {
mkdir($dir, 0777, true);
}
return file_put_contents($jsonPath, json_encode($labData, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)) !== false;
}
public static function getLessonLabData(string $relativePath): array
{
self::ensureStorage();
$baseName = preg_replace('/\.md$/i', '', ltrim($relativePath, '/'));
$jsonPath = self::$storagePath . '/' . $baseName . '_lab.json';
if (file_exists($jsonPath)) {
return json_decode(file_get_contents($jsonPath), true) ?: [];
}
return [];
}
/**
* Fast Keyword Search across All Markdown Files
*/