Commit 5c4c97dd4aaf0d2b6e4e249be477275178dc1520

Authored by bonot
1 parent b3b5475c
Exists in master

Considera apenas último sequencial na turma

ieducar/intranet/include/pmieducar/clsPmieducarMatriculaTurma.inc.php
... ... @@ -359,7 +359,8 @@ class clsPmieducarMatriculaTurma extends Model
359 359 $int_ano_turma = false,
360 360 $dependencia = null,
361 361 $apenasTurmasMultiSeriadas = false,
362   - $apenasTurmasUnificadas = false
  362 + $apenasTurmasUnificadas = false,
  363 + $ultimoSequencialNaTurma = false
363 364 ) {
364 365 $nome = '';
365 366 $tab_aluno = '';
... ... @@ -623,6 +624,16 @@ class clsPmieducarMatriculaTurma extends Model
623 624 $whereAnd = ' AND ';
624 625 }
625 626  
  627 + if ($ultimoSequencialNaTurma) {
  628 + $filtros .= "{$whereAnd} mt.sequencial = (
  629 + SELECT max(sequencial)
  630 + FROM pmieducar.matricula_turma
  631 + WHERE matricula_turma.ref_cod_turma = mt.ref_cod_turma
  632 + AND matricula_turma.ref_cod_matricula = m.cod_matricula
  633 + )";
  634 + $whereAnd = ' AND ';
  635 + }
  636 +
626 637 $db = new clsBanco();
627 638 $countCampos = count(explode(',', $this->_campos_lista));
628 639 $resultado = [];
... ...
ieducar/modules/Avaliacao/Views/DiarioApiController.php
... ... @@ -832,6 +832,12 @@ class DiarioApiController extends ApiCoreController
832 832 null,
833 833 null,
834 834 null,
  835 + true,
  836 + null,
  837 + null,
  838 + null,
  839 + null,
  840 + null,
835 841 true
836 842 );
837 843  
... ...