Пример #1
0
 public function question_types()
 {
     $question_types_service = new Question_types_service();
     $data['question_types'] = $question_types_service->get_published_question_types($this->session->userdata('USER_LOCATION'));
     $partials = array('content' => 'questionnaire/question_types');
     //load the view
     $this->template->load('template/main_template', $partials, $data);
     //load teh template
 }
Пример #2
0
 public function generate_feedback_export()
 {
     $patients_feed_service = new Patients_feeds_service();
     $question_type_service = new Question_types_service();
     $location_id = $this->session->userdata('USER_LOCATION');
     $month = $this->input->get('month', TRUE);
     $questionnaire = $this->input->get('questionnaire', TRUE);
     $date = date('n', strtotime($this->input->get('month', TRUE)));
     $data['questionnaire'] = $questionnaire;
     $data['date'] = $date;
     $data['get_month'] = $month;
     $data['feed_back_sheets'] = $patients_feed_service->get_feedbacks_for_location_by_month($location_id, $date, $questionnaire);
     $data['month'] = date('F Y', strtotime($month));
     if ($questionnaire != "") {
         $data['q_types'] = $question_type_service->get_published_question_types_for_questionnaire($location_id, $questionnaire);
     } else {
         $data['q_types'] = $question_type_service->get_published_question_types($location_id);
     }
     $data['location_id'] = $location_id;
     echo $this->load->view('reports_other/feedback_monthly_report_excel', $data, TRUE);
 }