From b0c1134f21b9879fc26dfc5d55e13dfc8b6d7d63 Mon Sep 17 00:00:00 2001 From: Caroline Salib Canto Date: Tue, 28 Jul 2015 09:26:01 -0300 Subject: [PATCH] Alterado para mostrar módulos do ano letivo anterior no cadastro de ano letivo; Portabilis/ieducar#143 --- ieducar/intranet/educar_ano_letivo_modulo_cad.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+), 0 deletions(-) diff --git a/ieducar/intranet/educar_ano_letivo_modulo_cad.php b/ieducar/intranet/educar_ano_letivo_modulo_cad.php index 61b6f6f..2a29490 100644 --- a/ieducar/intranet/educar_ano_letivo_modulo_cad.php +++ b/ieducar/intranet/educar_ano_letivo_modulo_cad.php @@ -135,11 +135,37 @@ class indice extends clsCadastro $det_escola = $obj_escola->detalhe(); $ref_cod_instituicao = $det_escola['ref_cod_instituicao']; + $obj = new clsPmieducarAnoLetivoModulo(); + $obj->setOrderBy('sequencial ASC'); + $registros = $obj->lista($this->ref_ano - 1, $this->ref_ref_cod_escola); + $cont = 0; + $modulosAnoAnterior = ""; + if ($registros) { + + $tabela = ""; + $tabela .= "
Modulos do ano anterior (".($this->ref_ano - 1).")
"; + $tabela .= ""; + $tabela .= ""; + + foreach ($registros as $campo) { + $cor = "#E3E8EF"; #$cor == "#FFFFFF" ? "#E3E8EF" : "#FFFFFF"; + $cont++; + $tabela .= ""; + //$modulosAnoAnterior .= ++$cont."ª Etapa: De ".dataFromPgToBr($campo['data_inicio'])." à ".dataFromPgToBr($campo['data_fim']); + } + + $tabela .="
EtapaPeríodo
{$cont}".dataFromPgToBr($campo['data_inicio'])." à ".dataFromPgToBr($campo['data_fim'])."
"; + $tabela .= "
Adicione os módulos abaixo para {$this->ref_ano} semelhante ao exemplo do ano anterior:
"; + $tabela .= "
"; + } + $ref_ano_ = $this->ref_ano; $this->campoTexto('ref_ano_', 'Ano', $ref_ano_, 4, 4, FALSE, FALSE, FALSE, '', '', '', '', TRUE); $this->campoQuebra(); + if ($tabela) + $this->campoRotulo('modulosAnoAnterior', '-', $tabela); // Módulos do ano letivo if ($_POST['ano_letivo_modulo']) { -- libgit2 0.21.2