Esempio n. 1
0
{
    return $studentsAppointmentData[0][AppointmentHasStudentFetcher::DB_COLUMN_REPORT_ID] !== null;
}
try {
    if (!isUrlValid() || $user->isTutor() && !Tutor::hasAppointmentWithId($user->getId(), $_GET['appointmentId'])) {
        header('Location: ' . BASE_URL . "error-403");
        exit;
    }
    date_default_timezone_set('Europe/Athens');
    $pageTitle = "Single Appointment";
    $appointmentId = $_GET['appointmentId'];
    $studentsAppointmentData = Appointment::getAllStudentsWithAppointment($appointmentId);
    $terms = TermFetcher::retrieveCurrTerm();
    $students = StudentFetcher::retrieveAll();
    $courses = CourseFetcher::retrieveForTerm($studentsAppointmentData[0][AppointmentFetcher::DB_COLUMN_TERM_ID]);
    $instructors = InstructorFetcher::retrieveAll();
    $tutors = TutorFetcher::retrieveAll();
    $startDateTime = new DateTime($studentsAppointmentData[0][AppointmentFetcher::DB_COLUMN_START_TIME]);
    $endDateTime = new DateTime($studentsAppointmentData[0][AppointmentFetcher::DB_COLUMN_END_TIME]);
    $nowDateTime = new DateTime();
    // load reports if they have been created
    if (reportsHaveBeenCrtd($studentsAppointmentData)) {
        $reports = Report::getAllWithAppointmentId($appointmentId);
    }
    if (isBtnUpdateReportPrsd() || isBtnCompleteReportPrsd()) {
        $formReportId = isset($_POST['form-update-report-id']) ? $_POST['form-update-report-id'] : '';
        $reportUpdate = getReport($formReportId, $reports);
        $projectTopicOtherNew = isset($_POST['project-topic-other']) ? $_POST['project-topic-other'] : '';
        $otherTextArea = isset($_POST['other_text_area']) ? $_POST['other_text_area'] : '';
        $studentsConcernsTextArea = isset($_POST['students-concerns-textarea']) ? $_POST['students-concerns-textarea'] : '';
        $studentBroughtAlong = isset($_POST['student-brought-along']) ? $_POST['student-brought-along'] : null;
Esempio n. 2
0
 public static function delete($id)
 {
     self::validateId($id);
     InstructorFetcher::delete($id);
 }