public function curso_temario_add_do()
 {
     $config['upload_path'] = './uploads/';
     $config['allowed_types'] = 'pdf';
     $config['encrypt_name'] = true;
     $this->load->library('upload', $config);
     $archivo = "";
     if ($this->upload->do_upload()) {
         $data = array('upload_data' => $this->upload->data());
         $archivo = $data['upload_data']['file_name'];
     }
     $idCurso = $this->input->post("idCurso");
     $nombre = $this->input->post("nombre");
     $descripcion = $this->input->post("descripcion");
     $padre = $this->input->post("padre");
     $this->load->model('md_temario');
     $temario = new Md_temario();
     $temario->setNombre($nombre);
     $temario->setDescripcion($descripcion);
     $temario->setPadreId($padre);
     $temario->setCursoId($idCurso);
     $temario->setArchivo($archivo);
     $temario->save();
     redirect("admin/curso_temario/{$idCurso}");
 }