Commit 023045742771fc1a896718c52c5e54e223bfcae7
1 parent
92d5a58e
Exists in
master
Atualizado relatório "Ata de resultado final" para buscar os componentes através…
… da API de {{{App_Model_IedFinder}}}
Showing
1 changed file
with
6 additions
and
17 deletions
Show diff stats
ieducar/intranet/educar_relatorio_ata_resultado_final_proc.php
| @@ -34,7 +34,7 @@ require_once 'include/clsBanco.inc.php'; | @@ -34,7 +34,7 @@ require_once 'include/clsBanco.inc.php'; | ||
| 34 | require_once 'include/pmieducar/geral.inc.php'; | 34 | require_once 'include/pmieducar/geral.inc.php'; |
| 35 | require_once 'include/clsPDF.inc.php'; | 35 | require_once 'include/clsPDF.inc.php'; |
| 36 | 36 | ||
| 37 | -require_once 'ComponenteCurricular/Model/AnoEscolarDataMapper.php'; | 37 | +require_once 'App/Model/IedFinder.php'; |
| 38 | require_once 'Avaliacao/Service/Boletim.php'; | 38 | require_once 'Avaliacao/Service/Boletim.php'; |
| 39 | 39 | ||
| 40 | /** | 40 | /** |
| @@ -204,25 +204,14 @@ class indice extends clsCadastro | @@ -204,25 +204,14 @@ class indice extends clsCadastro | ||
| 204 | $this->regra = $regraMapper->find($det_serie['regra_avaliacao_id']); | 204 | $this->regra = $regraMapper->find($det_serie['regra_avaliacao_id']); |
| 205 | 205 | ||
| 206 | // Carrega as definições de disciplina | 206 | // Carrega as definições de disciplina |
| 207 | - $escolaSerieDisciplina = new clsPmieducarEscolaSerieDisciplina(); | ||
| 208 | - $escolaSerieDisciplina = $escolaSerieDisciplina->lista( | ||
| 209 | - $this->ref_cod_serie, $this->ref_cod_escola, NULL, 1); | 207 | + $componentes = App_Model_IedFinder::getComponentesTurma( |
| 208 | + $this->ref_cod_serie, $this->ref_cod_escola, $this->ref_cod_turma | ||
| 209 | + ); | ||
| 210 | 210 | ||
| 211 | - // Instancia mapper para ano escolar | ||
| 212 | - $anoEscolarMapper = new ComponenteCurricular_Model_AnoEscolarDataMapper(); | ||
| 213 | - | ||
| 214 | - foreach ($escolaSerieDisciplina as $disciplina) { | ||
| 215 | - $id = $disciplina['ref_cod_disciplina']; | ||
| 216 | - $anoEscolar = $anoEscolarMapper->find(array($id)); | ||
| 217 | - | ||
| 218 | - $cargaHoraria = !is_null($disciplina['carga_horaria']) ? | ||
| 219 | - $disciplina['carga_horaria'] : $anoEscolar->cargaHoraria; | ||
| 220 | - | ||
| 221 | - $anoEscolar->componenteCurricular->cargaHoraria = $cargaHoraria; | ||
| 222 | - $this->componentes[$id] = $anoEscolar->componenteCurricular; | 211 | + foreach ($componentes as $id => $componente) { |
| 212 | + $this->componentes[$id] = $componente; | ||
| 223 | } | 213 | } |
| 224 | 214 | ||
| 225 | - | ||
| 226 | $this->presencaGeral = ($this->regra->get('tipoPresenca') == RegraAvaliacao_Model_TipoPresenca::GERAL); | 215 | $this->presencaGeral = ($this->regra->get('tipoPresenca') == RegraAvaliacao_Model_TipoPresenca::GERAL); |
| 227 | 216 | ||
| 228 | $obj_turma = new clsPmieducarTurma($this->ref_cod_turma); | 217 | $obj_turma = new clsPmieducarTurma($this->ref_cod_turma); |