fix enrollment logic, add financial aid, fix class distribution
Tests / PHPUnit (push) Failing after 1m6s

This commit is contained in:
root
2026-08-15 15:07:16 -04:00
parent c12bb59372
commit 4603d9ced2
95 changed files with 6892 additions and 1295 deletions
@@ -92,6 +92,10 @@ class MessagesController extends BaseController
$userRoleModel = new UserRoleModel();
//$role = session()->get('role');
$userId = session()->get('user_id');
if (empty($userId)) {
return redirect()->to('/login');
}
// Fetch the user role from the user_roles and roles tables
$role = $userRoleModel->select('roles.name')
->join('roles', 'roles.id = user_roles.role_id')
@@ -103,6 +107,11 @@ class MessagesController extends BaseController
$attachmentPath = null;
$file = $this->request->getFile('attachment');
if ($file && $file->isValid() && !$file->hasMoved()) {
$allowedExt = ['pdf', 'jpg', 'jpeg', 'png', 'gif', 'webp', 'doc', 'docx'];
$ext = strtolower((string) $file->getExtension());
if (! in_array($ext, $allowedExt, true) || $file->getSize() > 5 * 1024 * 1024) {
return redirect()->back()->with('error', 'Attachment must be a document or image under 5MB.');
}
$attachmentPath = $file->store();
}