Commit 761c39db540107688f0e35b355ed0e353b859347

Authored by Matheus Nicoski
1 parent e6625976
Exists in master

Altera método para pegar total de modulo

ieducar/intranet/educar_dispensa_disciplina_cad.php
1 1 <?php
2 2  
3 3 use App\Models\LegacyRegistration;
  4 +use App\Models\LegacySchoolStage;
4 5 use App\Services\PromotionService;
5 6  
6 7 require_once 'include/clsBase.inc.php';
... ... @@ -323,7 +324,12 @@ class indice extends clsCadastro
323 324  
324 325 public function maiorEtapaUtilizada($registration)
325 326 {
326   - $totalEtapas = App_Model_IedFinder::getModulo($registration->ref_ref_cod_escola, $registration->ref_cod_curso, $registration->enrollments()->first()->ref_cod_turma, $registration->ano);
  327 + $where = [
  328 + 'ref_ref_cod_escola' => $registration->ref_ref_cod_escola,
  329 + 'ref_ano' => $registration->ano,
  330 + ];
  331 +
  332 + $totalEtapas = LegacySchoolStage::query()->where($where)->count();
327 333 $arrayEtapas = [];
328 334  
329 335 for ($i = 1; $i <= $totalEtapas['total']; $i++)
... ...