From 06163685a772c8d5a3b868bd26bbfc14671bf257 Mon Sep 17 00:00:00 2001 From: Eriksen Costa Paixão Date: Sun, 30 May 2010 16:33:28 +0000 Subject: [PATCH] Removido relatório '''Diário de freqência temporário'''. O relatório '''Diário de frequência''' desempenha a mesma função opcionalmente, diminuindo a duplicidade de código e a quantidade de itens de permissão e menus --- ieducar/configuration/ieducar.ini | 3 +++ ieducar/intranet/educar_relatorio_diario_classe.php | 44 +++++--------------------------------------- ieducar/intranet/educar_relatorio_diario_classe_proc.php | 46 +++++++++++++++++++++++++++++++++++++++++----- ieducar/intranet/educar_relatorio_diario_classe_temp.php | 316 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ieducar/intranet/educar_relatorio_diario_classe_temp_proc.php | 917 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ieducar/intranet/include/clsCampos.inc.php | 2 +- ieducar/misc/database/deltas/20_remove_permissao_e_menu_diario_avaliacao_temp.sql | 22 ++++++++++++++++++++++ ieducar/misc/database/ieducar.sql | 6 +----- 8 files changed, 73 insertions(+), 1283 deletions(-) delete mode 100644 ieducar/intranet/educar_relatorio_diario_classe_temp.php delete mode 100644 ieducar/intranet/educar_relatorio_diario_classe_temp_proc.php create mode 100644 ieducar/misc/database/deltas/20_remove_permissao_e_menu_diario_avaliacao_temp.sql diff --git a/ieducar/configuration/ieducar.ini b/ieducar/configuration/ieducar.ini index 3b258f4..1da6987 100644 --- a/ieducar/configuration/ieducar.ini +++ b/ieducar/configuration/ieducar.ini @@ -83,6 +83,9 @@ app.admin.reports.pagina_tempo = 5 app.admin.reports.emails[] = seu.email@example.com ;app.admin.reports.emails[] = seu.email.2@example.com +; Configurações de relatórios +report.diario_classe.dias_temporarios = 30 + [development : production] diff --git a/ieducar/intranet/educar_relatorio_diario_classe.php b/ieducar/intranet/educar_relatorio_diario_classe.php index e8cdda0..2fddad3 100644 --- a/ieducar/intranet/educar_relatorio_diario_classe.php +++ b/ieducar/intranet/educar_relatorio_diario_classe.php @@ -71,48 +71,11 @@ class indice extends clsCadastro var $ref_cod_escola; var $ref_cod_serie; var $ref_cod_turma; - - var $ano; - var $mes; - - var $nm_escola; - var $nm_instituicao; var $ref_cod_curso; - var $sequencial; - var $pdf; - var $pagina_atual = 1; - var $total_paginas = 1; - var $nm_professor; - var $nm_turma; - var $nm_serie; - var $nm_disciplina; - - var $page_y = 125; - - var $get_file; - - var $cursos = array(); - - var $get_link; - - var $total; - var $ref_cod_modulo; - var $meses_do_ano = array( - 1 => 'JANEIRO', - 2 => 'FEVEREIRO', - 3 => 'MARÇO', - 4 => 'ABRIL', - 5 => 'MAIO', - 6 => 'JUNHO', - 7 => 'JULHO', - 8 => 'AGOSTO', - 9 => 'SETEMBRO', - 10 => 'OUTUBRO', - 11 => 'NOVEMBRO', - 12 => 'DEZEMBRO' - ); + var $sequencial; + var $ano; function Inicializar() { @@ -146,6 +109,9 @@ class indice extends clsCadastro $this->campoCheck('em_branco', 'Relatório em branco', ''); $this->campoNumero('numero_registros', 'Número de linhas', '', 3, 3); + $this->campoCheck('temporario', 'Gerar lista temporária?', '', + 'Gera lista de alunos mesmo para os componentes curriculares ' . + 'não definidos no quadro de horário da turma.'); $get_escola = TRUE; $obrigatorio = TRUE; diff --git a/ieducar/intranet/educar_relatorio_diario_classe_proc.php b/ieducar/intranet/educar_relatorio_diario_classe_proc.php index 2b61231..c372f78 100644 --- a/ieducar/intranet/educar_relatorio_diario_classe_proc.php +++ b/ieducar/intranet/educar_relatorio_diario_classe_proc.php @@ -107,14 +107,27 @@ class indice extends clsCadastro var $ref_cod_modulo; var $data_ini, $data_fim; + /** + * Define se será gerado uma lista com uma quantidade de dias padrão + * (report.diario_classe.dias_temporario) caso o componente curricular não + * esteja atribuído no quadro de horário da turma. + * + * @var bool + */ + var $temporario = FALSE; + function renderHTML() { + global $coreExt; + if ($_POST) { foreach ($_POST as $key => $value) { $this->$key = $value; } } + $this->temporario = isset($_POST['temporario']) ? TRUE : FALSE; + if ($this->ref_ref_cod_serie) { $this->ref_cod_serie = $this->ref_ref_cod_serie; } @@ -295,6 +308,9 @@ class indice extends clsCadastro $quadro_horario = $obj_quadro->lista(NULL, NULL, NULL, $this->ref_cod_turma, NULL, NULL, NULL, NULL, 1); + $total_semanas = 0; + $this->indefinido = FALSE; + if (!$quadro_horario) { echo ' \ No newline at end of file diff --git a/ieducar/intranet/educar_relatorio_diario_classe_temp_proc.php b/ieducar/intranet/educar_relatorio_diario_classe_temp_proc.php deleted file mode 100644 index d0ce390..0000000 --- a/ieducar/intranet/educar_relatorio_diario_classe_temp_proc.php +++ /dev/null @@ -1,917 +0,0 @@ - - * - * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo - * sob os termos da Licença Pública Geral GNU conforme publicada pela Free - * Software Foundation; tanto a versão 2 da Licença, como (a seu critério) - * qualquer versão posterior. - * - * Este programa é distribuí­do na expectativa de que seja útil, porém, SEM - * NENHUMA GARANTIA; nem mesmo a garantia implí­cita de COMERCIABILIDADE OU - * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral - * do GNU para mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto - * com este programa; se não, escreva para a Free Software Foundation, Inc., no - * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. - * - * @author Prefeitura Municipal de Itajaí - * @category i-Educar - * @license @@license@@ - * @package iEd_Pmieducar - * @since Arquivo disponível desde a versão 1.0.0 - * @version $Id$ - */ - -require_once 'include/clsBase.inc.php'; -require_once 'include/clsCadastro.inc.php'; -require_once 'include/clsBanco.inc.php'; -require_once 'include/pmieducar/geral.inc.php'; -require_once 'include/clsPDF.inc.php'; - -/** - * clsIndexBase class. - * - * @author Prefeitura Municipal de Itajaí - * @category i-Educar - * @license @@license@@ - * @package iEd_Pmieducar - * @since Classe disponível desde a versão 1.0.0 - * @version @@package_version@@ - */ -class clsIndexBase extends clsBase -{ - function Formular() - { - $this->SetTitulo($this->_instituicao . ' i-Educar - Diário de Classe'); - $this->processoAp = 927; - $this->renderMenu = FALSE; - $this->renderMenuSuspenso = FALSE; - } -} - -/** - * indice class. - * - * @author Prefeitura Municipal de Itajaí - * @category i-Educar - * @license @@license@@ - * @package iEd_Pmieducar - * @since Classe disponível desde a versão 1.0.0 - * @version @@package_version@@ - */ -class indice extends clsCadastro -{ - var $pessoa_logada; - - var $ref_cod_instituicao; - var $ref_cod_escola; - var $ref_cod_serie; - var $ref_cod_turma; - - var $ano; - var $mes; - var $mes_inicial; - var $mes_final; - - var $nm_escola; - var $nm_instituicao; - var $ref_cod_curso; - var $sequencial; - var $pdf; - var $pagina_atual = 1; - var $total_paginas = 1; - var $nm_professor; - var $nm_turma; - var $nm_serie; - var $nm_disciplina; - - var $numero_registros; - var $em_branco; - - var $page_y = 125; - - var $get_file; - - var $cursos = array(); - - var $get_link; - - var $total; - - var $ref_cod_modulo; - var $data_ini,$data_fim; - - var $z = 0; - - var $meses_do_ano = array( - 1 => 'JANEIRO', - 2 => 'FEVEREIRO', - 3 => 'MARÇO', - 4 => 'ABRIL', - 5 => 'MAIO', - 6 => 'JUNHO', - 7 => 'JULHO', - 8 => 'AGOSTO', - 9 => 'SETEMBRO', - 10 => 'OUTUBRO', - 11 => 'NOVEMBRO', - 12 => 'DEZEMBRO' - ); - - var $indefinido; - - function renderHTML() - { - if ($_POST){ - foreach ($_POST as $key => $value) { - $this->$key = $value; - } - } - - if ($this->ref_ref_cod_serie) { - $this->ref_cod_serie = $this->ref_ref_cod_serie; - } - - $fonte = 'arial'; - $corTexto = '#000000'; - - if (empty($this->ref_cod_turma)) { - echo ' - '; - - return TRUE; - } - - $modulo_sequencial = explode('-', $this->ref_cod_modulo); - $this->ref_cod_modulo = $modulo_sequencial[0]; - $this->sequencial = $modulo_sequencial[1]; - - if ($this->ref_cod_escola) { - $obj_escola = new clsPmieducarEscola($this->ref_cod_escola); - $det_escola = $obj_escola->detalhe(); - $this->nm_escola = $det_escola['nome']; - - $obj_instituicao = new clsPmieducarInstituicao($det_escola['ref_cod_instituicao']); - $det_instituicao = $obj_instituicao->detalhe(); - $this->nm_instituicao = $det_instituicao['nm_instituicao']; - } - - $obj_calendario = new clsPmieducarEscolaAnoLetivo(); - $lista_calendario = $obj_calendario->lista($this->ref_cod_escola, $this->ano, - NULL, NULL, NULL, NULL, NULL, NULL, NULL,1, NULL); - - $obj_turma = new clsPmieducarTurma($this->ref_cod_turma); - $det_turma = $obj_turma->detalhe(); - $this->nm_turma = $det_turma['nm_turma']; - - $obj_serie = new clsPmieducarSerie($this->ref_cod_serie); - $det_serie = $obj_serie->detalhe(); - $this->nm_serie = $det_serie['nm_serie']; - - $obj_pessoa = new clsPessoa_($det_turma["ref_cod_regente"]); - $det = $obj_pessoa->detalhe(); - $this->nm_professor = $det["nome"]; - - if (!$lista_calendario) { - echo ' - '; - - return TRUE; - } - - $altura_linha = 23; - $inicio_escrita_y = 175; - - $obj = new clsPmieducarSerie(); - $obj->setOrderby('cod_serie, etapa_curso'); - $lista_serie_curso = $obj->lista(NULL, NULL, NULL, $this->ref_cod_curso, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, $this->ref_cod_instituicao); - - $obj_curso = new clsPmieducarCurso($this->ref_cod_curso); - $det_curso = $obj_curso->detalhe(); - - if ($det_curso['falta_ch_globalizada']) { - /** - * numero de semanas dos meses - */ - $db = new clsBanco(); - - $consulta = sprintf('SELECT padrao_ano_escolar FROM pmieducar.curso WHERE cod_curso = %d', - $this->ref_cod_curso); - - $padrao_ano_escolar = $db->CampoUnico($consulta); - - $total_semanas = 0; - - if ($padrao_ano_escolar) { - $meses = $db->CampoUnico(sprintf(" - SELECT - to_char(data_inicio,'dd/mm') || '-' || to_char(data_fim,'dd/mm') - FROM - pmieducar.ano_letivo_modulo, - pmieducar.modulo - WHERE - modulo.cod_modulo = ano_letivo_modulo.ref_cod_modulo - AND modulo.ativo = 1 - AND ano_letivo_modulo.ref_cod_modulo = %d - AND ano_letivo_modulo.sequencial = %d - AND ref_ano = - AND ref_ref_cod_escola = %d - ORDER BY - data_inicio, - data_fim ASC - ", $this->ref_cod_modulo, $this->sequencial, $this->ano, $this->ref_cod_escola)); - - $data = explode('-', $meses); - - if (!$this->data_ini) { - $this->data_ini = $data[0]; - } - - if (!$this->data_fim) { - $this->data_fim = $data[1]; - } - - $data_ini = explode('/', $data[0]); - $data_fim = explode('/', $data[1]); - - $meses = array($data_ini[1], $data_fim[1]); - $dias = array($data_ini[0], $data_fim[0]); - - $total_semanas = 0; - - for ($mes = (int)$meses[0]; $mes <= (int)$meses[1]; $mes++) { - $mes_final = FALSE; - - if ($mes == (int)$meses[0]) { - $dia = $dias[0]; - } - elseif ($mes == (int)$meses[1]) { - $dia = $dias[1]; - $mes_final = TRUE; - } - else { - $dia = 1; - } - - $total_semanas += $this->getNumeroDiasMes($dia, $mes, $this->ano, $mes_final); - } - } - else { - $meses = $db->CampoUnico(sprintf(" - SELECT - to_char(data_inicio,'dd/mm') || '-' || to_char(data_fim,'dd/mm') - FROM - pmieducar.turma_modulo, - pmieducar.modulo - WHERE - modulo.cod_modulo = turma_modulo.ref_cod_modulo - AND ref_cod_turma = %d - AND turma_modulo.ref_cod_modulo = %d - AND turma_modulo.sequencial = - AND to_char(data_inicio,'yyyy') = %d - ORDER BY - data_inicio, - data_fim ASC - ", $this->ref_cod_turma, $this->ref_cod_modulo, $this->sequencial, $this->ano)); - - $total_semanas = 0; - - $data = explode('-', $meses); - - if (!$this->data_ini) { - $this->data_ini = $data[0]; - } - - if (!$this->data_fim) { - $this->data_fim = $data[1]; - } - - $data_ini = explode('/', $data[0]); - $data_fim = explode('/', $data[1]); - - $meses = array($data_ini[1], $data_fim[1]); - $dias = array($data_ini[0], $data_fim[0]); - - $total_semanas = 0; - - for ($mes = $meses[0]; $mes <= $meses[1]; $mes++) { - $mes_final = FALSE; - - if ($mes == $meses[0]) { - $dia = $dias[0]; - } - elseif ($mes == $meses[1]) { - $dia = 1; - $mes_final = TRUE; - } - else { - $dia = 1; - } - - $total_semanas += $this->getNumeroDiasMes($dia, $mes, $this->ano, $mes_final); - } - } - - $this->pdf = new clsPDF('Diário de Classe - ' . $this->ano, - sprintf('Diário de Classe - %s até %s de %d', $data[0], $data[1], $this->ano), - 'A4', '', FALSE, FALSE); - - $this->mes_inicial = (int) $meses[0]; - $this->mes_final = (int) $meses[1]; - $this->pdf->largura = 842.0; - $this->pdf->altura = 595.0; - - $this->total = $total_semanas; - - if (!$this->em_branco) { - $obj_matricula_turma = new clsPmieducarMatriculaTurma(); - $obj_matricula_turma->setOrderby('nome_ascii'); - - $lista_matricula = $obj_matricula_turma->lista(NULL, $this->ref_cod_turma, - NULL, NULL, NULL, NULL, NULL, NULL, 1, $this->ref_cod_serie, - $this->ref_cod_curso, $this->ref_cod_escola, $this->ref_cod_instituicao, - NULL, NULL, array(1,2,3), NULL, NULL, $this->ano, NULL, TRUE, NULL, NULL, TRUE); - } - - if ($lista_matricula || $this->em_branco) { - $this->pdf->OpenPage(); - $this->addCabecalho(); - - if($this->em_branco) { - $lista_matricula = array(); - $this->numero_registros = $this->numero_registros ? $this->numero_registros : 20; - - for ($i = 0; $i < $this->numero_registros; $i++) { - $lista_matricula[] = ''; - } - } - - $num = 0; - foreach ($lista_matricula as $matricula) { - $num++; - - if ($this->page_y > 500) { - $this->desenhaLinhasVertical(); - $this->pdf->ClosePage(); - $this->pdf->OpenPage(); - $this->page_y = 125; - $this->addCabecalho(); - } - - $this->pdf->quadrado_relativo(30, $this->page_y, 782, 19); - - $this->pdf->escreve_relativo($matricula['nome_aluno'], 33, - $this->page_y + 4, 160, 15, $fonte, 7, $corTexto, 'left'); - - $this->pdf->escreve_relativo(sprintf('%02d', $num), 757, $this->page_y + 4, - 30, 30, $fonte, 7, $corTexto, 'left'); - - $this->page_y +=19; - } - - $this->desenhaLinhasVertical(); - - $this->rodape(); - $this->pdf->ClosePage(); - } - else { - echo ' - '; - - return; - } - - $this->pdf->CloseFile(); - $this->get_link = $this->pdf->GetLink(); - } - else - { - // Carga horária não globalizada gera uma página por disciplina - $obj_turma_disc = new clsPmieducarDisciplinaSerie(); - $obj_turma_disc->setCamposLista("ref_cod_disciplina"); - $lst_turma_disc = $obj_turma_disc->lista(null,$this->ref_cod_serie,1); - - if ($lst_turma_disc) { - $this->indefinido = FALSE; - - $this->pdf = new clsPDF('Diário de Classe - ' . $this->ano, - sprintf('Diário de Classe - %s até %s de %d', $this->data_ini, $this->data_fim, $this->ano), - 'A4', '', FALSE, FALSE - ); - - foreach ($lst_turma_disc as $disciplina) { - $obj_disc = new clsPmieducarDisciplina($disciplina); - $det_disc = $obj_disc->detalhe(); - $this->nm_disciplina = $det_disc['nm_disciplina']; - $this->page_y = 125; - - $db = new clsBanco(); - - $consulta = sprintf('SELECT padrao_ano_escolar FROM pmieducar.curso WHERE cod_curso = %d', - $this->ref_cod_curso); - - $padrao_ano_escolar = $db->CampoUnico($consulta); - - $total_semanas = 0; - - if ($padrao_ano_escolar) { - $meses = $db->CampoUnico(sprintf(" - SELECT - to_char(data_inicio,'dd/mm') || '-' || to_char(data_fim,'dd/mm') - FROM - pmieducar.ano_letivo_modulo, - pmieducar.modulo - WHERE - modulo.cod_modulo = ano_letivo_modulo.ref_cod_modulo - AND modulo.ativo = 1 - AND ano_letivo_modulo.ref_cod_modulo = %d - AND ano_letivo_modulo.sequencial = %d - AND ref_ano = %d - AND ref_ref_cod_escola = %d - ORDER BY - data_inicio, - data_fim ASC - ", $this->ref_cod_modulo, $this->sequencial, $this->ano, $this->ref_cod_escola)); - - $data = explode('-', $meses); - - if (!$this->data_ini) { - $this->data_ini = $data[0]; - } - - if (!$this->data_fim) { - $this->data_fim = $data[1]; - } - - $data_ini = explode('/', $data[0]); - $data_fim = explode('/', $data[1]); - - $meses = array($data_ini[1], $data_fim[1]); - $dias = array($data_ini[0], $data_fim[0]); - } - else { - $meses = $db->CampoUnico( " - SELECT - to_char(data_inicio,'mm') || '-' || to_char(data_fim,'mm') - FROM - pmieducar.turma_modulo, - pmieducar.modulo - WHERE - modulo.cod_modulo = turma_modulo.ref_cod_modulo - AND ref_cod_turma = %d - AND turma_modulo.ref_cod_modulo = %d - AND turma_modulo.sequencial = %d - AND to_char(data_inicio,'yyyy') = %d - ORDER BY - data_inicio, - data_fim ASC - ", $this->ref_cod_turma, $this->ref_cod_modulo, $this->sequencial, $this->ano); - - $data = explode('-', $meses); - - if (!$this->data_ini) { - $this->data_ini = $data[0]; - } - - if (!$this->data_fim) { - $this->data_fim = $data[1]; - } - - $data_ini = explode('/', $data[0]); - $data_fim = explode('/', $data[1]); - - $meses = array($data_ini[1], $data_fim[1]); - $dias = array($data_ini[0], $data_fim[0]); - } - - $total_dias_semanas = 0; - - if ($lista_quadro_horarios) { - for ($mes_ = $meses[0]; $mes_ <= $meses[1]; $mes_++) { - $mes_final = FALSE; - - foreach ($lista_quadro_horarios as $dia_semana) { - if ($mes_ == $meses[0]) { - $dia = $dias[0]; - } - elseif ($mes == $meses[1]) { - $dia = 1; - $mes_final = TRUE; - } - else { - $dia = 1; - } - - $total_dias_semanas += $this->getDiasSemanaMes($dia, $mes_, - $this->ano,$dia_semana,$mes_final); - } - } - } - else { - $total_dias_semanas = 30; - $this->indefinido = TRUE; - } - - $this->mes_inicial = (int) $meses[0]; - $this->mes_final = (int) $meses[1]; - $this->pdf->largura = 842.0; - $this->pdf->altura = 595.0; - - $this->total = $total_dias_semanas; - - if (!$this->total) { - break; - } - - if(!$this->em_branco) { - $obj_matricula_turma = new clsPmieducarMatriculaTurma(); - $obj_matricula_turma->setOrderby('nome_ascii'); - - $lista_matricula = $obj_matricula_turma->lista(NULL, $this->ref_cod_turma, - NULL, NULL, NULL, NULL, NULL, NULL, 1, $this->ref_cod_serie, - $this->ref_cod_curso, $this->ref_cod_escola, $this->ref_cod_instituicao, - NULL, NULL, array(1, 2, 3), NULL, NULL, $this->ano, NULL, TRUE, NULL, - NULL, TRUE - ); - } - - if ($lista_matricula || $this->em_branco) { - $this->pdf->OpenPage(); - $this->addCabecalho(); - - if ($this->em_branco) { - $lista_matricula = array(); - $this->numero_registros = $this->numero_registros? $this->numero_registros : 20; - - for ($i = 0 ; $i < $this->numero_registros; $i++) { - $lista_matricula[] = ''; - } - } - - $num = 0; - - foreach ($lista_matricula as $matricula) { - $num++; - - if ($this->page_y > 500) { - $this->desenhaLinhasVertical(); - $this->pdf->ClosePage(); - $this->pdf->OpenPage(); - $this->page_y = 125; - $this->addCabecalho(); - } - - $this->pdf->quadrado_relativo(30, $this->page_y , 782, 19); - - $this->pdf->escreve_relativo($matricula['nome_aluno'], 33, - $this->page_y + 4, 160, 15, $fonte, 7, $corTexto, 'left'); - - $this->pdf->escreve_relativo(sprintf('%02d', $num), 757, - $this->page_y + 4, 30, 30, $fonte, 7, $corTexto, 'left'); - - $this->page_y += 19; - } - - $this->desenhaLinhasVertical(); - $this->pdf->ClosePage(); - } - else { - echo ' - '; - - return; - } - } - } - - if ($this->total) { - $this->pdf->CloseFile(); - $this->get_link = $this->pdf->GetLink(); - } - else { - $this->mensagem = "Não existem dias letivos cadastrados para esta turma"; - } - } - - echo sprintf(' - ', $this->get_link); - - echo sprintf(' - -
- Se o download não iniciar automaticamente
clique aqui!

- Para visualizar os arquivos PDF, é necessário instalar o Adobe Acrobat Reader.
- Clique na Imagem para Baixar o instalador

-
-
-
- ', $this->get_link); - } - - public function addCabecalho() - { - /** - * Variável global com objetos do CoreExt. - * @see includes/bootstrap.php - */ - global $coreExt; - - // Namespace de configuração do template PDF - $config = $coreExt['Config']->app->template->pdf; - - // Variável que controla a altura atual das caixas - $altura = 30; - $fonte = 'arial'; - $corTexto = '#000000'; - - // Cabeçalho - $logo = $config->get($config->logo, 'imagens/brasao.gif'); - - $this->pdf->quadrado_relativo(30, $altura, 782, 85); - $this->pdf->insertImageScaled('gif', $logo, 50, 95, 41); - - // Título principal - $titulo = $config->get($config->titulo, 'i-Educar'); - - $this->pdf->escreve_relativo($titulo, 30, 30, 782, 80, $fonte, 18, - $corTexto, 'center'); - - $this->pdf->escreve_relativo(date('d/m/Y'), 25, 30, 782, 80, $fonte, 10, - $corTexto, 'right'); - - // Dados escola - $this->pdf->escreve_relativo('Instituição: ' . $this->nm_instituicao, 120, 52, - 300, 80, $fonte, 7, $corTexto, 'left'); - - $this->pdf->escreve_relativo('Escola: ' . $this->nm_escola,132, 64, 300, 80, - $fonte, 7, $corTexto, 'left' ); - - $dif = 0; - if ($this->nm_professor) { - $this->pdf->escreve_relativo('Prof. Regente: ' . $this->nm_professor,111, - 76, 300, 80, $fonte, 7, $corTexto, 'left'); - } - else { - $dif = 12; - } - - $this->pdf->escreve_relativo('Série: ' . $this->nm_serie, 138, 88 - $dif, 300, - 80, $fonte, 7, $corTexto, 'left'); - - $this->pdf->escreve_relativo('Turma: ' . $this->nm_turma, 134, 100 - $dif, 300, - 80, $fonte, 7, $corTexto, 'left'); - - // Título - $nm_disciplina = ''; - if ($this->nm_disciplina) { - $nm_disciplina = ' - ' . $this->nm_disciplina; - } - - $this->pdf->escreve_relativo('Diário de Frequência ' . $nm_disciplina, 30, - 75, 782, 80, $fonte, 12, $corTexto, 'center'); - - $obj_modulo = new clsPmieducarModulo($this->ref_cod_modulo); - $det_modulo = $obj_modulo->detalhe(); - - // Data - $this->pdf->escreve_relativo(sprintf("%s até %s de %d", $this->data_ini, - $this->data_fim, $this->ano), 45, 100, 782, 80, $fonte, 10, $corTexto, 'center'); - - $this->pdf->linha_relativa(201, 125, 612, 0); - $this->page_y += 19; - - if ($this->indefinido) { - $this->pdf->escreve_relativo('Dias de aula: Indefinido', 680, 100, 535, - 80, $fonte, 10, $corTexto, 'left' ); - } - else { - $this->pdf->escreve_relativo('Dias de aula: ' . $this->total, 715, 100, - 535, 80, $fonte, 10, $corTexto, 'left'); - } - } - - function desenhaLinhasVertical() - { - $corTexto = '#000000'; - $largura_anos = 550; - - if ($this->total >= 1) { - $incremental = floor($largura_anos / ($this->total + 1)) ; - } - else { - $incremental = 1; - } - - $reta_ano_x = 200 ; - - $resto = $largura_anos - ($incremental * $this->total); - - for ($linha = 0; $linha < $this->total + 1; $linha++) { - if (($resto > 0) || $linha == 0) { - $reta_ano_x++; - $resto--; - } - - $this->pdf->linha_relativa($reta_ano_x, 125, 0, $this->page_y - 125); - - $reta_ano_x += $incremental; - } - - $this->pdf->linha_relativa(812, 125, 0, $this->page_y - 125); - - $this->pdf->escreve_relativo('Nº:', 755, 128, 100, 80, $fonte, 7, $corTexto, 'left'); - - $this->pdf->linha_relativa(775, 125, 0, $this->page_y - 125); - - $this->pdf->escreve_relativo('Faltas', 783, 128, 100, 80, $fonte, 7, $corTexto, 'left'); - - $this->rodape(); - $this->pdf->ClosePage(); - $this->pdf->OpenPage(); - $this->page_y = 125; - $this->addCabecalho(); - - for ($ct = 125; $ct < 500; $ct += 19) { - $this->pdf->quadrado_relativo(30, $ct , 782, 19); - } - - $this->pdf->escreve_relativo('Observações', 30, 130, 782, 30, $fonte, 7, - $corTexto, 'center'); - - $this->pdf->linha_relativa(418, 144, 0, 360); - } - - function rodape() - { - $corTexto = '#000000'; - $fonte = 'arial'; - $dataAtual = date('d/m/Y'); - - $this->pdf->escreve_relativo('Data: ' . $dataAtual, 36, 795, 100, 50, - $fonte, 7, $corTexto, 'left'); - - $this->pdf->escreve_relativo('Assinatura do Professor(a)', 695, 520, 100, 50, - $fonte, 7, $corTexto, 'left'); - - $this->pdf->linha_relativa(660, 517, 130, 0); - } - - function Editar() - { - return FALSE; - } - - function Excluir() - { - return FALSE; - } - - function getNumeroDiasMes($dia, $mes, $ano, $mes_final = FALSE) - { - $year = $ano; - $month = $mes; - - $date = mktime(1, 1, 1, $month, $dia, $year); - - $first_day_of_month = strtotime('-' . (date('d', $date) - 1) . ' days', $date); - $last_day_of_month = strtotime('+' . (date('t', $first_day_of_month) - 1) . ' days', $first_day_of_month); - - $last_day_of_month = date('d', $last_day_of_month); - - $numero_dias = 0; - - // Verifica se é dia não-letivo - $obj_calendario = new clsPmieducarCalendarioAnoLetivo(); - $obj_calendario->setCamposLista('cod_calendario_ano_letivo'); - $lista = $obj_calendario->lista(NULL,$this->ref_cod_escola, NULL, NULL, - $this->ano, NULL, NULL, NULL, NULL, 1); - - if ($lista) { - $lista_calendario = array_shift($lista); - } - - $obj_dia = new clsPmieducarCalendarioDia(); - $obj_dia->setCamposLista('dia'); - $dias_nao_letivo = $obj_dia->lista($lista_calendario, $mes, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 'n'); - - if (!$dias_nao_letivo) { - $dias_nao_letivo = array(); - } - - if ($mes_final) { - $last_day_of_month = $dia; - $dia = 1; - } - - for ($day = $dia; $day <= $last_day_of_month; $day++) { - $date = mktime(1, 1, 1, $month, $day, $year); - $dia_semana_corrente = getdate($date); - $dia_semana_corrente = $dia_semana_corrente['wday'] + 1; - - if (($dia_semana_corrente != 1 && $dia_semana_corrente != 7) && - (array_search($day, $dias_nao_letivo) === FALSE) - ) { - $numero_dias++; - } - } - - return $numero_dias; - } - - function getDiasSemanaMes($dia, $mes, $ano, $dia_semana, $mes_final = FALSE) - { - $year = $ano; - $month = $mes; - - $date = mktime(1, 1, 1, $month, $dia, $year); - - $first_day_of_month = strtotime('-' . (date('d', $date)-1) . ' days', $date); - $last_day_of_month = strtotime('+' . (date('t', $first_day_of_month) - 1) . ' days', $first_day_of_month); - - $last_day_of_month = date('d', $last_day_of_month); - - $numero_dias = 0; - - // Verifica se é dia não-letivo - $obj_calendario = new clsPmieducarCalendarioAnoLetivo(); - $obj_calendario->setCamposLista('cod_calendario_ano_letivo'); - $lista_calendario = $obj_calendario->lista(NULL, $this->ref_cod_escola, NULL, - NULL,$this->ano, NULL, NULL, NULL, NULL, 1); - - if(is_array($lista_calendario)) { - $lista_calendario = array_shift($lista_calendario); - } - - $obj_dia = new clsPmieducarCalendarioDia(); - $obj_dia->setCamposLista('dia'); - - $dias_nao_letivo = $obj_dia->lista($lista_calendario, $mes, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 'n'); - - if (!$dias_nao_letivo) { - $dias_nao_letivo = array(); - } - - if ($mes_final) { - $last_day_of_month = $dia; - $dia = 1; - } - - for($day = $dia; $day <= $last_day_of_month; $day++) { - $date = mktime(1, 1, 1, $month, $day, $year); - $dia_semana_corrente = getdate($date); - $dia_semana_corrente = $dia_semana_corrente['wday'] + 1; - - $data_atual = sprintf('%d/%d/%d', $day, $mes, $ano); - $data_final = sprintf('%s/%d', $this->data_fim); - - if (($dia_semana == $dia_semana_corrente) && - (array_search($day, $dias_nao_letivo) === FALSE) && - data_maior($data_final, $data_atual) - ) { - $numero_dias++; - } - } - - return $numero_dias; - } -} - - -// Instancia objeto de página -$pagina = new clsIndexBase(); - -// Instancia objeto de conteúdo -$miolo = new indice(); - -// Atribui o conteúdo à página -$pagina->addForm($miolo); - -// Gera o código HTML -$pagina->MakeAll(); \ No newline at end of file diff --git a/ieducar/intranet/include/clsCampos.inc.php b/ieducar/intranet/include/clsCampos.inc.php index 050fb6b..4a71b75 100755 --- a/ieducar/intranet/include/clsCampos.inc.php +++ b/ieducar/intranet/include/clsCampos.inc.php @@ -1824,7 +1824,7 @@ class clsCampos extends Core_Controller_Page_Abstract $onClick = "onclick=\"{$componente[5]}\""; } - $retorno .= " +-- @license @@license@@ +-- @version $Id$ +-- + +DELETE FROM portal.menu_funcionario WHERE ref_cod_menu_submenu = 927; +DELETE FROM pmieducar.menu_tipo_usuario WHERE ref_cod_menu_submenu = 927; +DELETE FROM pmicontrolesis.menu WHERE ref_cod_menu_submenu = 927; +DELETE FROM portal.menu_submenu WHERE cod_menu_submenu = 927; + +-- //@UNDO + +INSERT INTO menu_submenu VALUES (927, 55, 2, 'Diário de Frequência Temporário', 'educar_relatorio_diario_classe_temp.php', '', 3); +INSERT INTO pmicontrolesis.menu VALUES (nextval('menu_cod_menu_seq'::regclass), 927, 21127, 'Diário de Frequência Temp.', 5, 'educar_relatorio_diario_classe_temp.php', '_self', 1, 15, 1); +INSERT INTO menu_tipo_usuario VALUES (1, 927, 1, 1, 1); +INSERT INTO menu_tipo_usuario VALUES (2, 927, 1, 1, 1); +INSERT INTO menu_funcionario VALUES (1, 1, 1, 927); + +-- // \ No newline at end of file diff --git a/ieducar/misc/database/ieducar.sql b/ieducar/misc/database/ieducar.sql index b0584a6..93969ae 100644 --- a/ieducar/misc/database/ieducar.sql +++ b/ieducar/misc/database/ieducar.sql @@ -17906,7 +17906,6 @@ INSERT INTO menu VALUES (21150, NULL, 21122, 'Série', 4, NULL, '_self', 1, 15, 3 INSERT INTO menu VALUES (21151, 633, 21123, 'Motivo de Afastamento', 4, 'educar_motivo_afastamento_lst.php', '_self', 1, 15, 1); INSERT INTO menu VALUES (21152, 642, 21124, 'Faltas/Notas', 4, 'educar_falta_nota_aluno_lst.php', '_self', 1, 15, 1); INSERT INTO menu VALUES (21153, 634, 21123, 'Função', 5, 'educar_funcao_lst.php', '_self', 1, 15, 1); -INSERT INTO menu VALUES (21155, 927, 21127, 'Diário de Frequência Temp.', 5, 'educar_relatorio_diario_classe_temp.php', '_self', 1, 15, 1); INSERT INTO menu VALUES (21156, 829, 21123, 'Categoria Níveis', 5, 'educar_categoria_nivel_lst.php', '_self', 1, 15, 20); INSERT INTO menu VALUES (21157, 587, 21122, 'Sequência de Enturmação', 5, 'educar_sequencia_serie_lst.php', '_self', 1, 15, 145); INSERT INTO menu VALUES (21158, NULL, 21123, 'Relatórios Servidores', 6, NULL, '_self', 1, 15, 176); @@ -18769,7 +18768,6 @@ INSERT INTO menu_tipo_usuario VALUES (2, 786, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (2, 944, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (2, 664, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (2, 670, 1, 1, 1); -INSERT INTO menu_tipo_usuario VALUES (2, 927, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (2, 711, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (2, 659, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (2, 561, 1, 1, 1); @@ -18870,7 +18868,6 @@ INSERT INTO menu_tipo_usuario VALUES (1, 786, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (1, 944, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (1, 664, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (1, 670, 1, 1, 1); -INSERT INTO menu_tipo_usuario VALUES (1, 927, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (1, 711, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (1, 659, 1, 1, 1); INSERT INTO menu_tipo_usuario VALUES (1, 561, 1, 1, 1); @@ -19690,7 +19687,6 @@ INSERT INTO menu_funcionario VALUES (1, 1, 1, 786); INSERT INTO menu_funcionario VALUES (1, 1, 1, 944); INSERT INTO menu_funcionario VALUES (1, 1, 1, 664); INSERT INTO menu_funcionario VALUES (1, 1, 1, 670); -INSERT INTO menu_funcionario VALUES (1, 1, 1, 927); INSERT INTO menu_funcionario VALUES (1, 1, 1, 711); INSERT INTO menu_funcionario VALUES (1, 1, 1, 659); INSERT INTO menu_funcionario VALUES (1, 1, 1, 561); @@ -19954,7 +19950,6 @@ INSERT INTO menu_submenu VALUES (918, 55, 2, 'Ata Resultado Final', 'educar_rela INSERT INTO menu_submenu VALUES (911, 55, 2, 'Ficha de Rematrícula', 'educar_relatorio_ficha_rematricula.php', '', 3); INSERT INTO menu_submenu VALUES (916, 55, 2, 'Registro de Transferências Expedidas', 'educar_relatorio_registro_transferencias.php', '', 3); INSERT INTO menu_submenu VALUES (900, 55, 2, 'Relação de Alunos ANEEs Quantidade', 'educar_relatorio_relacao_qtd_aluno_pnee_escola.php', '', 3); -INSERT INTO menu_submenu VALUES (927, 55, 2, 'Diário de Frequência Temporário', 'educar_relatorio_diario_classe_temp.php', '', 3); INSERT INTO menu_submenu VALUES (933, 55, 2, 'Levantamento Turma Período', 'educar_relatorio_levantamento_turma_periodo_aluno.php', '', 3); INSERT INTO menu_submenu VALUES (555, 56, 2, 'Usuário', 'educar_usuario_lst.php', '', 3); INSERT INTO menu_submenu VALUES (554, 56, 2, 'Tipo Usuário', 'educar_tipo_usuario_lst.php', '', 3); @@ -20098,6 +20093,7 @@ INSERT INTO changelog VALUES (16, 'Main', 'NOW()', 'NOW()', 'dbdeploy', '16_perm INSERT INTO changelog VALUES (17, 'Main', 'NOW()', 'NOW()', 'dbdeploy', '17_adiciona_campo_curso_componente_ano_escolar_e_atualiza_constraint_servidor_disciplina.sql'); INSERT INTO changelog VALUES (18, 'Main', 'NOW()', 'NOW()', 'dbdeploy', '18_cria_tabelas_de_parecer_descritivo.sql'); INSERT INTO changelog VALUES (19, 'Main', 'NOW()', 'NOW()', 'dbdeploy', '19_atualiza_nome_de_relatorio_no_menu_e_permissoes.sql'); +INSERT INTO changelog VALUES (20, 'Main', 'NOW()', 'NOW()', 'dbdeploy', '20_remove_permissao_e_menu_diario_avaliacao_temp.sql'); -- -- libgit2 0.21.2