diff --git a/ieducar/intranet/educar_turma_det.php b/ieducar/intranet/educar_turma_det.php
index ca93aad..d5b16e8 100644
--- a/ieducar/intranet/educar_turma_det.php
+++ b/ieducar/intranet/educar_turma_det.php
@@ -33,6 +33,8 @@ require_once 'include/clsDetalhe.inc.php';
require_once 'include/clsBanco.inc.php';
require_once 'include/pmieducar/geral.inc.php';
+require_once 'App/Model/IedFinder.php';
+
/**
* clsIndexBase class.
*
@@ -384,83 +386,31 @@ class indice extends clsDetalhe
}
}
- if ($this->ref_ref_cod_escola && $this->ref_ref_cod_serie) {
- $obj = new clsPmieducarEscolaSerieDisciplina();
- $lst = $obj->lista($this->ref_ref_cod_serie, $this->ref_ref_cod_escola, NULL, 1);
-
- if ($lst) {
- $tabela3 = '
-
-
- Nome |
-
';
-
- $cont = 0;
- foreach ($lst as $valor) {
- if (($cont % 2) == 0) {
- $color = ' bgcolor="#E4E9ED" ';
- }
- else {
- $color = ' bgcolor="#FFFFFF" ';
- }
-
- $obj_disciplina = new clsPmieducarDisciplina($valor['ref_cod_disciplina']);
- $obj_disciplina->setOrderby('nm_disciplina ASC');
- $obj_disciplina_det = $obj_disciplina->detalhe();
- $nm_disciplina = $obj_disciplina_det['nm_disciplina'];
-
- $tabela3 .= sprintf('
-
- %s |
-
',
- $color, $nm_disciplina
- );
-
- $cont++;
- }
- $tabela3 .= '
';
- }
- }
- else {
- $obj = new clsPmieducarDisciplina();
- $lst = $obj->lista(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, $this->ref_cod_curso,
- $this->ref_cod_instituicao);
-
- if ($lst) {
- $tabela3 = '
-
-
- Nome |
-
';
-
- $cont = 0;
-
- foreach ($lst as $valor) {
- if (($cont % 2) == 0) {
- $color = ' bgcolor="#E4E9ED" ';
- }
- else {
- $color = ' bgcolor="#FFFFFF" ';
- }
-
- $tabela3 .= sprintf('
-
- %s |
-
',
- $color, $valor['nm_disciplina']
- );
-
- $cont++;
- }
+ // Recupera os componentes curriculares da turma
+ $componentes = App_Model_IedFinder::getComponentesTurma(
+ $this->ref_ref_cod_serie, $this->ref_ref_cod_escola, $this->cod_turma
+ );
- $tabela3 .= '
';
- }
+ $tabela3 = '
+
+
+ Nome |
+
';
+
+ $cont = 0;
+ foreach ($componentes as $componente) {
+ $color = ($cont++ % 2 == 0) ? ' bgcolor="#E4E9ED" ' : ' bgcolor="#FFFFFF" ';
+
+ $tabela3 .= sprintf('
+
+ %s |
+
',
+ $color, $componente
+ );
}
- if ($tabela3) {
- $this->addDetalhe(array('Disciplina', $tabela3));
- }
+ $tabela3 .= '
';
+ $this->addDetalhe(array('Componentes curriculares', $tabela3));
if ($obj_permissoes->permissao_cadastra(586, $this->pessoa_logada, 7)) {
$this->url_novo = 'educar_turma_cad.php';
--
libgit2 0.21.2