/** * @see Core_Controller_Page_EditController#_preConstruct() */ protected function _preConstruct() { // Id do usuário na session $usuario = $this->getSession()->id_pessoa; $this->_options = array('new_success' => 'boletim', 'new_success_params' => array('matricula' => $this->getRequest()->matricula), 'edit_success' => 'boletim', 'edit_success_params' => array('matricula' => $this->getRequest()->matricula)); $this->_service = new Avaliacao_Service_Boletim(array('matricula' => $this->getRequest()->matricula, 'usuario' => $usuario)); $this->_regra = $this->_service->getRegra(); }
/** * @see clsCadastro#Gerar() */ public function Gerar() { $this->campoOculto('matricula', $this->_matricula); $this->campoOculto('componenteCurricular', $this->_componenteCurricular); $this->campoOculto('etapa', $this->_etapa); $matricula = $this->_service->getOption('matriculaData'); $this->campoRotulo('1nome', 'Nome', $matricula['nome']); $this->campoRotulo('2curso', 'Curso', $matricula['curso_nome']); $this->campoRotulo('3serie', 'Série', $matricula['serie_nome']); $this->campoRotulo('4turma', 'Turma', $matricula['turma_nome']); $this->campoRotulo('5etapa', 'Etapa', $this->_etapa == 'Rc' ? 'Exame' : $this->_etapa); $componentes = $this->_service->getComponentes(); $this->campoRotulo('6componente_curricular', 'Componente curricular', $componentes[$this->getRequest()->componenteCurricular]); // Valores de arredondamento $valoresArredondamento = $this->_service->getRegra()->tabelaArredondamento->findTabelaValor(); $valores = array(); foreach ($valoresArredondamento as $valor) { if ($this->_service->getRegra()->get('tipoNota') == RegraAvaliacao_Model_Nota_TipoValor::NUMERICA) { $valores[(string) $valor->nome] = $valor->nome; } else { $valores[(string) $valor->valorMaximo] = $valor->nome . ' (' . $valor->descricao . ')'; } } $this->campoLista('nota', 'Nota', $valores, urldecode($this->_nota->nota)); // Caso a falta seja calculada por componente if ($this->_regra->get('tipoPresenca') == RegraAvaliacao_Model_TipoPresenca::POR_COMPONENTE) { $this->campoLista('falta', 'Falta', range(0, 100, 1), $this->_falta->quantidade); } // Caso o parecer seja por etapa e por componente if ($this->_regra->get('parecerDescritivo') == RegraAvaliacao_Model_TipoParecerDescritivo::ETAPA_COMPONENTE) { $this->campoMemo('parecer', 'Parecer', $this->_parecer, 40, 10, false); } }
protected function _notasFaltasComponentes(Avaliacao_Service_Boletim $boletim) { $etapas = $boletim->getOption('etapas'); $notas = $boletim->getNotasComponentes(); if ($faltaPorComponente = $boletim->getRegra()->get('tipoPresenca') == RegraAvaliacao_Model_TipoPresenca::POR_COMPONENTE) { $faltas = $boletim->getFaltasComponentes(); } else { $faltas = $boletim->getFaltasGerais(); } $componentes = $boletim->getComponentes(); $medias = $boletim->getMediasComponentes(); $situacao = $boletim->getSituacaoAluno(); $etapas = range(0, $etapas - 1); $altura_linha = 15; // Calcula o espaço disponível para as notas e faltas $extraColumns = 2 + ($situacao->recuperacao == TRUE ? 1 : 0); $total = 782 - (80 + 60 * $extraColumns + 120); $this->pdf->quadrado_relativo(30, $this->page_y, 782, $altura_linha, 0.5); $this->pdf->escreve_relativo_center('Módulos', 30, $this->page_y + 2, 80, 13); $this->pdf->linha_relativa(30, $this->page_y, 0, $altura_linha, 0.1); $this->pdf->linha_relativa(80 + 30, $this->page_y, 0, $altura_linha, 0.1); $matriculaSituacao = App_Model_MatriculaSituacao::getInstance(); // Escreve as etapas $x = 80 + 30; $largura = $total / count($etapas); if ($faltaPorComponente) { $larguraDv = $largura / 2; } else { $larguraDv = $largura; } foreach ($etapas as $etapa) { $this->pdf->escreve_relativo_center($etapa + 1, $x, $this->page_y + 2, $largura, 13); $x += $largura; $this->pdf->linha_relativa($x, $this->page_y, 0, $altura_linha, 0.1); } // Escreve os campos para Média final, Falta e Situação $labels = array(); $labels[] = 'Média final'; if ($situacao->recuperacao) { $labels[] = 'Exame'; } $labels[] = '% Presença'; $labels[] = 'Situação'; foreach ($labels as $label) { $largura = $label == 'Situação' ? 120 : 60; $this->pdf->escreve_relativo_center($label, $x, $this->page_y + 2, $largura, 13); $x += $largura; $this->pdf->linha_relativa($x, $this->page_y, 0, $altura_linha, 0.1); } // Escreve os rótulos para notas e faltas $x = 80 + 30; // Nova linha $this->page_y += 15; $this->pdf->quadrado_relativo(30, $this->page_y, 782, $altura_linha, 0.5); $this->pdf->escreve_relativo_center('Componentes', 30, $this->page_y + 2, 80, 13); $this->pdf->linha_relativa(30, $this->page_y, 0, $altura_linha, 0.1); $this->pdf->linha_relativa(110, $this->page_y, 0, $altura_linha, 0.1); foreach ($etapas as $etapa) { $this->pdf->escreve_relativo_center('Nota', $x, $this->page_y + 2, $larguraDv, 13); $x += $larguraDv; $this->pdf->linha_relativa($x, $this->page_y, 0, $altura_linha, 0.1); if ($faltaPorComponente) { $this->pdf->escreve_relativo_center('Falta', $x, $this->page_y + 2, $larguraDv, 13); $x += $larguraDv; $this->pdf->linha_relativa($x, $this->page_y, 0, $altura_linha, 0.1); } } for ($i = 0; $i < 3; $i++) { $x += 60; $this->pdf->linha_relativa($x, $this->page_y, 0, $altura_linha, 0.1); } $yNotas = $this->page_y; // Imprime as notas dos componentes foreach ($componentes as $id => $componente) { $this->page_y += 15; $this->pdf->quadrado_relativo(30, $this->page_y, 782, $altura_linha, 0.5); $this->pdf->escreve_relativo_center($componente, 30, $this->page_y + 2, 80, 13); $this->pdf->linha_relativa(110, $this->page_y, 0, $altura_linha, 0.1); $x = 110; foreach ($etapas as $etapa) { if (!$this->em_branco) { $this->pdf->escreve_relativo_center($notas[$id][$etapa]->notaArredondada, $x, $this->page_y + 2, $larguraDv, 13); } $x += $larguraDv; $this->pdf->linha_relativa($x, $this->page_y, 0, $altura_linha, 0.1); if ($faltaPorComponente) { if (!$this->em_branco) { $this->pdf->escreve_relativo_center($faltas[$id][$etapa]->quantidade, $x, $this->page_y + 2, $larguraDv, 13); } $x += $larguraDv; $this->pdf->linha_relativa($x, $this->page_y, 0, $altura_linha, 0.1); } } if ($faltaPorComponente) { $porcentagemPresenca = sprintf('%.2f', $situacao->falta->componentesCurriculares[$id]->porcentagemPresenca); } else { $porcentagemPresenca = '-'; } // Média, presenção e situação $data = array(); $data['media'] = $medias[$id][0]->mediaArredondada; if ($situacao->recuperacao) { $notaExame = $notas[$id][$etapa + 1]; $data['rc'] = $notaExame->etapa == 'Rc' ? $notaExame->notaArredondada : '-'; } $data['presenca'] = $porcentagemPresenca; $data['situacao'] = $matriculaSituacao->getValue($situacao->nota->componentesCurriculares[$id]->situacao); foreach ($data as $key => $value) { $largura = $key == 'situacao' ? 120 : 60; if (!$this->em_branco) { $this->pdf->escreve_relativo_center($value, $x, $this->page_y + 2, $largura, 13); } $x += $largura; $this->pdf->linha_relativa($x, $this->page_y, 0, $altura_linha, 0.1); } } // Imprime a porcentagem total de presença e a situação $this->page_y += 15; $this->pdf->quadrado_relativo(30, $this->page_y, 782, $altura_linha, 0.5); $this->pdf->escreve_relativo_center('Faltas', 30, $this->page_y + 2, 80, 13); $this->pdf->linha_relativa(110, $this->page_y, 0, $altura_linha, 0.1); if (!$faltaPorComponente) { $x = 80 + 30; foreach ($etapas as $etapa) { $this->pdf->escreve_relativo_center($faltas[$etapa + 1]->quantidade, $x, $this->page_y + 2, $larguraDv, 13); $x += $larguraDv; $this->pdf->linha_relativa($x, $this->page_y, 0, $altura_linha, 0.1); } $x = $x + 60 * ($situacao->recuperacao ? 2 : 1); } else { $x = $x - (120 + 60); } if (!$this->em_branco) { $this->pdf->escreve_relativo_center(sprintf('%.2f', $situacao->falta->porcentagemPresenca), $x, $this->page_y + 2, 60, 13); $this->pdf->escreve_relativo_center($matriculaSituacao->getValue($situacao->falta->situacao), $x + 60, $this->page_y + 2, 120, 13); } for ($i = 0; $i < 3; $i++) { $this->pdf->linha_relativa($x, $this->page_y, 0, $altura_linha, 0.1); $x += 60; } }
/** * @see clsCadastro#Gerar() */ public function Gerar() { // Dados da matrícula $matricula = $this->_service->getOption('matriculaData'); // Nome do aluno $nome = $matricula['nome']; // Nome da escola $escola = new clsPmieducarEscola($matricula['ref_ref_cod_escola']); $escola = $escola->detalhe(); $escola = ucwords(strtolower($escola['nome'])); // Nome do curso $curso = $matricula['curso_nome']; // Nome da série $serie = $matricula['serie_nome']; // Nome da turma $turma = $matricula['turma_nome']; // Situação da matrícula $situacao = App_Model_MatriculaSituacao::getInstance(); $situacao = $situacao->getValue($matricula['aprovado']); // Dados da matrícula $this->addDetalhe(array('Aluno', $nome)); $this->addDetalhe(array('Escola', $escola)); $this->addDetalhe(array('Curso', $curso)); $this->addDetalhe(array('Série/Turma', $serie . ' / ' . $turma)); $this->addDetalhe(array('Situação', $situacao)); // Booleano para saber se o tipo de nota é nenhum. $nenhumaNota = $this->_service->getRegra()->get('tipoNota') == RegraAvaliacao_Model_Nota_TipoValor::NENHUM; // Booleano para saber o tipo de presença em que ocorre apuração $porComponente = $this->_service->getRegra()->get('tipoPresenca') == RegraAvaliacao_Model_TipoPresenca::POR_COMPONENTE; // Dados da regra de avaliação $this->addDetalhe(array('Regra avaliação', $this->_service->getRegra())); $this->addDetalhe(array('Apuração de falta', $this->_service->getRegra()->tipoPresenca)); $this->addDetalhe(array('Parecer descritivo', $this->_service->getRegra()->parecerDescritivo)); $this->addDetalhe(array('Progressão', $this->_service->getRegra()->tipoProgressao)); if ($nenhumaNota) { $media = 'Não usa nota'; } else { $media = $this->_service->getRegra()->media; } $this->addDetalhe(array('Média', $media)); // Cria um array com a quantidade de etapas de 1 a n $etapas = range(1, $this->_service->getOption('etapas'), 1); // Atributos para a tabela $attributes = array('style' => 'background-color: #A1B3BD; padding: 5px; text-align: center'); // Atributos para a tabela de notas/faltas $zebra = array(0 => array('style' => 'background-color: #E4E9ED'), 1 => array('style' => 'background-color: #FFFFFF')); // Helper para criar links e urls $url = CoreExt_View_Helper_UrlHelper::getInstance(); // Usa helper de tabela para criar a tabela de notas/faltas $table = CoreExt_View_Helper_TableHelper::getInstance(); // Enum para situação de matrícula $situacao = App_Model_MatriculaSituacao::getInstance(); // Situação do boletim do aluno $sit = $this->_situacao; // Títulos da tabela $labels = array(); $labels[] = array('data' => 'Disciplinas', 'attributes' => $attributes); foreach ($etapas as $etapa) { $data = array('data' => sprintf('Etapa %d', $etapa)); if ($nenhumaNota) { $data['colspan'] = 1; } else { $data['colspan'] = $porComponente ? 2 : 1; } $data['attributes'] = $attributes; $labels[] = $data; } // Flag para auxiliar na composição da tabela em casos onde o parecer // descritivo é lançado anualmente e por componente $parecerComponenteAnual = FALSE; $colspan = 0; if ($this->_service->getRegra()->get('parecerDescritivo') == RegraAvaliacao_Model_TipoParecerDescritivo::ANUAL_COMPONENTE) { if (TRUE == $this->_componenteEncerrado($sit->nota->componentesCurriculares)) { $parecerComponenteAnual = TRUE; $colspan++; } } // Colspan para tabela com labels e sublabels $colspan += $porComponente && $sit->recuperacao ? 4 : 3; if ($nenhumaNota) { $colspan--; } if (!$nenhumaNota) { $labels[] = array('data' => $porComponente ? '' : 'Média', 'attributes' => $attributes, 'colspan' => $porComponente ? $colspan : 1); } // Inclui coluna para % de presença geral. if (!$porComponente) { if ($sit->recuperacao) { $labels[] = array('data' => 'Exame', 'attributes' => $attributes); } if ($parecerComponenteAnual) { $labels[] = array('data' => 'Parecer', 'attributes' => $attributes); } $labels[] = array('data' => 'Presença', 'attributes' => $attributes); $labels[] = array('data' => 'Situação', 'attributes' => $attributes); } $table->addHeaderRow($labels); // Cria sub-header caso tenha faltas lançadas por componentes if ($porComponente) { $subLabels = array(); $subLabels[] = array('attributes' => $attributes); for ($i = 0, $loop = count($etapas); $i < $loop; $i++) { if (!$nenhumaNota) { $subLabels[] = array('data' => 'Nota', 'attributes' => $attributes); } $subLabels[] = array('data' => 'Falta', 'attributes' => $attributes); } if (!$nenhumaNota) { $subLabels[] = array('data' => 'Média', 'attributes' => $attributes); } if ($sit->recuperacao) { $subLabels[] = array('data' => 'Exame', 'attributes' => $attributes); } if ($porComponente) { if ($parecerComponenteAnual) { $subLabels[] = array('data' => 'Parecer', 'attributes' => $attributes); } $subLabels[] = array('data' => 'Presença', 'attributes' => $attributes); $subLabels[] = array('data' => 'Situação', 'attributes' => $attributes); } $table->addHeaderRow($subLabels); } // Atributos usados pelos itens de dados $attributes = array('style' => 'padding: 5px; text-align: center'); // Notas $componentes = $this->_service->getComponentes(); $notasComponentes = $this->_service->getNotasComponentes(); $mediasSituacoes = $this->_situacao->nota; $mediasComponentes = $this->_service->getMediasComponentes(); $faltasComponentes = $this->_service->getFaltasComponentes(); // Calcula as porcentagens de presença $faltasStats = $this->_service->getSituacaoFaltas(); // Texto do link if ($nenhumaNota) { $linkText = 'falta'; $linkPath = 'falta'; } else { $linkText = $porComponente ? 'nota/falta' : 'nota'; $linkPath = 'nota'; } // Parâmetros para o link de nota/falta nova $newLink = array('text' => 'Lançar ' . $linkText, 'path' => $linkPath, 'query' => array('matricula' => $matricula['cod_matricula'], 'componenteCurricular' => 0)); $iteration = 0; foreach ($componentes as $id => $componente) { $data = array(); // Nome do componente curricular $data[] = array('data' => $componente, 'attributes' => array('style' => 'padding: 5px; text-align: left')); $notas = $notasComponentes[$id]; $mediaSituacao = $mediasSituacoes->componentesCurriculares[$id]; $medias = $mediasComponentes[$id]; $faltas = $faltasComponentes[$id]; $faltaStats = $faltasStats->componentesCurriculares[$id]; $parecer = NULL; // Caso os pareceres sejam por componente e anuais, recupera a instância if ($parecerComponenteAnual) { $parecer = $this->_service->getPareceresComponentes(); $parecer = $parecer[$id]; } if ($porComponente == TRUE) { $new = $url->l('Lançar nota', 'nota', array('query' => array('matricula' => $matricula['cod_matricula'], 'componenteCurricular' => $id))); } $newLink['query']['componenteCurricular'] = $id; $new = $url->l($newLink['text'], $newLink['path'], array('query' => $newLink['query'])); $update = array('query' => array('matricula' => $matricula['cod_matricula'], 'componenteCurricular' => $id, 'etapa' => 0)); // Lista as notas do componente por etapa for ($i = 0, $loop = count($etapas); $i < $loop; $i++) { $nota = $falta = NULL; if (isset($notas[$i])) { $update['query']['etapa'] = $notas[$i]->etapa; $nota = $url->l($notas[$i]->notaArredondada, 'nota', $update); } if (isset($faltas[$i])) { $update['query']['etapa'] = $faltas[$i]->etapa; $linkPath = $nenhumaNota ? 'falta' : 'nota'; $falta = $url->l($faltas[$i]->quantidade, $linkPath, $update); } /* * Exibição muito dinâmica. Em resumo, os casos são: * * 1. nota & falta componente * 2. nota * 3. falta componente * 4. falta geral */ if ($nenhumaNota) { $colspan = 1; } elseif (!$nenhumaNota && $porComponente && is_null($falta)) { $colspan = 2; } else { $colspan = 1; } // Caso 1. if (!$nenhumaNota) { if ($nota) { // Caso 2: resolvido com colspan. $data[] = array('data' => $nota, 'attributes' => $attributes, 'colspan' => $colspan); if ($porComponente) { $data[] = array('data' => $falta, 'attributes' => $attributes); } } else { $data[] = array('data' => $new, 'attributes' => $attributes, 'colspan' => $colspan); $new = ''; } } elseif ($nenhumaNota && $porComponente) { if ($falta) { $data[] = array('data' => $falta, 'attributes' => $attributes, 'colspan' => $colspan); } else { $data[] = array('data' => $new, 'attributes' => $attributes, 'colspan' => $colspan); $new = ''; } } else { $data[] = array('data' => '', 'attributes' => $attributes); } } // Média no componente curricular if (!$nenhumaNota) { $media = $medias[0]->mediaArredondada . ($medias[0]->etapa == 'Rc' ? ' (Rc)' : ''); $data[] = array('data' => $media, 'attributes' => $attributes); } // Adiciona uma coluna extra caso aluno esteja em exame em alguma componente curricular if ($sit->recuperacao) { if ($mediaSituacao->situacao == App_Model_MatriculaSituacao::EM_EXAME || $mediaSituacao->situacao == App_Model_MatriculaSituacao::APROVADO_APOS_EXAME || $mediaSituacao->situacao == App_Model_MatriculaSituacao::REPROVADO) { $link = $newLink; $link['query']['componenteCurricular'] = $id; $link['query']['etapa'] = 'Rc'; $notaRec = $i; if (isset($notas[$notaRec]) && $notas[$notaRec]->etapa == 'Rc') { $link['text'] = $notas[$notaRec]->notaArredondada; } $recuperacaoLink = $url->l($link['text'], $link['path'], array('query' => $link['query'])); $data[] = array('data' => $recuperacaoLink, 'attributes' => $attributes); } else { $data[] = array('data' => '', 'attributes' => $attributes); } } // Adiciona uma coluna extra caso o parecer seja por componente ao final do ano if ($parecerComponenteAnual) { $link = array('text' => '', 'path' => 'parecer', 'query' => array('matricula' => $this->getRequest()->matricula)); if (0 == count($parecer)) { $text = 'Lançar'; } else { $text = 'Editar'; } $link['query']['componenteCurricular'] = $id; // @todo Constante ou CoreExt_Enum $link['query']['etapa'] = 'An'; $link = $url->l($text, $link['path'], array('query' => $link['query'])); if (isset($mediaSituacao->situacao) && $mediaSituacao->situacao != App_Model_MatriculaSituacao::EM_ANDAMENTO) { $data[] = array('data' => $link, 'attributes' => $attributes); } else { $data[] = array('data' => '', 'attributes' => $attributes); } } // Informações extras como porcentagem de presença e situação do aluno if ($porComponente) { $data[] = array('data' => sprintf('%.2f%%', $faltaStats->porcentagemPresenca), 'attributes' => $attributes); } else { $data[] = array('data' => '', 'attributes' => $attributes); } $data[] = array('data' => $situacao->getValue($mediaSituacao->situacao), 'attributes' => $attributes); $iteration++; $class = $iteration % 2; $table->addBodyRow($data, $zebra[$class]); } $newLink = array('text' => 'Lançar falta', 'path' => 'falta', 'query' => array('matricula' => $matricula['cod_matricula'])); // Situação geral das faltas $data = array(0 => array('data' => 'Faltas', 'attributes' => array('style' => 'padding: 5px; text-align: left'))); $faltas = $this->_service->getFaltasGerais(); $new = $url->l($newLink['text'], $newLink['path'], array('query' => $newLink['query'])); // Listas faltas (para faltas no geral) for ($i = 1, $loop = count($etapas); $i <= $loop; $i++) { if (isset($faltas[$i])) { $link = $newLink; $link['query']['etapa'] = $faltas[$i]->etapa; $link = $porComponente ? '' : $url->l($faltas[$i]->quantidade, $link['path'], array('query' => $link['query'])); $data[] = array('data' => $link, 'attributes' => $attributes); if ($porComponente) { $data[] = array('data' => '', 'attributes' => $attributes); } } else { $new = $porComponente ? '' : $new; $data[] = array('data' => $new, 'attributes' => $attributes); $new = ''; if ($porComponente && !$nenhumaNota) { $data[] = array('data' => '', 'attributes' => $attributes); } } } if (!$nenhumaNota) { $data[] = array(); } if ($sit->recuperacao) { $data[] = array('data' => '', 'attributes' => $attributes); } if ($parecerComponenteAnual) { $data[] = array('data' => '', 'attributes' => $attributes); } // Porcentagem presença $data[] = array('data' => sprintf('%.2f%%', $faltasStats->porcentagemPresenca), 'attributes' => $attributes); $data[] = array('data' => $situacao->getValue($sit->falta->situacao), 'attributes' => $attributes); $table->addFooterRow($data, $zebra[$class ^ 1]); // Adiciona linha com links para lançamento de parecer descritivo geral por etapa if ($this->_service->getRegra()->get('parecerDescritivo') == RegraAvaliacao_Model_TipoParecerDescritivo::ETAPA_GERAL) { $newLink = array('text' => 'Lançar parecer', 'path' => 'parecer', 'query' => array('matricula' => $matricula['cod_matricula'])); $data = array(0 => array('data' => 'Pareceres', 'attributes' => array('style' => 'padding: 5px; text-align: left'))); $pareceres = $this->_service->getPareceresGerais(); for ($i = 1, $loop = count($etapas); $i <= $loop; $i++) { if (isset($pareceres[$i])) { $link = $newLink; $link['text'] = 'Editar parecer'; $link['query']['etapa'] = $i; $data[] = array('data' => $url->l($link['text'], $link['path'], array('query' => $link['query'])), 'attributes' => $attributes); } else { if ('' == $newLink) { $link = ''; } else { $link = $url->l($newLink['text'], $newLink['path'], array('query' => $newLink['query'])); } $data[] = array('data' => $link, 'attributes' => $attributes); $newLink = ''; } } if ($sit->recuperacao) { $data[] = array('data' => '', 'attributes' => $attributes); } $data[] = array('data' => '', 'attributes' => $attributes); $data[] = array('data' => '', 'attributes' => $attributes); $table->addFooterRow($data); } // Adiciona tabela na página $this->addDetalhe(array('Disciplinas', '<div id="disciplinas">' . $table . '</div>')); // Adiciona link para lançamento de parecer descritivo anual geral if (FALSE == $sit->andamento && $this->_service->getRegra()->get('parecerDescritivo') == RegraAvaliacao_Model_TipoParecerDescritivo::ANUAL_GERAL) { if (0 == count($this->_service->getPareceresGerais())) { $label = 'Lançar'; } else { $label = 'Editar'; } $link = array('text' => $label . ' parecer descritivo do aluno', 'path' => 'parecer', 'query' => array('matricula' => $this->getRequest()->matricula)); $this->addDetalhe(array('Parecer descritivo anual', $url->l($link['text'], $link['path'], array('query' => $link['query'])))); } // Caso o tipo de progressão seja manual, a situação das notas/faltas não // esteja mais em "andamento" e a matrícula esteja em andamento, exibe // botões de ação if ($this->_service->getRegra()->get('tipoProgressao') == RegraAvaliacao_Model_TipoProgressao::NAO_CONTINUADA_MANUAL && FALSE == $sit->andamento && $matricula['aprovado'] == App_Model_MatriculaSituacao::EM_ANDAMENTO) { $link = array('text' => 'sim', 'path' => 'boletim', 'query' => array('matricula' => $this->getRequest()->matricula, 'promove' => 1)); $sim = '<span class="confirm yes">' . $url->l($link['text'], $link['path'], array('query' => $link['query'])) . '</span>'; $link['text'] = 'não (retém o aluno)'; $link['query']['promove'] = 0; $nao = '<span class="confirm no">' . $url->l($link['text'], $link['path'], array('query' => $link['query'])) . '</span>'; $links = '<div style="padding: 5px 0 5px 0">' . $sim . $nao . '</div>'; $this->addDetalhe(array('Promover aluno?', $links)); } }