Commit 725361339f6824dfcd90f28ce7ad9f30ac9e0305
Exists in
master
Merge branch 'master' of github.com:portabilis/ieducar
Showing
5 changed files
with
248 additions
and
46 deletions
Show diff stats
@@ -0,0 +1,165 @@ | @@ -0,0 +1,165 @@ | ||
1 | +<?php | ||
2 | +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | ||
3 | + * * | ||
4 | + * @author Prefeitura Municipal de Itajaí * | ||
5 | + * @updated 29/03/2007 * | ||
6 | + * Pacote: i-PLB Software Público Livre e Brasileiro * | ||
7 | + * * | ||
8 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí * | ||
9 | + * ctima@itajai.sc.gov.br * | ||
10 | + * * | ||
11 | + * Este programa é software livre, você pode redistribuí-lo e/ou * | ||
12 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme * | ||
13 | + * publicada pela Free Software Foundation, tanto a versão 2 da * | ||
14 | + * Licença como (a seu critério) qualquer versão mais nova. * | ||
15 | + * * | ||
16 | + * Este programa é distribuído na expectativa de ser útil, mas SEM * | ||
17 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- * | ||
18 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- * | ||
19 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. * | ||
20 | + * * | ||
21 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU * | ||
22 | + * junto com este programa. Se não, escreva para a Free Software * | ||
23 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * | ||
24 | + * 02111-1307, USA. * | ||
25 | + * * | ||
26 | + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | ||
27 | + * | ||
28 | + * @author Lucas Schmoeller da Silva <lucas@portabilis.com.br> | ||
29 | + * @category i-Educar | ||
30 | + * @license @@license@@ | ||
31 | + * @package iEd_Pmieducar | ||
32 | + * @since 09/2013 | ||
33 | + * @version $Id$ | ||
34 | + * | ||
35 | + */ | ||
36 | +require_once ("include/clsBase.inc.php"); | ||
37 | +require_once ("include/clsCadastro.inc.php"); | ||
38 | +require_once ("include/clsBanco.inc.php"); | ||
39 | +require_once( "include/pmieducar/geral.inc.php" ); | ||
40 | + | ||
41 | +class clsIndexBase extends clsBase | ||
42 | +{ | ||
43 | + function Formular() | ||
44 | + { | ||
45 | + $this->SetTitulo( "{$this->_instituicao} i-Educar - Transferência Solicitação" ); | ||
46 | + $this->processoAp = "578"; | ||
47 | + } | ||
48 | +} | ||
49 | + | ||
50 | +class indice extends clsCadastro | ||
51 | +{ | ||
52 | + /** | ||
53 | + * Referencia pega da session para o idpes do usuario atual | ||
54 | + * | ||
55 | + * @var int | ||
56 | + */ | ||
57 | + var $pessoa_logada; | ||
58 | + | ||
59 | + var $cod_transferencia_solicitacao; | ||
60 | + var $ref_cod_transferencia_tipo; | ||
61 | + var $ref_usuario_exc; | ||
62 | + var $ref_usuario_cad; | ||
63 | + var $ref_cod_matricula_entrada; | ||
64 | + var $ref_cod_matricula_saida; | ||
65 | + var $observacao; | ||
66 | + var $data_cadastro; | ||
67 | + var $data_exclusao; | ||
68 | + var $ativo; | ||
69 | + var $data_transferencia; | ||
70 | + | ||
71 | + var $ref_cod_matricula; | ||
72 | + var $transferencia_tipo; | ||
73 | + var $ref_cod_aluno; | ||
74 | + var $nm_aluno; | ||
75 | + | ||
76 | + function Inicializar() | ||
77 | + { | ||
78 | + $retorno = "Novo"; | ||
79 | + @session_start(); | ||
80 | + $this->pessoa_logada = $_SESSION['id_pessoa']; | ||
81 | + @session_write_close(); | ||
82 | + | ||
83 | + $this->ref_cod_matricula=$_GET["ref_cod_matricula"]; | ||
84 | + $this->ref_cod_aluno=$_GET["ref_cod_aluno"]; | ||
85 | + $cancela=$_GET["cancela"]; | ||
86 | + | ||
87 | + $obj_permissoes = new clsPermissoes(); | ||
88 | + $obj_permissoes->permissao_cadastra( 578, $this->pessoa_logada, 7, "educar_matricula_lst.php?ref_cod_aluno={$this->ref_cod_aluno}" ); | ||
89 | + | ||
90 | + $obj_matricula = new clsPmieducarMatricula( $this->cod_matricula,null,null,null,$this->pessoa_logada,null,null,6 ); | ||
91 | + | ||
92 | + $det_matricula = $obj_matricula->detalhe(); | ||
93 | + | ||
94 | + $this->url_cancelar = "educar_matricula_det.php?cod_matricula={$this->ref_cod_matricula}"; | ||
95 | + $this->nome_url_cancelar = "Cancelar"; | ||
96 | + return $retorno; | ||
97 | + } | ||
98 | + | ||
99 | + function Gerar() | ||
100 | + { | ||
101 | + // primary keys | ||
102 | + $this->campoOculto( "ref_cod_aluno", $this->ref_cod_aluno ); | ||
103 | + $this->campoOculto( "ref_cod_matricula", $this->ref_cod_matricula ); | ||
104 | + | ||
105 | + $obj_aluno = new clsPmieducarAluno(); | ||
106 | + $lst_aluno = $obj_aluno->lista( $this->ref_cod_aluno,null,null,null,null,null,null,null,null,null,1 ); | ||
107 | + if ( is_array($lst_aluno) ) | ||
108 | + { | ||
109 | + $det_aluno = array_shift($lst_aluno); | ||
110 | + $this->nm_aluno = $det_aluno["nome_aluno"]; | ||
111 | + $this->campoTexto( "nm_aluno", "Aluno", $this->nm_aluno, 30, 255, true,false,false,"","","","",true ); | ||
112 | + } | ||
113 | + | ||
114 | + // text | ||
115 | + $this->campoMemo( "observacao", "Observação", $this->observacao, 60, 5, false ); | ||
116 | + } | ||
117 | + | ||
118 | + function Novo() | ||
119 | + { | ||
120 | + @session_start(); | ||
121 | + $this->pessoa_logada = $_SESSION['id_pessoa']; | ||
122 | + @session_write_close(); | ||
123 | + | ||
124 | + $obj_permissoes = new clsPermissoes(); | ||
125 | + $obj_permissoes->permissao_cadastra( 578, $this->pessoa_logada, 7, "educar_matricula_det.php?cod_matricula={$this->ref_cod_matricula}" ); | ||
126 | + | ||
127 | + $obj_matricula = new clsPmieducarMatricula( $this->ref_cod_matricula,null,null,null,$this->pessoa_logada,null,null,6 ); | ||
128 | + | ||
129 | + $det_matricula = $obj_matricula->detalhe(); | ||
130 | + | ||
131 | + if($obj_matricula->edita()) | ||
132 | + { | ||
133 | + | ||
134 | + if( $obj_matricula->cadastraObs($this->observacao) ) | ||
135 | + { | ||
136 | + $this->mensagem .= "Abandono realizado com sucesso.<br>"; | ||
137 | + header( "Location: educar_matricula_det.php?cod_matricula={$this->ref_cod_matricula}" ); | ||
138 | + //die(); | ||
139 | + return true; | ||
140 | + } | ||
141 | + | ||
142 | + $this->mensagem = "Observação não pode ser salva.<br>"; | ||
143 | + | ||
144 | + return false; | ||
145 | + } | ||
146 | + $this->mensagem = "Abandono não pode ser realizado.<br>"; | ||
147 | + return false; | ||
148 | + | ||
149 | + } | ||
150 | + | ||
151 | + function Excluir() | ||
152 | + { | ||
153 | + return false; | ||
154 | + } | ||
155 | +} | ||
156 | + | ||
157 | +// cria uma extensao da classe base | ||
158 | +$pagina = new clsIndexBase(); | ||
159 | +// cria o conteudo | ||
160 | +$miolo = new indice(); | ||
161 | +// adiciona o conteudo na clsBase | ||
162 | +$pagina->addForm( $miolo ); | ||
163 | +// gera o html | ||
164 | +$pagina->MakeAll(); | ||
165 | +?> |
ieducar/intranet/educar_matricula_det.php
@@ -186,6 +186,7 @@ class indice extends clsDetalhe | @@ -186,6 +186,7 @@ class indice extends clsDetalhe | ||
186 | $this->addDetalhe(array('Número Reserva Vaga', $registro['ref_cod_reserva_vaga'])); | 186 | $this->addDetalhe(array('Número Reserva Vaga', $registro['ref_cod_reserva_vaga'])); |
187 | } | 187 | } |
188 | 188 | ||
189 | + $campoObs = false; | ||
189 | if ($registro['aprovado']) { | 190 | if ($registro['aprovado']) { |
190 | if ($registro['aprovado'] == 1) { | 191 | if ($registro['aprovado'] == 1) { |
191 | $aprovado = 'Aprovado'; | 192 | $aprovado = 'Aprovado'; |
@@ -204,6 +205,7 @@ class indice extends clsDetalhe | @@ -204,6 +205,7 @@ class indice extends clsDetalhe | ||
204 | } | 205 | } |
205 | elseif ($registro['aprovado'] == 6) { | 206 | elseif ($registro['aprovado'] == 6) { |
206 | $aprovado = 'Abandono'; | 207 | $aprovado = 'Abandono'; |
208 | + $campoObs = true; | ||
207 | } | 209 | } |
208 | elseif ($registro['aprovado'] == 7) { | 210 | elseif ($registro['aprovado'] == 7) { |
209 | $aprovado = 'Em Exame'; | 211 | $aprovado = 'Em Exame'; |
@@ -212,6 +214,9 @@ class indice extends clsDetalhe | @@ -212,6 +214,9 @@ class indice extends clsDetalhe | ||
212 | $this->addDetalhe(array('Situação', $aprovado)); | 214 | $this->addDetalhe(array('Situação', $aprovado)); |
213 | } | 215 | } |
214 | 216 | ||
217 | + if($campoObs) | ||
218 | + $this->addDetalhe(array('Observação',$registro['observacao'])); | ||
219 | + | ||
215 | $this->addDetalhe(array('Formando', $registro['formando'] == 0 ? 'Não' : 'Sim')); | 220 | $this->addDetalhe(array('Formando', $registro['formando'] == 0 ? 'Não' : 'Sim')); |
216 | 221 | ||
217 | $obj_permissoes = new clsPermissoes(); | 222 | $obj_permissoes = new clsPermissoes(); |
@@ -251,7 +256,7 @@ class indice extends clsDetalhe | @@ -251,7 +256,7 @@ class indice extends clsDetalhe | ||
251 | $this->array_botao_url_script[] = "go(\"educar_matricula_turma_lst.php?ref_cod_matricula={$registro['cod_matricula']}\")"; | 256 | $this->array_botao_url_script[] = "go(\"educar_matricula_turma_lst.php?ref_cod_matricula={$registro['cod_matricula']}\")"; |
252 | 257 | ||
253 | $this->array_botao[] = 'Abandono'; | 258 | $this->array_botao[] = 'Abandono'; |
254 | - $this->array_botao_url_script[] = "if(confirm(\"Deseja confirmar o abandono desta matrícula?\"))go(\"educar_matricula_abandono_cad.php?ref_cod_matricula={$registro['cod_matricula']}&ref_cod_aluno={$registro['ref_cod_aluno']}\");"; | 259 | + $this->array_botao_url_script[] = "go(\"educar_abandono_cad.php?ref_cod_matricula={$registro['cod_matricula']}&ref_cod_aluno={$registro['ref_cod_aluno']}\");"; |
255 | 260 | ||
256 | if ($registro['ref_ref_cod_serie']) { | 261 | if ($registro['ref_ref_cod_serie']) { |
257 | $this->array_botao[] = 'Reclassificar'; | 262 | $this->array_botao[] = 'Reclassificar'; |
ieducar/intranet/funcionario_lst.php
@@ -77,17 +77,11 @@ class indice extends clsListagem | @@ -77,17 +77,11 @@ class indice extends clsListagem | ||
77 | $this->nome_acao = "Novo"; | 77 | $this->nome_acao = "Novo"; |
78 | 78 | ||
79 | $this->largura = "100%"; | 79 | $this->largura = "100%"; |
80 | - | ||
81 | - $localizacao = new LocalizacaoSistema(); | ||
82 | - $localizacao->entradaCaminhos( array( | ||
83 | - $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | ||
84 | -<<<<<<< HEAD | ||
85 | - "" => "Cadastro de Funcionários" | ||
86 | -======= | ||
87 | - "" => "Lista de Funcionários" | ||
88 | ->>>>>>> 691e3ffa3b5f4c6dd70c0728bccfc00e665bf077 | ||
89 | - )); | ||
90 | - $this->enviaLocalizacao($localizacao->montar()); | 80 | + |
81 | + $localizacao = new LocalizacaoSistema(); | ||
82 | + $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . '/intranet' => 'i-Educar', '' => 'Lista de Funcionários')); | ||
83 | + | ||
84 | + $this->enviaLocalizacao($localizacao->montar()); | ||
91 | } | 85 | } |
92 | } | 86 | } |
93 | 87 | ||
@@ -95,4 +89,4 @@ $pagina = new clsIndex(); | @@ -95,4 +89,4 @@ $pagina = new clsIndex(); | ||
95 | $miolo = new indice(); | 89 | $miolo = new indice(); |
96 | $pagina->addForm( $miolo ); | 90 | $pagina->addForm( $miolo ); |
97 | $pagina->MakeAll(); | 91 | $pagina->MakeAll(); |
98 | -?> | ||
99 | \ No newline at end of file | 92 | \ No newline at end of file |
93 | +?> |
ieducar/intranet/include/pmieducar/clsPmieducarMatricula.inc.php
1 | <?php | 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 | * <ctima@itajai.sc.gov.br> | 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 | * do GNU para mais detalhes. | 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 | * @category i-Educar | 24 | * @category i-Educar |
25 | * @license @@license@@ | 25 | * @license @@license@@ |
26 | * @package iEd_Pmieducar | 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 | * @version $Id$ | 28 | * @version $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
@@ -33,11 +33,11 @@ require_once 'include/pmieducar/geral.inc.php'; | @@ -33,11 +33,11 @@ require_once 'include/pmieducar/geral.inc.php'; | ||
33 | /** | 33 | /** |
34 | * clsPmieducarMatricula class. | 34 | * clsPmieducarMatricula class. |
35 | * | 35 | * |
36 | - * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br> | 36 | + * @author Prefeitura Municipal de Itajaà <ctima@itajai.sc.gov.br> |
37 | * @category i-Educar | 37 | * @category i-Educar |
38 | * @license @@license@@ | 38 | * @license @@license@@ |
39 | * @package iEd_Pmieducar | 39 | * @package iEd_Pmieducar |
40 | - * @since Classe disponível desde a versão 1.0.0 | 40 | + * @since Classe disponÃvel desde a versão 1.0.0 |
41 | * @version @@package_version@@ | 41 | * @version @@package_version@@ |
42 | */ | 42 | */ |
43 | class clsPmieducarMatricula | 43 | class clsPmieducarMatricula |
@@ -65,7 +65,7 @@ class clsPmieducarMatricula | @@ -65,7 +65,7 @@ class clsPmieducarMatricula | ||
65 | /** | 65 | /** |
66 | * caso seja a primeira matricula do aluno | 66 | * caso seja a primeira matricula do aluno |
67 | * marcar como true este atributo | 67 | * marcar como true este atributo |
68 | - * necessário para contabilizar como admitido por transferência | 68 | + * necessário para contabilizar como admitido por transferência |
69 | * no relatorio de movimentacao mensal | 69 | * no relatorio de movimentacao mensal |
70 | * | 70 | * |
71 | * @var bool | 71 | * @var bool |
@@ -74,7 +74,7 @@ class clsPmieducarMatricula | @@ -74,7 +74,7 @@ class clsPmieducarMatricula | ||
74 | var $matricula_transferencia; | 74 | var $matricula_transferencia; |
75 | 75 | ||
76 | /** | 76 | /** |
77 | - * Armazena o total de resultados obtidos na última chamada ao método lista(). | 77 | + * Armazena o total de resultados obtidos na última chamada ao método lista(). |
78 | * @var int | 78 | * @var int |
79 | */ | 79 | */ |
80 | var $_total; | 80 | var $_total; |
@@ -92,33 +92,33 @@ class clsPmieducarMatricula | @@ -92,33 +92,33 @@ class clsPmieducarMatricula | ||
92 | var $_tabela; | 92 | var $_tabela; |
93 | 93 | ||
94 | /** | 94 | /** |
95 | - * Lista separada por vírgula, com os campos que devem ser selecionados na | ||
96 | - * próxima chamado ao método lista(). | 95 | + * Lista separada por vÃrgula, com os campos que devem ser selecionados na |
96 | + * próxima chamado ao método lista(). | ||
97 | * @var string | 97 | * @var string |
98 | */ | 98 | */ |
99 | var $_campos_lista; | 99 | var $_campos_lista; |
100 | 100 | ||
101 | /** | 101 | /** |
102 | - * Lista com todos os campos da tabela separados por vírgula, padrão para | ||
103 | - * seleção no método lista. | 102 | + * Lista com todos os campos da tabela separados por vÃrgula, padrão para |
103 | + * seleção no método lista. | ||
104 | * @var string | 104 | * @var string |
105 | */ | 105 | */ |
106 | var $_todos_campos; | 106 | var $_todos_campos; |
107 | 107 | ||
108 | /** | 108 | /** |
109 | - * Valor que define a quantidade de registros a ser retornada pelo método lista(). | 109 | + * Valor que define a quantidade de registros a ser retornada pelo método lista(). |
110 | * @var int | 110 | * @var int |
111 | */ | 111 | */ |
112 | var $_limite_quantidade; | 112 | var $_limite_quantidade; |
113 | 113 | ||
114 | /** | 114 | /** |
115 | - * Define o valor de offset no retorno dos registros no método lista(). | 115 | + * Define o valor de offset no retorno dos registros no método lista(). |
116 | * @var int | 116 | * @var int |
117 | */ | 117 | */ |
118 | var $_limite_offset; | 118 | var $_limite_offset; |
119 | 119 | ||
120 | /** | 120 | /** |
121 | - * Define o campo para ser usado como padrão de ordenação no método lista(). | 121 | + * Define o campo para ser usado como padrão de ordenação no método lista(). |
122 | * @var string | 122 | * @var string |
123 | */ | 123 | */ |
124 | var $_campo_order_by; | 124 | var $_campo_order_by; |
@@ -543,7 +543,7 @@ class clsPmieducarMatricula | @@ -543,7 +543,7 @@ class clsPmieducarMatricula | ||
543 | } | 543 | } |
544 | 544 | ||
545 | /** | 545 | /** |
546 | - * Retorna uma lista de registros filtrados de acordo com os parâmetros. | 546 | + * Retorna uma lista de registros filtrados de acordo com os parâmetros. |
547 | * @return array | 547 | * @return array |
548 | */ | 548 | */ |
549 | function lista($int_cod_matricula = NULL, $int_ref_cod_reserva_vaga = NULL, | 549 | function lista($int_cod_matricula = NULL, $int_ref_cod_reserva_vaga = NULL, |
@@ -567,7 +567,7 @@ class clsPmieducarMatricula | @@ -567,7 +567,7 @@ class clsPmieducarMatricula | ||
567 | ) as data_nasc"; | 567 | ) as data_nasc"; |
568 | } | 568 | } |
569 | 569 | ||
570 | - $sql = "SELECT {$this->_campos_lista}, c.ref_cod_instituicao, p.nome, a.cod_aluno, a.ref_idpes, c.cod_curso FROM {$this->_tabela} m, {$this->_schema}curso c, {$this->_schema}aluno a, cadastro.pessoa p "; | 570 | + $sql = "SELECT {$this->_campos_lista}, c.ref_cod_instituicao, p.nome, a.cod_aluno, a.ref_idpes, c.cod_curso, m.observacao FROM {$this->_tabela} m, {$this->_schema}curso c, {$this->_schema}aluno a, cadastro.pessoa p "; |
571 | 571 | ||
572 | $whereAnd = " AND "; | 572 | $whereAnd = " AND "; |
573 | $filtros = " WHERE m.ref_cod_aluno = a.cod_aluno AND m.ref_cod_curso = c.cod_curso AND p.idpes = a.ref_idpes "; | 573 | $filtros = " WHERE m.ref_cod_aluno = a.cod_aluno AND m.ref_cod_curso = c.cod_curso AND p.idpes = a.ref_idpes "; |
@@ -839,7 +839,7 @@ class clsPmieducarMatricula | @@ -839,7 +839,7 @@ class clsPmieducarMatricula | ||
839 | } | 839 | } |
840 | 840 | ||
841 | /** | 841 | /** |
842 | - * Define quais campos da tabela serão selecionados no método Lista(). | 842 | + * Define quais campos da tabela serão selecionados no método Lista(). |
843 | */ | 843 | */ |
844 | function setCamposLista($str_campos) | 844 | function setCamposLista($str_campos) |
845 | { | 845 | { |
@@ -847,7 +847,7 @@ class clsPmieducarMatricula | @@ -847,7 +847,7 @@ class clsPmieducarMatricula | ||
847 | } | 847 | } |
848 | 848 | ||
849 | /** | 849 | /** |
850 | - * Define que o método Lista() deverpa retornar todos os campos da tabela. | 850 | + * Define que o método Lista() deverpa retornar todos os campos da tabela. |
851 | */ | 851 | */ |
852 | function resetCamposLista() | 852 | function resetCamposLista() |
853 | { | 853 | { |
@@ -855,7 +855,7 @@ class clsPmieducarMatricula | @@ -855,7 +855,7 @@ class clsPmieducarMatricula | ||
855 | } | 855 | } |
856 | 856 | ||
857 | /** | 857 | /** |
858 | - * Define limites de retorno para o método Lista(). | 858 | + * Define limites de retorno para o método Lista(). |
859 | */ | 859 | */ |
860 | function setLimite($intLimiteQtd, $intLimiteOffset = NULL) | 860 | function setLimite($intLimiteQtd, $intLimiteOffset = NULL) |
861 | { | 861 | { |
@@ -864,7 +864,7 @@ class clsPmieducarMatricula | @@ -864,7 +864,7 @@ class clsPmieducarMatricula | ||
864 | } | 864 | } |
865 | 865 | ||
866 | /** | 866 | /** |
867 | - * Retorna a string com o trecho da query responsável pelo limite de | 867 | + * Retorna a string com o trecho da query responsável pelo limite de |
868 | * registros retornados/afetados. | 868 | * registros retornados/afetados. |
869 | * | 869 | * |
870 | * @return string | 870 | * @return string |
@@ -882,7 +882,7 @@ class clsPmieducarMatricula | @@ -882,7 +882,7 @@ class clsPmieducarMatricula | ||
882 | } | 882 | } |
883 | 883 | ||
884 | /** | 884 | /** |
885 | - * Define o campo para ser utilizado como ordenação no método Lista(). | 885 | + * Define o campo para ser utilizado como ordenação no método Lista(). |
886 | */ | 886 | */ |
887 | function setOrderby($strNomeCampo) | 887 | function setOrderby($strNomeCampo) |
888 | { | 888 | { |
@@ -892,7 +892,7 @@ class clsPmieducarMatricula | @@ -892,7 +892,7 @@ class clsPmieducarMatricula | ||
892 | } | 892 | } |
893 | 893 | ||
894 | /** | 894 | /** |
895 | - * Retorna a string com o trecho da query responsável pela Ordenação dos | 895 | + * Retorna a string com o trecho da query responsável pela Ordenação dos |
896 | * registros. | 896 | * registros. |
897 | * | 897 | * |
898 | * @return string | 898 | * @return string |
@@ -1026,6 +1026,27 @@ class clsPmieducarMatricula | @@ -1026,6 +1026,27 @@ class clsPmieducarMatricula | ||
1026 | return $db->CampoUnico($sql); | 1026 | return $db->CampoUnico($sql); |
1027 | } | 1027 | } |
1028 | 1028 | ||
1029 | + /** | ||
1030 | + * Seta a matricula para abandono e seta a observação passada por parâmetro | ||
1031 | + * @author lucassch | ||
1032 | + * @return boolean | ||
1033 | + */ | ||
1034 | + function cadastraObs($obs){ | ||
1035 | + | ||
1036 | + if (is_numeric($this->cod_matricula)){ | ||
1037 | + if (trim($obs)=='') | ||
1038 | + $obs = "Não informado"; | ||
1039 | + $db = new clsBanco(); | ||
1040 | + $consulta = "UPDATE {$this->_tabela} SET aprovado = 6, observacao = '$obs' WHERE cod_matricula = $this->cod_matricula"; | ||
1041 | + $db->Consulta($consulta); | ||
1042 | + | ||
1043 | + return TRUE; | ||
1044 | + } | ||
1045 | + | ||
1046 | + return false; | ||
1047 | + | ||
1048 | + } | ||
1049 | + | ||
1029 | function aprova_matricula_andamento_curso_sem_avaliacao() | 1050 | function aprova_matricula_andamento_curso_sem_avaliacao() |
1030 | { | 1051 | { |
1031 | if (is_numeric($this->ref_ref_cod_escola)) { | 1052 | if (is_numeric($this->ref_ref_cod_escola)) { |
ieducar/misc/database/deltas/portabilis/53_cria_campo_observacao_matricula.sql
0 → 100644
@@ -0,0 +1,17 @@ | @@ -0,0 +1,17 @@ | ||
1 | + -- // | ||
2 | + | ||
3 | + -- | ||
4 | + -- Cria coluna observacao para registrar informações sobre abandono na tabela de matrícula | ||
5 | + -- | ||
6 | + -- @author Lucas Schmoeller da Silva <lucas@portabilis.com.br> | ||
7 | + -- @license @@license@@ | ||
8 | + -- @version $Id$ | ||
9 | + | ||
10 | + ALTER TABLE pmieducar.matricula ADD COLUMN observacao character varying(300); | ||
11 | + UPDATE pmieducar.matricula set observacao = 'Não Informado' where aprovado= 6; | ||
12 | + | ||
13 | + -- //@UNDO | ||
14 | + | ||
15 | + ALTER TABLE pmieducar.matricula DROP COLUMN observacao; | ||
16 | + | ||
17 | + -- // |