From 1401db11d011da7272020619bcd377241dd7cc99 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Fri, 28 Aug 2026 23:08:15 +0300 Subject: [PATCH] =?UTF-8?q?fix:=204=20critical=20bugs=20=E2=80=94=20worker?= =?UTF-8?q?=20argv,=20student=20dashboard=20visibility,=20teacher=20onboar?= =?UTF-8?q?ding=20flow,=20password=20validation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/Controllers/CurriculumController.php | 7 ++- backend/app/Views/StudentPortal.php | 10 +-- backend/app/Views/TeacherPortal.php | 63 ++++++++++--------- 3 files changed, 41 insertions(+), 39 deletions(-) diff --git a/backend/app/Controllers/CurriculumController.php b/backend/app/Controllers/CurriculumController.php index 52b76b6..a5ccc3e 100644 --- a/backend/app/Controllers/CurriculumController.php +++ b/backend/app/Controllers/CurriculumController.php @@ -73,9 +73,10 @@ class CurriculumController error_reporting(E_ALL); ob_start(); - // Execute the script logic natively by setting argv - $argv = ['curriculum_worker.php', $taskId]; - $_SERVER['argv'] = $argv; + // CRITICAL: Set $GLOBALS['argv'] so the required worker script can access $argv[1] + // (In a web request, $argv is empty — we must set it globally before requiring the worker) + $GLOBALS['argv'] = ['curriculum_worker.php', $taskId]; + $_SERVER['argv'] = $GLOBALS['argv']; require $scriptPath; diff --git a/backend/app/Views/StudentPortal.php b/backend/app/Views/StudentPortal.php index fe01635..15397e3 100644 --- a/backend/app/Views/StudentPortal.php +++ b/backend/app/Views/StudentPortal.php @@ -637,7 +637,7 @@ class StudentPortal -
+