Commit 972276da753434dcbe150af3ade013d1cc0ff9f7

Authored by Eriksen Costa
1 parent d5f5a29b
Exists in master

Atualizado relatório "Espelho de notas" para buscar os componentes através da AP…

…I de {{{App_Model_IedFinder}}}
ieducar/intranet/educar_relatorio_alunos_nota_semestre_proc.php
... ... @@ -34,6 +34,7 @@ require_once 'include/clsBanco.inc.php';
34 34 require_once 'include/pmieducar/geral.inc.php';
35 35 require_once 'include/relatorio.inc.php';
36 36  
  37 +require_once 'App/Model/IedFinder.php';
37 38 require_once 'Avaliacao/Service/Boletim.php';
38 39  
39 40 /**
... ... @@ -179,9 +180,10 @@ class indice extends clsCadastro
179 180 $this->ref_cod_curso, $this->ref_cod_escola, $this->ref_cod_instituicao,
180 181 NULL, NULL, array(1,2,3), NULL, NULL, $this->ano, NULL, NULL, NULL, NULL, TRUE);
181 182  
182   - $obj_disciplinas = new clsPmieducarEscolaSerieDisciplina();
183   - $lst_disciplinas = $obj_disciplinas->lista($this->ref_cod_serie,
184   - $this->ref_cod_escola, NULL, 1);
  183 + // Recupera os componentes curriculares da turma
  184 + $componentes = App_Model_IedFinder::getComponentesTurma(
  185 + $this->ref_cod_serie, $this->ref_cod_escola, $this->ref_cod_turma
  186 + );
185 187  
186 188 // Recupera a quantidade de módulos e o nome do módulo da escola/turma
187 189 $modulo = App_Model_IedFinder::getModulo($this->ref_cod_escola,
... ... @@ -198,9 +200,6 @@ class indice extends clsCadastro
198 200 $relatorio->setMargem(20, 20, 20, 20);
199 201 $relatorio->exibe_produzido_por = FALSE;
200 202  
201   - // Mapper para o componente
202   - $componenteMapper = new ComponenteCurricular_Model_ComponenteDataMapper();
203   -
204 203 $array_val = array(
205 204 array(40, 'Cód.'),
206 205 array(160, 'Nome do Aluno')
... ... @@ -225,10 +224,7 @@ class indice extends clsCadastro
225 224  
226 225 $arrFunc = create_function('$data, $index', $arrFuncBody);
227 226  
228   - foreach ($lst_disciplinas as $k => $disciplina) {
229   - $componenteId = $disciplina['ref_cod_disciplina'];
230   - $componente = $componenteMapper->find($componenteId);
231   -
  227 + foreach ($componentes as $componente) {
232 228 $relatorio->novalinha(array($componente->nome), 0, 16,
233 229 TRUE, 'arial', array(400), '#515151', '#D3D3D3', '#FFFFFF', FALSE, TRUE);
234 230  
... ... @@ -242,7 +238,6 @@ class indice extends clsCadastro
242 238 if (!isset($this->boletim[$codMatricula])) {
243 239 $boletim = new Avaliacao_Service_Boletim(array(
244 240 'matricula' => $codMatricula,
245   - 'ComponenteDataMapper' => $componenteMapper,
246 241 'RegraDataMapper' => $regraMapper
247 242 ));
248 243 }
... ...