<?php require_once __DIR__.'/../includes/auth.php'; require_login(['admin']); require __DIR__.'/../includes/header.php'; $courses=db()->query('SELECT c.*, lp.name path FROM courses c JOIN learning_paths lp ON lp.id=c.learning_path_id ORDER BY lp.name,c.sort_order')->fetchAll(); ?>
<div class="card"><h1>Courses</h1><table><tr><th>Path</th><th>Course</th><th>Pass Mark</th><th>Practical?</th></tr><?php foreach($courses as $c): ?><tr><td><?= htmlspecialchars($c['path']) ?></td><td><?= htmlspecialchars($c['title']) ?></td><td><?= $c['pass_mark'] ?>%</td><td><?= $c['requires_practical']?'Yes':'No' ?></td></tr><?php endforeach; ?></table></div><?php require __DIR__.'/../includes/footer.php'; ?>
