public function getRequirementList($studentID, $signatoryID, $sysemID)
 {
     $stud_model = new Student_Model();
     $stud_model->queryStudent_Info($studentID);
     $t_deptID = $stud_model->getStud_DeptID();
     $t_courseID = $stud_model->getStud_CourseID();
     $t_yl = $stud_model->getStud_Yearlevel();
     $t_program = $stud_model->getStud_Program();
     $arrayTemp = array();
     $this->query = mysql_query("select Requirement_ID, Title, Description, Requirement_Type, Prerequisite_Signatory from requirements \r\n                                    where Signatory_ID='{$signatoryID}' and SY_SEM_ID='{$sysemID}' and \r\n                                    (Visibility='All' or Department_ID='{$t_deptID}' or Course_ID='{$t_courseID}' or Year_Level='{$t_yl}' or Program='{$t_program}')");
     /*
     var_dump("select Requirement_ID, Title, Description from requirements 
                                 where Signatory_ID='$signatoryID' and SY_SEM_ID='$sysemID' and 
                                 (Visibility='All' or Department_ID='$t_deptID' or Course_ID='$t_courseID' or Year_Level='$t_yl' or Program='$t_program')");
     */
     while ($row = mysql_fetch_array($this->query)) {
         if ($row['Requirement_Type'] == 'Textual') {
             $status = $this->getRequirementClearanceStatus($studentID, $row['Requirement_ID']);
         } else {
             $sigID = $row['Prerequisite_Signatory'];
             if ($this->isStudentUnderSpecifiedSignatory($studentID, $sigID)) {
                 $status = $this->getOverallSignatoryClearanceStatus($studentID, $sigID, $sysemID);
                 if ($status == "No Requirements") {
                     $status = "Cleared";
                 }
             }
         }
         array_push($arrayTemp, array($row['Requirement_ID'], $row['Title'], $row['Description'], $status, $row['Requirement_Type']));
     }
     return $arrayTemp;
 }
if (!(Session::user_exist() && Session::get_Account_type() == "Student")) {
    // if it is, force the browser to redirect to the home page
    header('Location: /SOCS/index.php');
}
$sy_model = new SchoolYearSem_Model();
$signatory_model = new Signatory_Model();
$current_sy = $sy_model->getCurSchool_Year();
$current_sem = $sy_model->getCurSemester();
if ($current_sem != "Summer") {
    $current_sem .= " Semester";
}
$current_sysemID = $_GET["sy_sem_id"];
$stud_status = $_GET['status'] == "Grad" ? "Graduate" : "Under Graduate";
$student_model = new Student_Model();
$stud_id = Session::get_user();
$student_model->queryStudent_Info($stud_id);
$stud_name = $student_model->getStud_Name();
$stud_gender = $student_model->getStud_Gender();
$stud_year = $student_model->getStud_Yearlevel();
$stud_course = $student_model->getStud_Course();
$stud_dept = $student_model->getStud_DeptName();
$stud_deptID = $student_model->getStud_DeptID();
$signatorial_model = new SignatorialList_Model();
$signatorial_model->getListofSignatoryByDept($stud_deptID, $stud_status);
$listOfSignatories["name"] = $signatorial_model->getSign_Name();
$listOfSignatories["id"] = $signatorial_model->getSign_ID();
$clearance_model = new ClearanceStatus();
foreach ($listOfSignatories["id"] as $key => $value) {
    $status = $clearance_model->getOverallSignatoryClearanceStatus($stud_id, $value, $current_sysemID);
    if ($status == "No Requirements") {
        $status = "Cleared";