From f08cbf14a5daf474d270e5c3f225a6d7c4faee09 Mon Sep 17 00:00:00 2001 From: Eriksen Costa Paixão Date: Mon, 8 Mar 2010 15:05:38 +0000 Subject: [PATCH] Corrigida listagem de componentes curriculares: exibe apenas os componentes atribuídos a escola-série e não a série (ano escolar) --- ieducar/intranet/educar_escola_serie_det.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ieducar/intranet/educar_escola_serie_det.php b/ieducar/intranet/educar_escola_serie_det.php index 223bc66..c3826c1 100644 --- a/ieducar/intranet/educar_escola_serie_det.php +++ b/ieducar/intranet/educar_escola_serie_det.php @@ -161,13 +161,12 @@ class indice extends clsDetalhe } $obj = new clsPmieducarEscolaSerieDisciplina(); - $lst = $obj->lista($this->ref_cod_serie, $this->ref_cod_escola, NULL,1); + $escolaSerieDisciplinas = $obj->lista($this->ref_cod_serie, $this->ref_cod_escola, NULL, 1); - // Instancia o mapper de ano escolar - $anoEscolar = new ComponenteCurricular_Model_AnoEscolarDataMapper(); - $componentes = $anoEscolar->findComponentePorSerie($this->ref_cod_serie); + // Mapper de componente curricular + $componenteMapper = new ComponenteCurricular_Model_ComponenteDataMapper(); - if ($componentes) { + if ($escolaSerieDisciplinas) { $tabela = ' @@ -176,7 +175,7 @@ class indice extends clsDetalhe $cont = 0; - foreach ($componentes as $componente) { + foreach ($escolaSerieDisciplinas as $escolaSerieDisciplina) { if (($cont % 2) == 0) { $color = ' bgcolor="#E4E9ED" '; } @@ -184,6 +183,8 @@ class indice extends clsDetalhe $color = ' bgcolor="#FFFFFF" '; } + $componente = $componenteMapper->find($escolaSerieDisciplina['ref_cod_disciplina']); + $tabela .= sprintf(' -- libgit2 0.21.2
%s