public function edit($id = NULL) { // if ($this->input->post('name')) { // $this->data['label'] = $this->input->post('label'); // $this->data['type'] = $this->input->post('type'); // $this->question->update($data, $id); // // redirect('/admin/questions', 'refresh'); // } // // $question = $this->question->get($id); $choice = $this->choice->get_all('', array('question_id' => $id)); if (count($choice) == 0) { $choice[0]['id'] = 0; $choice[0]['label'] = ''; } //$choice = $this->choice->get_from_question( $id ); // // $this->data['question'] = $question; $this->data['data']['choice'] = $choice; parent::edit($id); // $this->data['page'] = $this->config->item('ci_my_admin_template_dir_admin') . "questions_create"; // //$this->load->view($this->_container, $data); // parent::page(); }
public function edit($id) { parent::edit($id); }