Skip to content

Commit

Permalink
feat: feature flag to sagres enrollment status
Browse files Browse the repository at this point in the history
  • Loading branch information
igorgoncalves committed Dec 26, 2024
1 parent 73b6013 commit 6db1b22
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [Versão 3.94.213]
- Controle de status a serem considerados na exportação do sagres. Por padrão apenas matriculas com status "matriculado" são envadas. No entanto, usando o diario eletronico, o status de algumas matriculas mudaram para "Aprovado", "Reprovado" e outros. Foi adicionado um controle para optar ou não por considerar esses status na exportação.
- Novo campo na turma para definir o periodo da turma: Anual, 1 Semestre ou 2 Semestre;
- Novo campo na turma para deliberadamente desconsiderar ela na exportação do sagres;


## [Versão 3.93.212]
- Ordem das etapas ajustada no relatório de Matrículas Anuais

Expand Down
4 changes: 2 additions & 2 deletions app/models/InstanceConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public function rules()
// will receive user inputs.
return array(
array('parameter_key, parameter_name', 'required'),
array('parameter_key', 'length', 'max' => 20),
array('parameter_name', 'length', 'max' => 75),
array('parameter_key', 'length', 'max' => 40),
array('parameter_name', 'length', 'max' => 150),
array('value', 'length', 'max' => 250),
// The following rule is used by search().
array('id, parameter_key, parameter_name, value', 'safe', 'on' => 'search'),
Expand Down
17 changes: 11 additions & 6 deletions app/modules/sagres/models/SagresConsultModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1612,12 +1612,17 @@ public function getAttendances($professionalId, $referenceYear, $month)
}
private function getAcceptedEnrollmentStatus(): array
{
return [
\StudentEnrollment::getStatusId(\StudentEnrollment::STATUS_ACTIVE),
\StudentEnrollment::getStatusId(\StudentEnrollment::STATUS_APPROVED),
\StudentEnrollment::getStatusId(\StudentEnrollment::STATUS_APPROVEDBYCOUNCIL),
\StudentEnrollment::getStatusId(\StudentEnrollment::STATUS_DISAPPROVED),
];

if(Yii::app()->features->isEnable("FEAT_SAGRES_STATUS_ENROL")){
return [
\StudentEnrollment::getStatusId(\StudentEnrollment::STATUS_ACTIVE),
\StudentEnrollment::getStatusId(\StudentEnrollment::STATUS_APPROVED),
\StudentEnrollment::getStatusId(\StudentEnrollment::STATUS_APPROVEDBYCOUNCIL),
\StudentEnrollment::getStatusId(\StudentEnrollment::STATUS_DISAPPROVED),
];
}

return [\StudentEnrollment::getStatusId(status: \StudentEnrollment::STATUS_ACTIVE)];
}
/**
* Sets a new MatriculaTType
Expand Down
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
defined('YII_DEBUG') or define('YII_DEBUG', $debug);
defined("SESSION_MAX_LIFETIME") or define('SESSION_MAX_LIFETIME', 3600);

define("TAG_VERSION", '3.93.212');
define("TAG_VERSION", '3.94.213');

define("YII_VERSION", Yii::getVersion());
define("BOARD_MSG", '<div class="alert alert-success">Novas atualizações no TAG. Confira clicando <a class="changelog-link" href="?r=admin/changelog">aqui</a>.</div>');
Expand Down

0 comments on commit 6db1b22

Please sign in to comment.