Commit 707f53bbe108b735e6668cd3c2fb347b5d5894d2
1 parent
71b852ce
Exists in
master
Alterado classe matricula para permitir definir o flag da situacao, alem do valor boolean esperado
Showing
1 changed file
with
10 additions
and
4 deletions
Show diff stats
ieducar/lib/App/Model/Matricula.php
| @@ -60,10 +60,16 @@ class App_Model_Matricula | @@ -60,10 +60,16 @@ class App_Model_Matricula | ||
| 60 | $instance->cod_matricula = $matricula; | 60 | $instance->cod_matricula = $matricula; |
| 61 | $instance->ref_usuario_cad = $usuario; | 61 | $instance->ref_usuario_cad = $usuario; |
| 62 | $instance->ref_usuario_exc = $usuario; | 62 | $instance->ref_usuario_exc = $usuario; |
| 63 | - $instance->aprovado = ($aprovado == TRUE) ? | ||
| 64 | - App_Model_MatriculaSituacao::APROVADO : | ||
| 65 | - App_Model_MatriculaSituacao::REPROVADO; | 63 | + |
| 64 | + if (is_int($aprovado)) | ||
| 65 | + $instance->aprovado = $aprovado; | ||
| 66 | + else | ||
| 67 | + { | ||
| 68 | + $instance->aprovado = ($aprovado == TRUE) ? | ||
| 69 | + App_Model_MatriculaSituacao::APROVADO : | ||
| 70 | + App_Model_MatriculaSituacao::REPROVADO; | ||
| 71 | + } | ||
| 66 | 72 | ||
| 67 | return $instance->edita(); | 73 | return $instance->edita(); |
| 68 | } | 74 | } |
| 69 | -} | ||
| 70 | \ No newline at end of file | 75 | \ No newline at end of file |
| 76 | +} |