Implement verified curriculum, video review, watch sessions, ledger safeguards, and remove demo data

This commit is contained in:
Hamza-Ayed
2026-09-09 17:04:08 +03:00
parent 0dc5df7b5e
commit 5af684a892
49 changed files with 1809 additions and 3005 deletions
+10
View File
@@ -19,6 +19,16 @@ function updateVideoTask(string $file, array $changes): void {
if ($taskId === '' || !file_exists($stateFile)) exit(1);
$task = json_decode(file_get_contents($stateFile), true) ?: [];
// Legacy worker has no teacher_submission/video_version binding and therefore
// cannot prove which curriculum lesson or candidate it is publishing. Keep the
// uploaded file for an operator; do not create or overwrite a lesson by title.
updateVideoTask($stateFile, [
'status' => 'needs_submission_pipeline',
'progress' => 0,
'message' => 'هذا العامل موقوف حتى يمرر مسار الإرسال نسخة فيديو مرتبطة بالدرس المنهجي.',
]);
exit(2);
try {
updateVideoTask($stateFile, ['status' => 'processing', 'progress' => 15, 'message' => 'جاري تحويل الفيديو إلى HLS...']);
$file = (string)($task['file'] ?? '');