Skip to content

Commit

Permalink
Mais fixes, DAC dando trabalho...
Browse files Browse the repository at this point in the history
  • Loading branch information
guaycuru committed May 12, 2017
1 parent 51b14d6 commit d88d0b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ajax/cadastro.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@
if($Usuario->getModalidade(false) !== null)
$Aluno->setModalidade($Usuario->getModalidade(true)->getSigla(false));
if(!empty($_POST['curso_pos'])) {
$Curso_Pos = Curso::Por_Numero($_POST['curso_pos'], Curso::NIVEIS_POS);
$Aluno->setNivel_Pos((!empty($_POST['nivel_pos'])) ? $_POST['nivel_pos'][0] : null);
$Curso_Pos = Curso::Por_Numero($_POST['curso_pos'], $Aluno->getNivel_Pos(false));
if($Curso_Pos === null)
Base::Error_JSON('Curso de pós-graduação não encontrado!');
$Aluno->setCurso_Pos($Curso_Pos);
$Aluno->setNivel_Pos((!empty($_POST['nivel_pos'])) ? $_POST['nivel_pos'][0] : null);
$Aluno->setModalidade_Pos(($_POST['modalidade_pos'] == "") ? null : strtoupper(substr($_POST['modalidade_pos'], 0, 2)));
}
$Aluno->Save(false);
Expand Down
1 change: 1 addition & 0 deletions classes/GDE/Curso.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class Curso extends Base {
const NIVEL_DOUTORADO = 'D';
const NIVEL_PROFISSIONAL = 'S';
const NIVEIS_GRAD = array(self::NIVEL_GRAD, self::NIVEL_TEC);
// Evitar de usar, pois os numeros se repetem entre mestrado e doutorado!
const NIVEIS_POS = array(self::NIVEL_MESTRADO, self::NIVEL_DOUTORADO, self::NIVEL_PROFISSIONAL);

/**
Expand Down

0 comments on commit d88d0b8

Please sign in to comment.