Commit 62a4ec479c3c594b0328d785b5aa4b60e18638a5
1 parent
119eff54
Exists in
2.8
and in
6 other branches
Limita seleção de turmas para usuários que são apenas professores
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
ieducar/lib/Portabilis/View/Helper/DynamicInput/Turma.php
... | ... | @@ -19,9 +19,9 @@ class Portabilis_View_Helper_DynamicInput_Turma extends Portabilis_View_Helper_D |
19 | 19 | $naoFiltrarAno = $this->viewInstance->nao_filtrar_ano ?? null; |
20 | 20 | |
21 | 21 | $userId = $this->getCurrentUserId(); |
22 | - $isProfessor = Portabilis_Business_Professor::isProfessor($instituicaoId, $userId); | |
22 | + $isOnlyProfessor = Portabilis_Business_Professor::isOnlyProfessor($instituicaoId, $userId); | |
23 | 23 | |
24 | - if ($escolaId and $serieId and empty($resources) and $isProfessor) { | |
24 | + if ($escolaId and $serieId and empty($resources) and $isOnlyProfessor) { | |
25 | 25 | $resources = Portabilis_Business_Professor::turmasAlocado($instituicaoId, $escolaId, $serieId, $userId); |
26 | 26 | } elseif ($escolaId && $serieId && empty($resources)) { |
27 | 27 | $resources = App_Model_IedFinder::getTurmas($escolaId, $serieId); | ... | ... |
ieducar/modules/DynamicInput/Views/TurmaController.php
... | ... | @@ -33,9 +33,9 @@ class TurmaController extends ApiCoreController |
33 | 33 | $ano = $this->getRequest()->ano; |
34 | 34 | $anoEmAndamento = $this->getRequest()->ano_em_andamento; |
35 | 35 | |
36 | - $isProfessor = Portabilis_Business_Professor::isProfessor($instituicaoId, $userId); | |
36 | + $isOnlyProfessor = Portabilis_Business_Professor::isOnlyProfessor($instituicaoId, $userId); | |
37 | 37 | |
38 | - if ($isProfessor) { | |
38 | + if ($isOnlyProfessor) { | |
39 | 39 | $turmas = Portabilis_Business_Professor::turmasAlocado($instituicaoId, $escolaId, $serieId, $userId); |
40 | 40 | } else { |
41 | 41 | if (is_numeric($ano)) { | ... | ... |