fix: 4 critical bugs — worker argv, student dashboard visibility, teacher onboarding flow, password validation

This commit is contained in:
Hamza-Ayed
2026-08-28 23:08:15 +03:00
parent abe862f04d
commit 1401db11d0
3 changed files with 41 additions and 39 deletions
@@ -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;