fix teacher, parent and admin pages

This commit is contained in:
root
2026-04-25 00:00:10 -04:00
parent 7fe34dde0d
commit 3e77fc92c7
275 changed files with 46412 additions and 3325 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
/** Stub CI helper so the partial can be included standalone. */
function base_url(string $path = ''): string
{
$path = ltrim($path, '/');
return $path === '' ? '/' : '/' . $path;
}
$root = dirname(__DIR__);
$data = include $root . '/../app_codeigniter/app/Views/policy/school_policy_partial.php';
$outDir = $root . '/public/policy';
if (!is_dir($outDir)) {
mkdir($outDir, 0777, true);
}
$json = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
if ($json === false) {
fwrite(STDERR, "json_encode failed\n");
exit(1);
}
file_put_contents($outDir . '/school-policy-content.json', $json);
echo "Wrote public/policy/school-policy-content.json\n";