$updateDone = Report::updateProjectTopicOtherText($reportUpdate[ReportFetcher::DB_COLUMN_ID], $reportUpdate[ReportFetcher::DB_COLUMN_PROJECT_TOPIC_OTHER], $projectTopicOtherNew); $updateDone = Report::updateOtherText($reportUpdate[ReportFetcher::DB_COLUMN_ID], $reportUpdate[ReportFetcher::DB_COLUMN_OTHER_TEXT_AREA], $otherTextArea) || $updateDone; $updateDone = Report::updateStudentsConcerns($reportUpdate[ReportFetcher::DB_COLUMN_ID], $reportUpdate[ReportFetcher::DB_COLUMN_STUDENT_CONCERNS], $studentsConcernsTextArea) || $updateDone; $updateDone = Report::updateRelevantFeedbackGuidelines($reportUpdate[ReportFetcher::DB_COLUMN_ID], $reportUpdate[ReportFetcher::DB_COLUMN_RELEVANT_FEEDBACK_OR_GUIDELINES], $relevantFeedbackGuidelines) || $updateDone; $updateDone = Report::updateStudentBroughtAlong($reportUpdate[ReportFetcher::DB_COLUMN_ID], $studentBroughtAlongNew, $studentBroughtAlongOld) || $updateDone; $updateDone = Report::updatePrimaryFocusOfConference($reportUpdate[ReportFetcher::DB_COLUMN_ID], $primaryFocusOfConferenceNew, $primaryFocusOfConferenceOld) || $updateDone; $updateDone = Report::updateAdditionalComments($reportUpdate[ReportFetcher::DB_COLUMN_ID], $reportUpdate[ReportFetcher::DB_COLUMN_ADDITIONAL_COMMENTS], $conclusionAdditionalComments) || $updateDone; $updateDone = Report::updateConclusionWrapUp($reportUpdate[ReportFetcher::DB_COLUMN_ID], $conclusionWrapUpNew, $conclusionWrapUpOld) || $updateDone; } else { $updateDone = Report::updateAllFields($reportUpdate[ReportFetcher::DB_COLUMN_ID], $projectTopicOtherNew, $otherTextArea, $studentsConcernsTextArea, $relevantFeedbackGuidelines, $studentBroughtAlongNew, $studentBroughtAlongOld, $conclusionAdditionalComments, $primaryFocusOfConferenceNew, $primaryFocusOfConferenceOld, $conclusionWrapUpNew, $conclusionWrapUpOld); // user is tutor requesting fill report if ($user->isTutor()) { ReportFetcher::updateLabel($formReportId, Report::LABEL_MESSAGE_PENDING_VALIDATION, Report::LABEL_COLOR_WARNING); } else { // user is secretary confirming report ReportFetcher::updateLabel($formReportId, Report::LABEL_MESSAGE_COMPLETE, Report::LABEL_COLOR_SUCCESS); } } if (!$updateDone) { throw new Exception("No new data inserted."); } } if (isUrlRqstngManualReportEnable()) { if ($studentsAppointmentData[0][AppointmentHasStudentFetcher::DB_COLUMN_REPORT_ID] === null && $nowDateTime > $startDateTime) { $students = AppointmentHasStudentFetcher::retrieveStudentsWithAppointment($appointmentId); $appointment = Appointment::getSingle($appointmentId); foreach ($students as $student) { $reportId = ReportFetcher::insert($student[AppointmentHasStudentFetcher::DB_COLUMN_STUDENT_ID], $student[AppointmentHasStudentFetcher::DB_COLUMN_ID], $student[AppointmentHasStudentFetcher::DB_COLUMN_INSTRUCTOR_ID]); } AppointmentFetcher::updateLabel($appointmentId, Appointment::LABEL_MESSAGE_COMPLETE, Appointment::LABEL_COLOR_SUCCESS); if (!$user->isTutor()) {
public static function updateLabel($formReportId, $message, $color) { ReportFetcher::updateLabel($formReportId, $message, $color); }