Beispiel #1
0
 /**
  * Fetches Batch Id of a Student,
  * Member_id must be set before calling this function 
  * @return int the Batch_id of student
  */
 public function fetchBatchId()
 {
     $member_id = $this->getMember_id(true);
     $student_class_object = new Core_Model_StudentClass();
     $student_class_object->setMember_id($member_id);
     $batch_identifier_class_id = $student_class_object->fetchBatchIdentifierClassId();
     $class_object = new Core_Model_Class();
     $class_object->setClass_id($batch_identifier_class_id);
     $class_object->fetchInfo();
     $batch_id = $class_object->getBatch_id();
     return $batch_id;
 }
 /**
  * Fetches information about a class on the basis of Class_id
  * 
  * @param int $class_id
  */
 private function findClassInfo($class_id)
 {
     $class = new Core_Model_Class();
     $class->setClass_id($class_id);
     $info = $class->fetchInfo();
     if ($info instanceof Core_Model_Class) {
         $class_info = array();
         $class_info['class_id'] = $info->getClass_id();
         $class_info['batch_id'] = $info->getBatch_id();
         $class_info['semester_id'] = $info->getSemester_id();
         $class_info['semester_type'] = $info->getSemester_type();
         $class_info['semester_duration'] = $info->getSemester_duration();
         $class_info['handled_by_dept'] = $info->getHandled_by_dept();
         $class_info['start_date'] = $info->getStart_date();
         $class_info['completion_date'] = $info->getCompletion_date();
         $class_info['is_active'] = $info->getIs_active();
         return $class_info;
     } else {
         return false;
     }
 }