Commit b4a64cb87308225aad65d1af679b8261edde6c82
1 parent
36f96796
Exists in
master
Corrigido cadastro de turmas;
portabilis/ieducar#44
Showing
1 changed file
with
92 additions
and
84 deletions
Show diff stats
ieducar/intranet/educar_turma_cad.php
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** |
4 | - * i-Educar - Sistema de gestão escolar | |
4 | + * i-Educar - Sistema de gestão escolar | |
5 | 5 | * |
6 | - * Copyright (C) 2006 Prefeitura Municipal de Itajaí | |
6 | + * Copyright (C) 2006 Prefeitura Municipal de Itajaà | |
7 | 7 | * <ctima@itajai.sc.gov.br> |
8 | 8 | * |
9 | - * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo | |
10 | - * sob os termos da Licença Pública Geral GNU conforme publicada pela Free | |
11 | - * Software Foundation; tanto a versão 2 da Licença, como (a seu critério) | |
12 | - * qualquer versão posterior. | |
9 | + * Este programa é software livre; você pode redistribuÃ-lo e/ou modificá-lo | |
10 | + * sob os termos da Licença Pública Geral GNU conforme publicada pela Free | |
11 | + * Software Foundation; tanto a versão 2 da Licença, como (a seu critério) | |
12 | + * qualquer versão posterior. | |
13 | 13 | * |
14 | - * Este programa é distribuído na expectativa de que seja útil, porém, SEM | |
15 | - * NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE OU | |
16 | - * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral | |
14 | + * Este programa é distribuÃÂdo na expectativa de que seja útil, porém, SEM | |
15 | + * NENHUMA GARANTIA; nem mesmo a garantia implÃÂcita de COMERCIABILIDADE OU | |
16 | + * ADEQUAÇÃO A UMA FINALIDADE ESPECÃFICA. Consulte a Licença Pública Geral | |
17 | 17 | * do GNU para mais detalhes. |
18 | 18 | * |
19 | - * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto | |
20 | - * com este programa; se não, escreva para a Free Software Foundation, Inc., no | |
21 | - * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
19 | + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto | |
20 | + * com este programa; se não, escreva para a Free Software Foundation, Inc., no | |
21 | + * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
22 | 22 | * |
23 | - * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br> | |
23 | + * @author Prefeitura Municipal de Itajaà <ctima@itajai.sc.gov.br> | |
24 | 24 | * @category i-Educar |
25 | 25 | * @license @@license@@ |
26 | 26 | * @package iEd_Pmieducar |
27 | - * @since Arquivo disponível desde a versão 1.0.0 | |
27 | + * @since Arquivo disponÃvel desde a versão 1.0.0 | |
28 | 28 | * @version $Id$ |
29 | 29 | */ |
30 | 30 | |
... | ... | @@ -37,11 +37,11 @@ require_once 'Portabilis/String/Utils.php'; |
37 | 37 | /** |
38 | 38 | * clsIndexBase class. |
39 | 39 | * |
40 | - * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br> | |
40 | + * @author Prefeitura Municipal de Itajaà <ctima@itajai.sc.gov.br> | |
41 | 41 | * @category i-Educar |
42 | 42 | * @license @@license@@ |
43 | 43 | * @package iEd_Pmieducar |
44 | - * @since Classe disponível desde a versão 1.0.0 | |
44 | + * @since Classe disponÃvel desde a versão 1.0.0 | |
45 | 45 | * @version @@package_version@@ |
46 | 46 | */ |
47 | 47 | class clsIndexBase extends clsBase |
... | ... | @@ -56,11 +56,11 @@ class clsIndexBase extends clsBase |
56 | 56 | /** |
57 | 57 | * indice class. |
58 | 58 | * |
59 | - * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br> | |
59 | + * @author Prefeitura Municipal de Itajaà <ctima@itajai.sc.gov.br> | |
60 | 60 | * @category i-Educar |
61 | 61 | * @license @@license@@ |
62 | 62 | * @package iEd_Pmieducar |
63 | - * @since Classe disponível desde a versão 1.0.0 | |
63 | + * @since Classe disponÃvel desde a versão 1.0.0 | |
64 | 64 | * @version @@package_version@@ |
65 | 65 | */ |
66 | 66 | class indice extends clsCadastro |
... | ... | @@ -90,6 +90,9 @@ class indice extends clsCadastro |
90 | 90 | var $ref_cod_curso; |
91 | 91 | var $ref_cod_escola; |
92 | 92 | |
93 | + var $serie_param; | |
94 | + var $escola_param; | |
95 | + | |
93 | 96 | var $padrao_ano_escolar; |
94 | 97 | |
95 | 98 | var $ref_cod_regente; |
... | ... | @@ -97,7 +100,7 @@ class indice extends clsCadastro |
97 | 100 | |
98 | 101 | var $ref_ref_cod_serie_mult; |
99 | 102 | |
100 | - // Inclui módulo | |
103 | + // Inclui módulo | |
101 | 104 | var $turma_modulo; |
102 | 105 | var $incluir_modulo; |
103 | 106 | var $excluir_modulo; |
... | ... | @@ -119,7 +122,7 @@ class indice extends clsCadastro |
119 | 122 | 4 => 'Quarta', |
120 | 123 | 5 => 'Quinta', |
121 | 124 | 6 => 'Sexta', |
122 | - 7 => 'Sábado' | |
125 | + 7 => 'Sábado' | |
123 | 126 | ); |
124 | 127 | |
125 | 128 | function Inicializar() |
... | ... | @@ -234,8 +237,13 @@ class indice extends clsCadastro |
234 | 237 | $opcoes_serie[$serie['cod_serie']] = $serie['nm_serie']; |
235 | 238 | } |
236 | 239 | } |
237 | - } | |
238 | 240 | |
241 | + } | |
242 | + | |
243 | + if ($bloqueia){ | |
244 | + $this->campoOculto('serie_param',$this->serie_param = $this->ref_ref_cod_serie); | |
245 | + $this->campoOculto('escola_param',$this->escola_param = $this->ref_cod_escola); | |
246 | + } | |
239 | 247 | $script = "javascript:showExpansivelIframe(520, 550, 'educar_serie_cad_pop.php?ref_ref_cod_serie=sim');"; |
240 | 248 | |
241 | 249 | if ($this->ref_cod_instituicao && $this->ref_cod_escola && $this->ref_cod_curso) { |
... | ... | @@ -247,16 +255,16 @@ class indice extends clsCadastro |
247 | 255 | $script); |
248 | 256 | } |
249 | 257 | |
250 | - $this->campoLista('ref_ref_cod_serie', 'Série', $opcoes_serie, $this->ref_ref_cod_serie, | |
258 | + $this->campoLista('ref_ref_cod_serie', 'Série', $opcoes_serie, $this->ref_ref_cod_serie, | |
251 | 259 | '', FALSE, '', $script, $bloqueia); |
252 | 260 | |
253 | - // o campo ano somente é exibido para turmas novas ou cadastradas após inclusão deste campo. | |
261 | + // o campo ano somente é exibido para turmas novas ou cadastradas após inclusão deste campo. | |
254 | 262 | if ($anoVisivel){ |
255 | 263 | $this->inputsHelper()->dynamic('anoLetivo', array('disabled' => $bloqueia)); |
256 | 264 | if($bloqueia) |
257 | 265 | $this->inputsHelper()->hidden('ano_hidden', array('value' => $this->ano)); |
258 | 266 | } |
259 | - // Infra prédio cômodo | |
267 | + // Infra prédio cômodo | |
260 | 268 | $opcoes = array('' => 'Selecione'); |
261 | 269 | |
262 | 270 | // Editar |
... | ... | @@ -330,7 +338,7 @@ class indice extends clsCadastro |
330 | 338 | |
331 | 339 | $this->campoTexto('sgl_turma', 'Sigla', $this->sgl_turma, 15, 15, FALSE); |
332 | 340 | |
333 | - $this->campoNumero('max_aluno', 'Máximo de Alunos', $this->max_aluno, 3, 3, TRUE); | |
341 | + $this->campoNumero('max_aluno', 'Máximo de Alunos', $this->max_aluno, 3, 3, TRUE); | |
334 | 342 | |
335 | 343 | $ativo = isset($this->cod_turma) ? dbBool($this->visivel) : true; |
336 | 344 | $this->campoCheck('visivel', 'Ativo', $ativo); |
... | ... | @@ -338,7 +346,7 @@ class indice extends clsCadastro |
338 | 346 | $this->campoCheck('multiseriada', 'Multi-Seriada', $this->multiseriada, '', |
339 | 347 | FALSE, FALSE); |
340 | 348 | |
341 | - $this->campoLista('ref_ref_cod_serie_mult','Série', array('' => 'Selecione'), | |
349 | + $this->campoLista('ref_ref_cod_serie_mult','Série', array('' => 'Selecione'), | |
342 | 350 | '', '', FALSE, '', '', '', FALSE); |
343 | 351 | |
344 | 352 | $this->campoOculto('ref_ref_cod_serie_mult_',$this->ref_ref_cod_serie_mult); |
... | ... | @@ -350,7 +358,7 @@ class indice extends clsCadastro |
350 | 358 | |
351 | 359 | $this->campoHora('hora_final', 'Hora Final', $this->hora_final, FALSE); |
352 | 360 | |
353 | - $this->campoHora('hora_inicio_intervalo', Portabilis_String_Utils::toLatin1('Hora Início Intervalo'), | |
361 | + $this->campoHora('hora_inicio_intervalo', Portabilis_String_Utils::toLatin1('Hora InÃcio Intervalo'), | |
354 | 362 | $this->hora_inicio_intervalo, FALSE); |
355 | 363 | |
356 | 364 | $this->campoHora( 'hora_fim_intervalo', 'Hora Fim Intervalo', $this->hora_fim_intervalo, FALSE); |
... | ... | @@ -364,7 +372,7 @@ class indice extends clsCadastro |
364 | 372 | $tiposBoletim = Portabilis_Model_Report_TipoBoletim::getInstance()->getEnums(); |
365 | 373 | $tiposBoletim = Portabilis_Array_Utils::insertIn(null, "Selecione um modelo", $tiposBoletim); |
366 | 374 | |
367 | - $this->campoLista('tipo_boletim', Portabilis_String_Utils::toLatin1('Modelo relatório boletim'), $tiposBoletim, $this->tipo_boletim); | |
375 | + $this->campoLista('tipo_boletim', Portabilis_String_Utils::toLatin1('Modelo relatório boletim'), $tiposBoletim, $this->tipo_boletim); | |
368 | 376 | |
369 | 377 | $this->campoQuebra2(); |
370 | 378 | |
... | ... | @@ -404,8 +412,8 @@ class indice extends clsCadastro |
404 | 412 | if (is_array($lista) && count($lista)) { |
405 | 413 | $conteudo .= '<div style="margin-bottom: 10px;">'; |
406 | 414 | $conteudo .= ' <span style="display: block; float: left; width: 250px;">Nome</span>'; |
407 | - $conteudo .= ' <span style="display: block; float: left; width: 100px;">' . Portabilis_String_Utils::toLatin1('Carga horária') . '</span>'; | |
408 | - $conteudo .= ' <span style="display: block; float: left">'.Portabilis_String_Utils::toLatin1('Usar padrão do componente?'). '</span>'; | |
415 | + $conteudo .= ' <span style="display: block; float: left; width: 100px;">' . Portabilis_String_Utils::toLatin1('Carga horária') . '</span>'; | |
416 | + $conteudo .= ' <span style="display: block; float: left">'.Portabilis_String_Utils::toLatin1('Usar padrão do componente?'). '</span>'; | |
409 | 417 | $conteudo .= '</div>'; |
410 | 418 | $conteudo .= '<br style="clear: left" />'; |
411 | 419 | |
... | ... | @@ -441,7 +449,7 @@ class indice extends clsCadastro |
441 | 449 | $disciplinas .= '</table>'; |
442 | 450 | } |
443 | 451 | else { |
444 | - $disciplinas = Portabilis_String_Utils::toLatin1('A série/ano escolar não possui componentes curriculares cadastrados.'); | |
452 | + $disciplinas = Portabilis_String_Utils::toLatin1('A série/ano escolar não possui componentes curriculares cadastrados.'); | |
445 | 453 | } |
446 | 454 | } |
447 | 455 | |
... | ... | @@ -554,7 +562,7 @@ class indice extends clsCadastro |
554 | 562 | |
555 | 563 | $this->campoOculto('turma_modulo', serialize($this->turma_modulo)); |
556 | 564 | |
557 | - // Módulo | |
565 | + // Módulo | |
558 | 566 | // foreign keys |
559 | 567 | $opcoes = array('' => 'Selecione'); |
560 | 568 | |
... | ... | @@ -572,15 +580,15 @@ class indice extends clsCadastro |
572 | 580 | } |
573 | 581 | } |
574 | 582 | |
575 | - $this->campoLista('ref_cod_modulo', Portabilis_String_utils::toLatin1('Módulo'), $opcoes, $this->ref_cod_modulo, | |
583 | + $this->campoLista('ref_cod_modulo', Portabilis_String_utils::toLatin1('Módulo'), $opcoes, $this->ref_cod_modulo, | |
576 | 584 | NULL, NULL, NULL, NULL, NULL, FALSE); |
577 | 585 | |
578 | - $this->campoData('data_inicio', Portabilis_String_utils::toLatin1('Data Início'), $this->data_inicio, FALSE); | |
586 | + $this->campoData('data_inicio', Portabilis_String_utils::toLatin1('Data InÃcio'), $this->data_inicio, FALSE); | |
579 | 587 | $this->campoData('data_fim', 'Data Fim', $this->data_fim, FALSE); |
580 | 588 | |
581 | 589 | $this->campoOculto('incluir_modulo', ''); |
582 | 590 | |
583 | - $this->campoRotulo('bt_incluir_modulo', Portabilis_String_utils::toLatin1('Módulo'), | |
591 | + $this->campoRotulo('bt_incluir_modulo', Portabilis_String_utils::toLatin1('Módulo'), | |
584 | 592 | "<a href='#' onclick=\"document.getElementById('incluir_modulo').value = 'S'; document.getElementById('tipoacao').value = ''; acao();\"><img src='imagens/nvp_bot_adiciona.gif' alt='adicionar' title='Incluir' border=0></a>" |
585 | 593 | ); |
586 | 594 | |
... | ... | @@ -657,8 +665,8 @@ class indice extends clsCadastro |
657 | 665 | $opcoes = $this->dias_da_semana; |
658 | 666 | } |
659 | 667 | else { |
660 | - echo '<!--\nErro\nClasse clsPmieducarTurmaDiaSemana não encontrada\n-->'; | |
661 | - $opcoes = array('' => Portabilis_String_utils::toLatin1('Erro na geração')); | |
668 | + echo '<!--\nErro\nClasse clsPmieducarTurmaDiaSemana não encontrada\n-->'; | |
669 | + $opcoes = array('' => Portabilis_String_utils::toLatin1('Erro na geração')); | |
662 | 670 | } |
663 | 671 | |
664 | 672 | $this->campoLista('dia_semana', 'Dia Semana', $opcoes, $this->dia_semana, NULL, |
... | ... | @@ -704,7 +712,7 @@ class indice extends clsCadastro |
704 | 712 | $this->visivel = FALSE; |
705 | 713 | } |
706 | 714 | |
707 | - // Não segue o padrao do curso | |
715 | + // Não segue o padrao do curso | |
708 | 716 | if ($this->padrao_ano_escolar == 0) { |
709 | 717 | $this->turma_modulo = unserialize(urldecode($this->turma_modulo)); |
710 | 718 | $this->turma_dia_semana = unserialize(urldecode($this->turma_dia_semana)); |
... | ... | @@ -723,7 +731,7 @@ class indice extends clsCadastro |
723 | 731 | $cadastrou = $obj->cadastra(); |
724 | 732 | |
725 | 733 | if ($cadastrou) { |
726 | - // Cadastra módulo | |
734 | + // Cadastra módulo | |
727 | 735 | foreach ($this->turma_modulo as $campo) { |
728 | 736 | $campo['data_inicio_'] = dataToBanco($campo['data_inicio_']); |
729 | 737 | $campo['data_fim_'] = dataToBanco($campo['data_fim_']); |
... | ... | @@ -734,7 +742,7 @@ class indice extends clsCadastro |
734 | 742 | $cadastrou1 = $obj->cadastra(); |
735 | 743 | |
736 | 744 | if (!$cadastrou1) { |
737 | - $this->mensagem = Portabilis_String_utils::toLatin1('Cadastro não realizado.'); | |
745 | + $this->mensagem = Portabilis_String_utils::toLatin1('Cadastro não realizado.'); | |
738 | 746 | echo "<!--\nErro ao cadastrar clsPmieducarTurmaModulo\nvalores obrigatorios\nis_numeric( $cadastrou ) && is_numeric( {$campo["ref_cod_modulo_"]} ) && is_numeric( {$campo["sequencial_"]} ) && is_string( {$campo["data_inicio_"]} ) && is_string( {$campo["data_fim_"]} )\n-->"; |
739 | 747 | |
740 | 748 | return FALSE; |
... | ... | @@ -749,7 +757,7 @@ class indice extends clsCadastro |
749 | 757 | $cadastrou2 = $obj->cadastra(); |
750 | 758 | |
751 | 759 | if (!$cadastrou2) { |
752 | - $this->mensagem = 'Cadastro não realizado.'; | |
760 | + $this->mensagem = 'Cadastro não realizado.'; | |
753 | 761 | 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-->"; |
754 | 762 | |
755 | 763 | return FALSE; |
... | ... | @@ -762,19 +770,19 @@ class indice extends clsCadastro |
762 | 770 | die(); |
763 | 771 | } |
764 | 772 | |
765 | - $this->mensagem = Portabilis_String_utils::toLatin1('Cadastro não realizado.'); | |
773 | + $this->mensagem = Portabilis_String_utils::toLatin1('Cadastro não realizado.'); | |
766 | 774 | echo "<!--\nErro ao cadastrar clsPmieducarTurma\nvalores obrigatorios\nis_numeric( $this->pessoa_logada ) && is_numeric( $this->ref_ref_cod_serie ) && is_numeric( $this->ref_cod_escola ) && is_numeric( $this->ref_cod_infra_predio_comodo ) && is_string( $this->nm_turma ) && is_numeric( $this->max_aluno ) && is_numeric( $this->multiseriada ) && is_numeric( $this->ref_cod_turma_tipo )\n-->"; |
767 | 775 | |
768 | 776 | return FALSE; |
769 | 777 | } |
770 | 778 | |
771 | - echo '<script type="text/javascript">alert(stringUtils.toUtf8("É necessário adicionar pelo menos 1 módulo!"))</script>'; | |
772 | - $this->mensagem = Portabilis_String_utils::toLatin1("Cadastro não realizado."); | |
779 | + echo '<script type="text/javascript">alert(stringUtils.toUtf8("É necessário adicionar pelo menos 1 módulo!"))</script>'; | |
780 | + $this->mensagem = Portabilis_String_utils::toLatin1("Cadastro não realizado."); | |
773 | 781 | |
774 | 782 | return FALSE; |
775 | 783 | } |
776 | 784 | |
777 | - // Segue o padrão do ano escolar | |
785 | + // Segue o padrão do ano escolar | |
778 | 786 | elseif ($this->padrao_ano_escolar == 1) { |
779 | 787 | $obj = new clsPmieducarTurma(null, null, $this->pessoa_logada, |
780 | 788 | $this->ref_ref_cod_serie, $this->ref_cod_escola, |
... | ... | @@ -796,14 +804,14 @@ class indice extends clsCadastro |
796 | 804 | die(); |
797 | 805 | } |
798 | 806 | |
799 | - $this->mensagem = Portabilis_String_utils::toLatin1('Cadastro não realizado.'); | |
807 | + $this->mensagem = Portabilis_String_utils::toLatin1('Cadastro não realizado.'); | |
800 | 808 | echo "<!--\nErro ao cadastrar clsPmieducarTurma\nvalores obrigatorios\nis_numeric( $this->pessoa_logada ) && is_numeric( $this->ref_ref_cod_serie ) && is_numeric( $this->ref_cod_escola ) && is_numeric( $this->ref_cod_infra_predio_comodo ) && is_string( $this->nm_turma ) && is_numeric( $this->max_aluno ) && is_numeric( $this->multiseriada ) && is_numeric( $this->ref_cod_turma_tipo )\n-->"; |
801 | 809 | |
802 | 810 | return FALSE; |
803 | 811 | } |
804 | 812 | |
805 | 813 | $this->atualizaComponentesCurriculares( |
806 | - $this->ref_ref_cod_serie, $this->ref_cod_escola, $this->cod_turma, | |
814 | + $this->serie_param, $this->escola_param, $this->cod_turma, | |
807 | 815 | $this->disciplinas, $this->carga_horaria, $this->usar_componente |
808 | 816 | ); |
809 | 817 | } |
... | ... | @@ -833,7 +841,7 @@ class indice extends clsCadastro |
833 | 841 | $this->visivel = FALSE; |
834 | 842 | } |
835 | 843 | |
836 | - // Não segue o padrão do curso | |
844 | + // Não segue o padrão do curso | |
837 | 845 | if ($this->padrao_ano_escolar == 0) { |
838 | 846 | $this->turma_modulo = unserialize(urldecode($this->turma_modulo)); |
839 | 847 | $this->turma_dia_semana = unserialize(urldecode($this->turma_dia_semana)); |
... | ... | @@ -869,7 +877,7 @@ class indice extends clsCadastro |
869 | 877 | |
870 | 878 | $cadastrou1 = $obj->cadastra(); |
871 | 879 | if (!$cadastrou1) { |
872 | - $this->mensagem = Portabilis_String_utils::toLatin1('Edição não realizada.'); | |
880 | + $this->mensagem = Portabilis_String_utils::toLatin1('Edição não realizada.'); | |
873 | 881 | echo "<!--\nErro ao editar clsPmieducarTurmaModulo\nvalores obrigatorios\nis_numeric( $this->cod_turma ) && is_numeric( {$campo["ref_cod_modulo_"]} ) \n-->"; |
874 | 882 | |
875 | 883 | return FALSE; |
... | ... | @@ -889,7 +897,7 @@ class indice extends clsCadastro |
889 | 897 | $cadastrou2 = $obj->cadastra(); |
890 | 898 | |
891 | 899 | if (!$cadastrou2) { |
892 | - $this->mensagem = Portabilis_String_utils::toLatin1('Edição não realizada.'); | |
900 | + $this->mensagem = Portabilis_String_utils::toLatin1('Edição não realizada.'); | |
893 | 901 | echo "<!--\nErro ao editar clsPmieducarTurmaDiaSemana\nvalores obrigatórios\nis_numeric( $this->cod_turma ) && is_numeric( {$campo["dia_semana_"]} ) \n-->"; |
894 | 902 | |
895 | 903 | return FALSE; |
... | ... | @@ -898,21 +906,21 @@ class indice extends clsCadastro |
898 | 906 | } |
899 | 907 | } |
900 | 908 | else { |
901 | - $this->mensagem = Portabilis_String_utils::toLatin1('Edição não realizada.'); | |
909 | + $this->mensagem = Portabilis_String_utils::toLatin1('Edição não realizada.'); | |
902 | 910 | echo "<!--\nErro ao editar clsPmieducarTurma\nvalores obrigatorios\nis_numeric( $this->pessoa_logada ) && is_numeric( $this->ref_ref_cod_serie ) && is_numeric( $this->ref_cod_escola ) && is_numeric( $this->ref_cod_infra_predio_comodo ) && is_string( $this->nm_turma ) && is_numeric( $this->max_aluno ) && is_numeric( $this->multiseriada ) && is_numeric( $this->ref_cod_turma_tipo )\n-->"; |
903 | 911 | |
904 | 912 | return FALSE; |
905 | 913 | } |
906 | 914 | } |
907 | 915 | else { |
908 | - echo '<script type="text/javascript">alert(stringUtils.toUtf8("É necessário adicionar pelo menos 1 módulo!"))</script>'; | |
909 | - $this->mensagem = Portabilis_String_utils::toLatin1('Edição não realizada.'); | |
916 | + echo '<script type="text/javascript">alert(stringUtils.toUtf8("É necessário adicionar pelo menos 1 módulo!"))</script>'; | |
917 | + $this->mensagem = Portabilis_String_utils::toLatin1('Edição não realizada.'); | |
910 | 918 | |
911 | 919 | return FALSE; |
912 | 920 | } |
913 | 921 | } |
914 | 922 | |
915 | - // Segue o padrão do curso | |
923 | + // Segue o padrão do curso | |
916 | 924 | elseif ($this->padrao_ano_escolar == 1) { |
917 | 925 | $obj = new clsPmieducarTurma($this->cod_turma, $this->pessoa_logada, NULL, |
918 | 926 | $this->ref_ref_cod_serie, $this->ref_cod_escola, $this->ref_cod_infra_predio_comodo, |
... | ... | @@ -927,17 +935,17 @@ class indice extends clsCadastro |
927 | 935 | } |
928 | 936 | |
929 | 937 | $this->atualizaComponentesCurriculares( |
930 | - $this->ref_ref_cod_serie, $this->ref_cod_escola, $this->cod_turma, | |
938 | + (trim($this->serie_param)==''?$this->ref_ref_cod_serie : $this->serie_param), (trim($this->escola_param)=='' ? $this->ref_cod_escola : $this->escola_param ), $this->cod_turma, | |
931 | 939 | $this->disciplinas, $this->carga_horaria, $this->usar_componente |
932 | 940 | ); |
933 | 941 | |
934 | 942 | if ($editou) { |
935 | - $this->mensagem .= 'Edição efetuada com sucesso.'; | |
943 | + $this->mensagem .= 'Edição efetuada com sucesso.'; | |
936 | 944 | header('Location: educar_turma_lst.php'); |
937 | 945 | die(); |
938 | 946 | } |
939 | 947 | else { |
940 | - $this->mensagem = Portabilis_String_utils::toLatin1('Edição não realizada.'); | |
948 | + $this->mensagem = Portabilis_String_utils::toLatin1('Edição não realizada.'); | |
941 | 949 | echo "<!--\nErro ao editar clsPmieducarTurma\nvalores obrigatorios\nis_numeric( $this->pessoa_logada ) && is_numeric( $this->ref_ref_cod_serie ) && is_numeric( $this->ref_cod_escola ) && is_numeric( $this->ref_cod_infra_predio_comodo ) && is_string( $this->nm_turma ) && is_numeric( $this->max_aluno ) && is_numeric( $this->multiseriada ) && is_numeric( $this->ref_cod_turma_tipo )\n-->"; |
942 | 950 | |
943 | 951 | return FALSE; |
... | ... | @@ -984,12 +992,12 @@ class indice extends clsCadastro |
984 | 992 | $excluiu2 = $obj->excluirTodos(); |
985 | 993 | |
986 | 994 | if ($excluiu2) { |
987 | - $this->mensagem .= Portabilis_String_utils::toLatin1('Exclusão efetuada com sucesso.'); | |
995 | + $this->mensagem .= Portabilis_String_utils::toLatin1('Exclusão efetuada com sucesso.'); | |
988 | 996 | header('Location: educar_turma_lst.php'); |
989 | 997 | die(); |
990 | 998 | } |
991 | 999 | else { |
992 | - $this->mensagem = Portabilis_String_utils::toLatin1('Exclusão não realizada.'); | |
1000 | + $this->mensagem = Portabilis_String_utils::toLatin1('Exclusão não realizada.'); | |
993 | 1001 | echo "<!--\nErro ao excluir clsPmieducarTurma\nvalores obrigatorios\nif( is_numeric( $this->cod_turma ) && is_numeric( $this->pessoa_logada ) )\n-->"; |
994 | 1002 | |
995 | 1003 | return FALSE; |
... | ... | @@ -997,14 +1005,14 @@ class indice extends clsCadastro |
997 | 1005 | } |
998 | 1006 | else |
999 | 1007 | { |
1000 | - $this->mensagem = Portabilis_String_utils::toLatin1('Exclusão não realizada.'); | |
1008 | + $this->mensagem = Portabilis_String_utils::toLatin1('Exclusão não realizada.'); | |
1001 | 1009 | echo "<!--\nErro ao excluir clsPmieducarTurma\nvalores obrigatorios\nif( is_numeric( $this->cod_turma ) && is_numeric( $this->pessoa_logada ) )\n-->"; |
1002 | 1010 | |
1003 | 1011 | return FALSE; |
1004 | 1012 | } |
1005 | 1013 | } |
1006 | 1014 | |
1007 | - $this->mensagem = Portabilis_String_utils::toLatin1('Exclusão não realizada.'); | |
1015 | + $this->mensagem = Portabilis_String_utils::toLatin1('Exclusão não realizada.'); | |
1008 | 1016 | echo "<!--\nErro ao excluir clsPmieducarTurma\nvalores obrigatorios\nif( is_numeric( $this->cod_turma ) && is_numeric( $this->pessoa_logada ) )\n-->"; |
1009 | 1017 | |
1010 | 1018 | return FALSE; |
... | ... | @@ -1036,7 +1044,7 @@ class indice extends clsCadastro |
1036 | 1044 | $ano = $this->getAnoEscolarEmAndamento($escolaId); |
1037 | 1045 | |
1038 | 1046 | if (! is_numeric($ano)) { |
1039 | - $this->mensagem = "Não foi possivel obter um ano em andamento, por favor, inicie um ano para a escola ou desative a configuração (para série e escola) 'Bloquear cadastro de novas turmas antes de atingir limite de vagas (no mesmo turno)'."; | |
1047 | + $this->mensagem = "Não foi possivel obter um ano em andamento, por favor, inicie um ano para a escola ou desative a configuração (para série e escola) 'Bloquear cadastro de novas turmas antes de atingir limite de vagas (no mesmo turno)'."; | |
1040 | 1048 | |
1041 | 1049 | return false; |
1042 | 1050 | } |
... | ... | @@ -1058,13 +1066,13 @@ class indice extends clsCadastro |
1058 | 1066 | foreach($turmas as $turma) { |
1059 | 1067 | $countMatriculas = $this->getCountMatriculas($escolaId, $turma['cod_turma']); |
1060 | 1068 | |
1061 | - // countMatriculas retorna false e adiciona mensagem, se não obter ano em andamento | |
1069 | + // countMatriculas retorna false e adiciona mensagem, se não obter ano em andamento | |
1062 | 1070 | if ($countMatriculas === false) |
1063 | 1071 | return false; |
1064 | 1072 | |
1065 | 1073 | elseif($turma['max_aluno'] - $countMatriculas > 0) { |
1066 | 1074 | $vagas = $turma['max_aluno'] - $countMatriculas; |
1067 | - $this->mensagem = "Não é possivel cadastrar turmas, pois ainda existem $vagas vagas em aberto na turma '{$turma['nm_turma']}' desta serie e turno.\n\nTal limitação ocorre devido definição feita para esta escola e série."; | |
1075 | + $this->mensagem = "Não é possivel cadastrar turmas, pois ainda existem $vagas vagas em aberto na turma '{$turma['nm_turma']}' desta serie e turno.\n\nTal limitação ocorre devido definição feita para esta escola e série."; | |
1068 | 1076 | return false; |
1069 | 1077 | } |
1070 | 1078 | } |
... | ... | @@ -1075,16 +1083,16 @@ class indice extends clsCadastro |
1075 | 1083 | |
1076 | 1084 | } |
1077 | 1085 | |
1078 | -// Instancia objeto de página | |
1086 | +// Instancia objeto de página | |
1079 | 1087 | $pagina = new clsIndexBase(); |
1080 | 1088 | |
1081 | -// Instancia objeto de conteúdo | |
1089 | +// Instancia objeto de conteúdo | |
1082 | 1090 | $miolo = new indice(); |
1083 | 1091 | |
1084 | -// Atribui o conteúdo à página | |
1092 | +// Atribui o conteúdo à página | |
1085 | 1093 | $pagina->addForm($miolo); |
1086 | 1094 | |
1087 | -// Gera o código HTML | |
1095 | +// Gera o código HTML | |
1088 | 1096 | $pagina->MakeAll(); |
1089 | 1097 | ?> |
1090 | 1098 | <script type='text/javascript'> |
... | ... | @@ -1118,7 +1126,7 @@ function atualizaTurmaCad_TipoComodo(xml) |
1118 | 1126 | } |
1119 | 1127 | else { |
1120 | 1128 | campoComodo.length = 1; |
1121 | - campoComodo.options[0] = new Option(stringUtils.toUtf8('A escola não possui nenhuma Sala'), '', false, false); | |
1129 | + campoComodo.options[0] = new Option(stringUtils.toUtf8('A escola não possui nenhuma Sala'), '', false, false); | |
1122 | 1130 | } |
1123 | 1131 | } |
1124 | 1132 | |
... | ... | @@ -1152,7 +1160,7 @@ function atualizaTurmaCad_TipoTurma(xml) |
1152 | 1160 | else { |
1153 | 1161 | campoTipoTurma.length = 1; |
1154 | 1162 | campoTipoTurma.options[0] = new Option( |
1155 | - stringUtils.toUtf8('A instituição não possui nenhum Tipo de Turma'), '', false, false | |
1163 | + stringUtils.toUtf8('A instituição não possui nenhum Tipo de Turma'), '', false, false | |
1156 | 1164 | ); |
1157 | 1165 | } |
1158 | 1166 | } |
... | ... | @@ -1177,7 +1185,7 @@ function getModulo_xml(xml) |
1177 | 1185 | var campoInstituicao = document.getElementById('ref_cod_instituicao').value; |
1178 | 1186 | |
1179 | 1187 | campoModulo.length = 1; |
1180 | - campoModulo.options[0] = new Option('Selecione um módulo', '', false, false); | |
1188 | + campoModulo.options[0] = new Option('Selecione um módulo', '', false, false); | |
1181 | 1189 | |
1182 | 1190 | var DOM_modulos = xml.getElementsByTagName('item'); |
1183 | 1191 | |
... | ... | @@ -1190,7 +1198,7 @@ function getModulo_xml(xml) |
1190 | 1198 | |
1191 | 1199 | if (campoModulo.length == 1 && campoInstituicao != '') { |
1192 | 1200 | campoModulo.options[0] = new Option( |
1193 | - stringUtils.toUtf8('A Instituição não possui nenhum módulo'), '', false, false | |
1201 | + stringUtils.toUtf8('A Instituição não possui nenhum módulo'), '', false, false | |
1194 | 1202 | ); |
1195 | 1203 | } |
1196 | 1204 | } |
... | ... | @@ -1202,7 +1210,7 @@ var evtOnLoad = function() |
1202 | 1210 | setVisibility('tr_hora_inicio_intervalo',false); |
1203 | 1211 | setVisibility('tr_hora_fim_intervalo',false); |
1204 | 1212 | |
1205 | - // Inclui módulo | |
1213 | + // Inclui módulo | |
1206 | 1214 | setVisibility('tr_ref_cod_modulo',false); |
1207 | 1215 | setVisibility('ref_cod_modulo',false); |
1208 | 1216 | setVisibility('tr_data_inicio',false); |
... | ... | @@ -1365,7 +1373,7 @@ function atualizaMultiSerie(xml) |
1365 | 1373 | var campoSerie = document.getElementById('ref_ref_cod_serie'); |
1366 | 1374 | |
1367 | 1375 | campoSerieMult.length = 1; |
1368 | - campoSerieMult.options[0] = new Option(stringUtils.toUtf8('Selecione uma série'), '', false, false); | |
1376 | + campoSerieMult.options[0] = new Option(stringUtils.toUtf8('Selecione uma série'), '', false, false); | |
1369 | 1377 | |
1370 | 1378 | var multi_serie = xml.getElementsByTagName('serie'); |
1371 | 1379 | |
... | ... | @@ -1378,7 +1386,7 @@ function atualizaMultiSerie(xml) |
1378 | 1386 | } |
1379 | 1387 | |
1380 | 1388 | if (campoSerieMult.length == 1 && campoCurso != '') { |
1381 | - campoSerieMult.options[0] = new Option(stringUtils.toUtf8('O curso não possui nenhuma série'), '', false, false); | |
1389 | + campoSerieMult.options[0] = new Option(stringUtils.toUtf8('O curso não possui nenhuma série'), '', false, false); | |
1382 | 1390 | } |
1383 | 1391 | |
1384 | 1392 | document.getElementById('ref_ref_cod_serie_mult').value = document.getElementById('ref_ref_cod_serie_mult_').value; |
... | ... | @@ -1673,7 +1681,7 @@ function valida_xml(xml) |
1673 | 1681 | |
1674 | 1682 | if (document.getElementById('ref_cod_escola').value) { |
1675 | 1683 | if (!document.getElementById('ref_ref_cod_serie').value) { |
1676 | - alert(stringUtils.toUtf8("Preencha o campo 'Série' corretamente!")); | |
1684 | + alert(stringUtils.toUtf8("Preencha o campo 'Série' corretamente!")); | |
1677 | 1685 | document.getElementById('ref_ref_cod_serie').focus(); |
1678 | 1686 | return false; |
1679 | 1687 | } |
... | ... | @@ -1681,7 +1689,7 @@ function valida_xml(xml) |
1681 | 1689 | |
1682 | 1690 | if (document.getElementById('multiseriada').checked) { |
1683 | 1691 | if (!document.getElementById('ref_ref_cod_serie_mult')){ |
1684 | - alert(stringUtils.toUtf8("Preencha o campo 'Série Multi-seriada' corretamente!")); | |
1692 | + alert(stringUtils.toUtf8("Preencha o campo 'Série Multi-seriada' corretamente!")); | |
1685 | 1693 | document.getElementById('ref_ref_cod_serie_mult').focus(); |
1686 | 1694 | return false; |
1687 | 1695 | } |
... | ... | @@ -1704,7 +1712,7 @@ function valida_xml(xml) |
1704 | 1712 | return false; |
1705 | 1713 | } |
1706 | 1714 | else if (campoHoraInicioIntervalo == '') { |
1707 | - alert(stringUtils.toUtf8("Preencha o campo 'Hora Início Intervalo' corretamente!")); | |
1715 | + alert(stringUtils.toUtf8("Preencha o campo 'Hora InÃcio Intervalo' corretamente!")); | |
1708 | 1716 | document.getElementById('hora_inicio_intervalo').focus(); |
1709 | 1717 | return false; |
1710 | 1718 | } |
... | ... | @@ -1719,7 +1727,7 @@ function valida_xml(xml) |
1719 | 1727 | var qtdDiaSemana = document.getElementsByName('dia_semana').length; |
1720 | 1728 | |
1721 | 1729 | if (qtdModulo == 1) { |
1722 | - alert(stringUtils.toUtf8("ATENÇÃO!\nÉ necessário incluir um 'Módulo'!")); | |
1730 | + alert(stringUtils.toUtf8("ATENÇÃO!\nÉ necessário incluir um 'Módulo'!")); | |
1723 | 1731 | document.getElementById('ref_cod_modulo').focus(); |
1724 | 1732 | return false; |
1725 | 1733 | } |
... | ... | @@ -1734,7 +1742,7 @@ function valida_xml(xml) |
1734 | 1742 | (DOM_turma_sala[j].firstChild.nodeValue <= document.getElementById('hora_final').value) && |
1735 | 1743 | (document.getElementById('hora_final').value <= DOM_turma_sala[j+1].firstChild.nodeValue) |
1736 | 1744 | ) { |
1737 | - alert(stringUtils.toUtf8("ATENÇÃO!\nA 'sala' já está alocada nesse horário!\nPor favor, escolha outro horário ou sala.")); | |
1745 | + alert(stringUtils.toUtf8("ATENÇÃO!\nA 'sala' já está alocada nesse horário!\nPor favor, escolha outro horário ou sala.")); | |
1738 | 1746 | return false; |
1739 | 1747 | } |
1740 | 1748 | } |
... | ... | @@ -1752,7 +1760,7 @@ function validaCampoServidor() |
1752 | 1760 | if (document.getElementById('ref_cod_instituicao').value) |
1753 | 1761 | ref_cod_instituicao = document.getElementById('ref_cod_instituicao').value; |
1754 | 1762 | else { |
1755 | - alert(stringUtils.toUtf8('Selecione uma instituição')); | |
1763 | + alert(stringUtils.toUtf8('Selecione uma instituição')); | |
1756 | 1764 | return false; |
1757 | 1765 | } |
1758 | 1766 | |
... | ... | @@ -1790,7 +1798,7 @@ function getEscolaCursoSerie() |
1790 | 1798 | |
1791 | 1799 | if (campoEscola && campoCurso) { |
1792 | 1800 | campoSerie.disabled = true; |
1793 | - campoSerie.options[0].text = stringUtils.toUtf8('Carregando séries'); | |
1801 | + campoSerie.options[0].text = stringUtils.toUtf8('Carregando séries'); | |
1794 | 1802 | |
1795 | 1803 | var xml = new ajax(atualizaLstEscolaCursoSerie); |
1796 | 1804 | xml.envia('educar_escola_curso_serie_xml.php?esc=' + campoEscola + '&cur=' + campoCurso); |
... | ... | @@ -1804,7 +1812,7 @@ function atualizaLstEscolaCursoSerie(xml) |
1804 | 1812 | { |
1805 | 1813 | var campoSerie = document.getElementById('ref_ref_cod_serie'); |
1806 | 1814 | campoSerie.length = 1; |
1807 | - campoSerie.options[0].text = stringUtils.toUtf8('Selecione uma série'); | |
1815 | + campoSerie.options[0].text = stringUtils.toUtf8('Selecione uma série'); | |
1808 | 1816 | campoSerie.disabled = false; |
1809 | 1817 | |
1810 | 1818 | series = xml.getElementsByTagName('serie'); |
... | ... | @@ -1817,7 +1825,7 @@ function atualizaLstEscolaCursoSerie(xml) |
1817 | 1825 | } |
1818 | 1826 | } |
1819 | 1827 | else { |
1820 | - campoSerie.options[0].text = stringUtils.toUtf8('A escola/curso não possui nenhuma série'); | |
1828 | + campoSerie.options[0].text = stringUtils.toUtf8('A escola/curso não possui nenhuma série'); | |
1821 | 1829 | } |
1822 | 1830 | } |
1823 | 1831 | </script> | ... | ... |