Exemple #1
0
 /**
  * Método que exibe o feedback ao professor
  */
 public function feedback($pk_usuario_professor = 0, $pk_usuario = 0)
 {
     ini_set('error_reporting', E_ALL);
     ini_set('display_errors', TRUE);
     $data = $this->getParametroVisao();
     $data['abaAtivaMae'] = 1;
     $data['abaAtiva'] = 8;
     $data['abaPage'] = $data['alias'] = __FUNCTION__;
     $data['page'] = 'home';
     $data['msg'] = $this->getMsg();
     $data['tema'] != '' ? $this->load->setTheme($data['tema']) : '';
     $this->load->helper("formatar_numero");
     try {
         //Configurando o filtro de professores
         $filtros = new GGE\Lib\Filter\Filtros();
         $filtros->initGets("professor");
         if ($filtros->issetGet("professor")) {
             $sqlProfessor = new docentes\models\Sql\SqlResumoProfessor();
             $data["professorResumo"] = $sqlProfessor->get($filtros->get("professor"));
         }
         $data["filtro"] = $filtros;
         $data["js"] = array("js/plugins/filtros/js/filtros.min.js");
         $data["css"] = array("js/plugins/filtros/css/filtros.min.css");
         $this->load->view($this->load->getUrlTema(), $data);
     } catch (Kernel\Exception\UsuarioException $exc) {
         echo Javascript::alert($exc->getMessage());
         die(Javascript::history_back());
     } catch (\GGE\Lib\Sql\Exception\SqlException $exc) {
         echo Javascript::alert("Ocorreu um erro interno. " . "Tente novamente mais tarde");
         die(Javascript::history_back());
     } catch (\GGE\Lib\Base\Exception $exc) {
         echo Javascript::alert($exc->getMessage());
         die(Javascript::history_back());
     }
 }
Exemple #2
0
 /**
  * Método que altera o statsus da permissão de exclusão do anexo
  */
 private function statusExclusaoAnexo()
 {
     header('Content-Type: application/json; charset=UTF-8');
     try {
         $sqlAnexo = new aula\models\dao\SqlAnexosAula();
         $filtros = new \GGE\Lib\Filter\Filtros();
         $filtros->initGets("anexo");
         $anexo = $sqlAnexo->get($filtros->get("anexo"));
         $anexo->invertePermDeletar();
         $sqlAnexo->update($anexo);
         die(json_encode(array("status" => true, "msg" => "Status alterado com sucesso")));
     } catch (Exception $exc) {
         die(json_encode(array("status" => false, "msg" => $exc->getMessage())));
     }
 }