예제 #1
0
 /**
  * Fetches Student_subject_id and Subject_id of All subjects studied by a student in an Academic Class.
  * 
  * Returns an array indexed by Student_subject_id and subject_id as values
  * Fetches the Class id of a Student
  * Member_id must be set before calling this function 
  * @param integer $class_id
  * @return array|false
  */
 public function fetchClassSubjects($class_id)
 {
     $member_id = $this->getMember_id(true);
     $student_subject_object = new Acad_Model_StudentSubject();
     $student_subject_object->setMember_id($member_id);
     $student_subject_object->setClass_id($class_id);
     $subjects = array();
     return $student_subject_object->fetchSubjects();
 }
예제 #2
0
 /**
  * CHANGE OF CONCEPT , NOW WE DONT NEED CLASS_ID AS PARAMETER
  * Enter description here ...
  * @param int $dmc_info_id
  * @param int $member_id
  */
 private function fetchDMC($dmc_info_id, $member_id)
 {
     $subject_data = array();
     $dmc_info_raw = array();
     $dmc_info_raw = self::fetchDmcInfo($member_id, $dmc_info_id);
     $student_subject = new Acad_Model_StudentSubject();
     $student_subject->setMember_id($member_id);
     $dmc_info_data = array_pop($dmc_info_raw);
     $class_id = $dmc_info_data['class_id'];
     $student_subject->setClass_id($class_id);
     $subject_ids = $student_subject->fetchSubjects();
     $student_subject_ids = array_keys($subject_ids);
     $dmc_subject_data = self::fetchDmcSubjectMarks($member_id, $dmc_info_id, $student_subject_ids);
     $subject_data = $this->fetchStudentSubjects($class_id, $member_id);
     $response = array('dmc_info_data' => $dmc_info_data, 'dmc_data' => $dmc_subject_data, 'subject_data' => $subject_data);
     return $response;
 }