public static function handleDashboardRequest() { if (!empty($_GET['content-area'])) { if (ctype_digit($_GET['content-area'])) { $ContentArea = ContentArea::getByID($_GET['content-area']); } else { $ContentArea = ContentArea::getByCode($_GET['content-area']); } } return static::respond('student-dashboard', ['Student' => static::_getRequestedStudent(), 'ContentArea' => $ContentArea]); }
public static function handleDashboardRequest() { if (!empty($_GET['content-area'])) { if (ctype_digit($_GET['content-area'])) { $ContentArea = ContentArea::getByID($_GET['content-area']); } else { $ContentArea = ContentArea::getByCode($_GET['content-area']); } } if (!empty($_GET['students'])) { try { $students = Student::getAllByListIdentifier($_GET['students']); } catch (\Exception $e) { return static::throwNotFoundError('Unable to load students list: ' . $e->getMessage()); } } return static::respond('teacher-dashboard', ['ContentArea' => $ContentArea, 'students' => $students]); }