Commit f08cbf14a5daf474d270e5c3f225a6d7c4faee09

Authored by Eriksen Costa Paixão
1 parent 2bb83ebf
Exists in master

Corrigida listagem de componentes curriculares: exibe apenas os componentes atri…

…buídos a escola-série e não a série (ano escolar)
Showing 1 changed file with 7 additions and 6 deletions   Show diff stats
ieducar/intranet/educar_escola_serie_det.php
@@ -161,13 +161,12 @@ class indice extends clsDetalhe @@ -161,13 +161,12 @@ class indice extends clsDetalhe
161 } 161 }
162 162
163 $obj = new clsPmieducarEscolaSerieDisciplina(); 163 $obj = new clsPmieducarEscolaSerieDisciplina();
164 - $lst = $obj->lista($this->ref_cod_serie, $this->ref_cod_escola, NULL,1); 164 + $escolaSerieDisciplinas = $obj->lista($this->ref_cod_serie, $this->ref_cod_escola, NULL, 1);
165 165
166 - // Instancia o mapper de ano escolar  
167 - $anoEscolar = new ComponenteCurricular_Model_AnoEscolarDataMapper();  
168 - $componentes = $anoEscolar->findComponentePorSerie($this->ref_cod_serie); 166 + // Mapper de componente curricular
  167 + $componenteMapper = new ComponenteCurricular_Model_ComponenteDataMapper();
169 168
170 - if ($componentes) { 169 + if ($escolaSerieDisciplinas) {
171 $tabela = ' 170 $tabela = '
172 <table> 171 <table>
173 <tr align="center"> 172 <tr align="center">
@@ -176,7 +175,7 @@ class indice extends clsDetalhe @@ -176,7 +175,7 @@ class indice extends clsDetalhe
176 175
177 $cont = 0; 176 $cont = 0;
178 177
179 - foreach ($componentes as $componente) { 178 + foreach ($escolaSerieDisciplinas as $escolaSerieDisciplina) {
180 if (($cont % 2) == 0) { 179 if (($cont % 2) == 0) {
181 $color = ' bgcolor="#E4E9ED" '; 180 $color = ' bgcolor="#E4E9ED" ';
182 } 181 }
@@ -184,6 +183,8 @@ class indice extends clsDetalhe @@ -184,6 +183,8 @@ class indice extends clsDetalhe
184 $color = ' bgcolor="#FFFFFF" '; 183 $color = ' bgcolor="#FFFFFF" ';
185 } 184 }
186 185
  186 + $componente = $componenteMapper->find($escolaSerieDisciplina['ref_cod_disciplina']);
  187 +
187 $tabela .= sprintf(' 188 $tabela .= sprintf('
188 <tr> 189 <tr>
189 <td %s align="left">%s</td> 190 <td %s align="left">%s</td>