Commit b0c1134f21b9879fc26dfc5d55e13dfc8b6d7d63
1 parent
6cdb58c5
Exists in
master
Alterado para mostrar módulos do ano letivo anterior no cadastro de ano letivo;
Portabilis/ieducar#143
Showing
1 changed file
with
26 additions
and
0 deletions
Show diff stats
ieducar/intranet/educar_ano_letivo_modulo_cad.php
@@ -135,11 +135,37 @@ class indice extends clsCadastro | @@ -135,11 +135,37 @@ class indice extends clsCadastro | ||
135 | $det_escola = $obj_escola->detalhe(); | 135 | $det_escola = $obj_escola->detalhe(); |
136 | $ref_cod_instituicao = $det_escola['ref_cod_instituicao']; | 136 | $ref_cod_instituicao = $det_escola['ref_cod_instituicao']; |
137 | 137 | ||
138 | + $obj = new clsPmieducarAnoLetivoModulo(); | ||
139 | + $obj->setOrderBy('sequencial ASC'); | ||
140 | + $registros = $obj->lista($this->ref_ano - 1, $this->ref_ref_cod_escola); | ||
141 | + $cont = 0; | ||
142 | + $modulosAnoAnterior = ""; | ||
143 | + if ($registros) { | ||
144 | + | ||
145 | + $tabela = "<table border=0 style='' cellpadding=2 width='100%'>"; | ||
146 | + $tabela .= "<tr bgcolor=$cor><td colspan='2'><b>Modulos do ano anterior (".($this->ref_ano - 1).")</b></td></tr><tr><td>"; | ||
147 | + $tabela .= "<table cellpadding=\"2\" cellspacing=\"2\" border=\"0\" align=\"left\" width='300px'>"; | ||
148 | + $tabela .= "<tr bgcolor='#A1B3BD'><th width='100px'>Etapa<a name='ano_letivo'/></th><th width='200px'>Período</th></tr>"; | ||
149 | + | ||
150 | + foreach ($registros as $campo) { | ||
151 | + $cor = "#E3E8EF"; #$cor == "#FFFFFF" ? "#E3E8EF" : "#FFFFFF"; | ||
152 | + $cont++; | ||
153 | + $tabela .= "<tr bgcolor='$cor'><td align='center'>{$cont}</td><td align='center'>".dataFromPgToBr($campo['data_inicio'])." à ".dataFromPgToBr($campo['data_fim'])."</td></tr>"; | ||
154 | + //$modulosAnoAnterior .= ++$cont."ª Etapa: De ".dataFromPgToBr($campo['data_inicio'])." à ".dataFromPgToBr($campo['data_fim']); | ||
155 | + } | ||
156 | + | ||
157 | + $tabela .="</table>"; | ||
158 | + $tabela .= "<tr><td colspan='2'><b> Adicione os módulos abaixo para {$this->ref_ano} semelhante ao exemplo do ano anterior: </b></td></tr><tr><td>"; | ||
159 | + $tabela .= "</table>"; | ||
160 | + } | ||
161 | + | ||
138 | $ref_ano_ = $this->ref_ano; | 162 | $ref_ano_ = $this->ref_ano; |
139 | $this->campoTexto('ref_ano_', 'Ano', $ref_ano_, 4, 4, FALSE, FALSE, FALSE, | 163 | $this->campoTexto('ref_ano_', 'Ano', $ref_ano_, 4, 4, FALSE, FALSE, FALSE, |
140 | '', '', '', '', TRUE); | 164 | '', '', '', '', TRUE); |
141 | 165 | ||
142 | $this->campoQuebra(); | 166 | $this->campoQuebra(); |
167 | + if ($tabela) | ||
168 | + $this->campoRotulo('modulosAnoAnterior', '-', $tabela); | ||
143 | 169 | ||
144 | // Módulos do ano letivo | 170 | // Módulos do ano letivo |
145 | if ($_POST['ano_letivo_modulo']) { | 171 | if ($_POST['ano_letivo_modulo']) { |