Exemplo n.º 1
0
 /**
  * Fetches class_ids in which member was admitted in the given semester(
  * Member_id must be set before calling this function )
  * @param int $batch_id batch_id of the student( Required because a student may have been admitted in more than one batch)
  * @param int $semester_id semester_id of the student
  * @return false|array 
  */
 public function fetchSemesterClassId($batch_id, $semester_id)
 {
     $class_object = new Tnp_Model_Class();
     $class_object->setBatch_id($batch_id);
     $class_object->setSemester_id($semester_id);
     return $class_object->fetchClassIds(true, true);
 }
Exemplo n.º 2
0
 /**
  * fetches $class_id on the basis of class info given
  * Enter description here ...
  * @param int $class_id
  * @param int $semester_id
  * @param bool $is_active
  */
 private function findClassIds($class_id = null, $semester_id = null, $is_active = null)
 {
     $class_id_basis = null;
     $semester_id_basis = null;
     $is_active_basis = null;
     $class = new Tnp_Model_Class();
     if ($class_id) {
         $class_id_basis = true;
         $class->setBatch_id($class_id);
     }
     if ($semester_id) {
         $semester_id_basis = true;
         $class->setSemester_id($semester_id);
     }
     if ($is_active) {
         $is_active_basis = true;
         $class->setIs_active($is_active);
     }
     $class_ids = $class->fetchClassIds($class_id_basis, $semester_id_basis, $is_active_basis);
     if (is_array($class_ids)) {
         return $class_ids;
     } else {
         return false;
     }
 }