Esempio n. 1
0
 private function saveBatchInfo($batch_info)
 {
     $batch = new Acad_Model_Batch();
     try {
         $batch_id = $batch->saveInfo($batch_info);
         Zend_Registry::get('logger')->debug('batch id = ' . $batch_id);
         return $batch_id;
     } catch (Exception $e) {
         return false;
     }
 }
Esempio n. 2
0
 /**
  * fetches batch_id on the basis of batch info given
  * 
  * @param string $department_id
  * @param string $programme_id
  * @param date $batch_start
  * @return array|false
  */
 private function getBatchIds($batch_start = null, $department_id = null, $programme_id = null)
 {
     $batch_start_basis = null;
     $department_id_basis = null;
     $programme_id_basis = null;
     $batch = new Acad_Model_Batch();
     if ($batch_start) {
         $batch_start_basis = true;
         $batch->setBatch_start($batch_start);
     }
     if ($department_id) {
         $department_id_basis = true;
         $batch->setDepartment_id($department_id);
     }
     if ($programme_id) {
         $programme_id_basis = true;
         $batch->setProgramme_id($programme_id);
     }
     $batch_ids = $batch->fetchBatchIds($batch_start_basis, $department_id_basis, $programme_id_basis);
     //Zend_Registry::get('logger')->debug('member_id may be sent in as parameter'get('logger')->debug('Batch Ids : ');
     //Zend_Registry::get('logger')->debug('member_id may be sent in as parameter'get('logger')->debug($batch_ids);
     if (is_array($batch_ids)) {
         return $batch_ids;
     } else {
         if ($batch_ids == false) {
             //Zend_Registry::get('logger')->debug('member_id may be sent in as parameter'get('logger')->debug(
             //'No batch id exists for batch_start year : ' . $batch_start .
             //' department_id : ' . $department_id . ' and programme_id : ' .
             // $programme_id);
             return false;
         }
     }
 }