/**
  * Ftehces information about a batch on the basis of Btach_id
  * 
  * @param int $batch_id
  */
 private function findBatchInfo($batch_id)
 {
     $batch = new Core_Model_Batch();
     $batch->setBatch_id($batch_id);
     $info = $batch->fetchInfo();
     if ($info instanceof Core_Model_Batch) {
         $batch_info = array();
         $batch_info['department_id'] = $info->getDepartment_id();
         $batch_info['programme_id'] = $info->getProgramme_id();
         $batch_info['batch_start'] = $info->getBatch_start();
         $batch_info['batch_number'] = $info->getBatch_number();
         $batch_info['is_active'] = $info->getIs_active();
         return $batch_info;
     } else {
         return false;
     }
 }
Example #2
0
 private function saveBatchInfo($batch_info)
 {
     $batch = new Core_Model_Batch();
     try {
         $batch_id = $batch->saveInfo($batch_info);
         Zend_Registry::get('logger')->debug('batch id = ' . $batch_id);
         return $batch_id;
     } catch (Exception $e) {
         /*Zend_Registry::get('logger')->debug($e);
           throw new Exception(
           'There was some error saving batch information in core. Please try again', 
           Zend_Log::WARN);*/
         return false;
     }
 }