Esempio n. 1
0
                    //Quick stat 1: For each request, check if the exam is 48 hours to 72 hours away
                    $exam_range_to_consider = unserialize(FACULTY_ALERTS_CONSIDER_EXAM_RANGE_DAYS_BEFORE_EXAM);
                    if (time() > \Ventus\Utilities\Functions::findNextBusinessDay(strtotime(date('Y-m-d ', strtotime($c['date'])) . FACULTY_EXAM_MODIFICATIONS_BLOCK_AFTER_TIME), -1 * $exam_range_to_consider['days_before_exam_start']) && time() < \Ventus\Utilities\Functions::findNextBusinessDay(strtotime(date('Y-m-d ', strtotime($c['date'])) . FACULTY_EXAM_MODIFICATIONS_BLOCK_AFTER_TIME), -1 * $exam_range_to_consider['days_before_exam_end'])) {
                        //If it is, check if that request already has an exam file uploaded
                        if (!$model->checkIfFileExistsForNOE($c['exam_request_id']) && !$model->checkIfDocumentReceived($c['exam_request_id'])) {
                            $quick_stat_1_changed = true;
                            $count_exams_due_48_hours++;
                        }
                    }
                    //Quick stat 2: For each NOE, check if it has no files AND no indication of paper copy being received
                    if (!$model->checkIfDocumentReceived($c['exam_request_id']) && !$model->checkIfFileExistsForNOE($c['exam_request_id'])) {
                        $quick_stat_2_changed = true;
                        $count_exams_no_files++;
                    }
                    //Quick stat 3: For each NOE, check if it has a control sheet
                    if (!$model->checkIfNoeHasControlSheet($c['exam_request_id']) && $students_confirmed_at_as > 0) {
                        $quick_stat_3_changed = true;
                        $count_exams_no_control_sheet++;
                    }
                }
                //Compile all data into a well formatted array
                $course_prof_student_request[] = array('class_id' => $c['class_id'], 'course_code' => $c['course_code'], 'course_section' => $c['course_section'], 'teach_method' => $c['teaching_method'], 'date' => $c['date'], 'exam_type' => $c['exam_type'], 'exam_duration' => $c['exam_duration'], 'exam_alternate_special' => $c['exam_alternate_special'], 'exam_alternate_special_student' => $c['exam_alternate_special_student'], 'contact_name' => $c['contact_name'], 'contact_number' => $c['contact_number'], 'requestor_email' => $c['requestor_email'], 'inserted_on' => $c['inserted_on'], 'exam_request_id' => $c['exam_request_id'], 'session' => $c['session'], 'control_sheet' => $c['control_sheet'], 'file' => $c['file'], 'professor_email' => $c['professor_email'], 'professor_name' => $c['professor_name'], 'quick_stat_1' => $quick_stat_1_changed, 'quick_stat_2' => $quick_stat_2_changed, 'quick_stat_3' => $quick_stat_3_changed);
            }
        }
    }
    $l10n->addResource(__DIR__ . '/l10n/header.json');
    $l10n->addResource(__DIR__ . '/l10n/list-exams.json');
    require_once FS_PHP . '/header-external.php';
    require_once 'views/list-exams.php';
    require_once FS_PHP . '/footer-external.php';
} elseif ($_GET['page'] === "fetch-student-statuses") {
Esempio n. 2
0
 if ($count_professor_requests > 0) {
     //If requests do exist, get each of these requests
     $course_requests = $model->fetchDataProfessorRequests($c['code'], $c['section'], $selected_semester, $c['teaching_method']);
     if (!(FACULTY_ALERTS_SHOW_ONLY_FOR_NOE_TEACH_METHODS && !in_array($c['teaching_method'], $noe_teach_methods))) {
         foreach ($course_requests as $cr) {
             //Quick stat 1: For each request, check if the exam is 48 hours to 72 hours away
             $exam_range_to_consider = unserialize(FACULTY_ALERTS_CONSIDER_EXAM_RANGE_DAYS_BEFORE_EXAM);
             if (time() > \Ventus\Utilities\Functions::findNextBusinessDay(strtotime(date('Y-m-d ', strtotime($cr['exam_date'])) . FACULTY_EXAM_MODIFICATIONS_BLOCK_AFTER_TIME), -1 * $exam_range_to_consider['days_before_exam_start']) && time() < \Ventus\Utilities\Functions::findNextBusinessDay(strtotime(date('Y-m-d ', strtotime($cr['exam_date'])) . FACULTY_EXAM_MODIFICATIONS_BLOCK_AFTER_TIME), -1 * $exam_range_to_consider['days_before_exam_end'])) {
                 //If it is, check if that request already has an exam file uploaded
                 if (!$noes->checkIfFileExistsForNOE($cr['exam_request_id']) && !$noes->checkIfDocumentReceived($cr['exam_request_id']) && $model->fetchCountStudentsConfirmedAtAS($cr['exam_request_id']) > 0 && (int) $num_students > 0) {
                     $quick_stat_1_changed = true;
                     $count_exams_due_48_hours++;
                 }
             }
             //Quick stat 3: For each request that is in the future, check if a file exists but a control sheet doesnt
             if (time() < strtotime($cr['exam_date']) && $noes->checkIfFileExistsForNOE($cr['exam_request_id']) && !$noes->checkIfNoeHasControlSheet($cr['exam_request_id'])) {
                 $quick_stat_3_changed = true;
                 $count_files_no_control_sheet++;
             }
         }
     }
 }
 //Processing for quick stat 2: Get all courses that have students in them but are missing exam requests
 $quick_stat_2_changed = false;
 if ($count_professor_requests <= 0 && $num_students > 0) {
     $quick_stat_2_changed = true;
     $count_courses_missing_requests++;
 }
 //Processing to calculate the number of students registered with Access Service (for a given user)
 $count_all_access_service_students += (int) $num_students;
 //Provessing to calculate the total number of course that have at least Access Service student (for a given user)