Commit 59ef0b7c3eb13452b2ca924cf9850291e5b61177
1 parent
60130afa
Exists in
master
Corrigindo erro ao salvar disciplinas curriculares em uma turma
portabilis/ieducar#158
Showing
1 changed file
with
11 additions
and
7 deletions
Show diff stats
ieducar/intranet/educar_turma_cad.php
@@ -232,6 +232,8 @@ class indice extends clsCadastro | @@ -232,6 +232,8 @@ class indice extends clsCadastro | ||
232 | 232 | ||
233 | include 'include/pmieducar/educar_campo_lista.php'; | 233 | include 'include/pmieducar/educar_campo_lista.php'; |
234 | 234 | ||
235 | + $this->campoOculto('ref_cod_escola', $this->ref_cod_escola); | ||
236 | + | ||
235 | if ($this->ref_cod_escola) { | 237 | if ($this->ref_cod_escola) { |
236 | $this->ref_ref_cod_escola = $this->ref_cod_escola; | 238 | $this->ref_ref_cod_escola = $this->ref_cod_escola; |
237 | } | 239 | } |
@@ -256,11 +258,13 @@ class indice extends clsCadastro | @@ -256,11 +258,13 @@ class indice extends clsCadastro | ||
256 | if ($bloqueia){ | 258 | if ($bloqueia){ |
257 | $this->campoOculto('serie_param',$this->serie_param = $this->ref_ref_cod_serie); | 259 | $this->campoOculto('serie_param',$this->serie_param = $this->ref_ref_cod_serie); |
258 | $this->campoOculto('escola_param',$this->escola_param = $this->ref_cod_escola); | 260 | $this->campoOculto('escola_param',$this->escola_param = $this->ref_cod_escola); |
259 | - } | 261 | + } |
260 | 262 | ||
261 | $this->campoLista('ref_ref_cod_serie', 'Série', $opcoes_serie, $this->ref_ref_cod_serie, | 263 | $this->campoLista('ref_ref_cod_serie', 'Série', $opcoes_serie, $this->ref_ref_cod_serie, |
262 | '', FALSE, '', NULL, $bloqueia); | 264 | '', FALSE, '', NULL, $bloqueia); |
263 | 265 | ||
266 | + $this->campoOculto('ref_ref_cod_serie',$this->ref_ref_cod_serie); | ||
267 | + | ||
264 | // o campo ano somente é exibido para turmas novas ou cadastradas após inclusão deste campo. | 268 | // o campo ano somente é exibido para turmas novas ou cadastradas após inclusão deste campo. |
265 | if ($anoVisivel){ | 269 | if ($anoVisivel){ |
266 | $this->inputsHelper()->dynamic('anoLetivo', array('disabled' => $bloqueia)); | 270 | $this->inputsHelper()->dynamic('anoLetivo', array('disabled' => $bloqueia)); |
@@ -489,7 +493,7 @@ class indice extends clsCadastro | @@ -489,7 +493,7 @@ class indice extends clsCadastro | ||
489 | $qtd_modulo = count($this->turma_modulo) == 0 ? 1 : (count($this->turma_modulo) + 1); | 493 | $qtd_modulo = count($this->turma_modulo) == 0 ? 1 : (count($this->turma_modulo) + 1); |
490 | echo " | 494 | echo " |
491 | <script type=\"text/javascript\"> | 495 | <script type=\"text/javascript\"> |
492 | - window.setTimeout(function() { | 496 | + window.setTimeout(function() { |
493 | document.getElementById(\"event_incluir_dia_semana\").focus(); | 497 | document.getElementById(\"event_incluir_dia_semana\").focus(); |
494 | }, 500); | 498 | }, 500); |
495 | </script> | 499 | </script> |
@@ -772,13 +776,13 @@ class indice extends clsCadastro | @@ -772,13 +776,13 @@ class indice extends clsCadastro | ||
772 | foreach ($this->turma_dia_semana as $campo) { | 776 | foreach ($this->turma_dia_semana as $campo) { |
773 | $obj = new clsPmieducarTurmaDiaSemana($campo["dia_semana_"], | 777 | $obj = new clsPmieducarTurmaDiaSemana($campo["dia_semana_"], |
774 | $cadastrou, $campo["hora_inicial_"], $campo["hora_final_"]); | 778 | $cadastrou, $campo["hora_inicial_"], $campo["hora_final_"]); |
775 | - | 779 | + |
776 | $cadastrou2 = $obj->cadastra(); | 780 | $cadastrou2 = $obj->cadastra(); |
777 | - | 781 | + |
778 | if (!$cadastrou2) { | 782 | if (!$cadastrou2) { |
779 | $this->mensagem = 'Cadastro não realizado.'; | 783 | $this->mensagem = 'Cadastro não realizado.'; |
780 | echo "<!--\nErro ao cadastrar clsPmieducarTurmaDiaSemana\nvalores obrigatórios\nis_numeric( $cadastrou ) && is_numeric( {$campo["dia_semana_"]} ) && is_string( {$campo["hora_inicial_"]} ) && is_string( {$campo["hora_final_"]} )\n-->"; | 784 | echo "<!--\nErro ao cadastrar clsPmieducarTurmaDiaSemana\nvalores obrigatórios\nis_numeric( $cadastrou ) && is_numeric( {$campo["dia_semana_"]} ) && is_string( {$campo["hora_inicial_"]} ) && is_string( {$campo["hora_final_"]} )\n-->"; |
781 | - | 785 | + |
782 | return FALSE; | 786 | return FALSE; |
783 | } | 787 | } |
784 | } | 788 | } |
@@ -1837,8 +1841,8 @@ function atualizaLstEscolaCursoSerie(xml) | @@ -1837,8 +1841,8 @@ function atualizaLstEscolaCursoSerie(xml) | ||
1837 | document.getElementById('event_incluir_modulo').onclick = incluirModulo; | 1841 | document.getElementById('event_incluir_modulo').onclick = incluirModulo; |
1838 | 1842 | ||
1839 | function incluirModulo(){ | 1843 | function incluirModulo(){ |
1840 | - document.getElementById('incluir_modulo').value = 'S'; | ||
1841 | - document.getElementById('tipoacao').value = ''; | 1844 | + document.getElementById('incluir_modulo').value = 'S'; |
1845 | + document.getElementById('tipoacao').value = ''; | ||
1842 | acao(); | 1846 | acao(); |
1843 | } | 1847 | } |
1844 | 1848 |