Skip to content

Commit

Permalink
corrigidos TCDAs 744, 745 e 746
Browse files Browse the repository at this point in the history
  • Loading branch information
paulones committed Nov 10, 2024
1 parent 4b65267 commit 5a2a05d
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [Versão 3.90.201]
- Retirado obrigatoriedade de preenchimento de senha ao editar cadastro de algum usuário
- Corrigido informações do relatório de Matrículas do ano e Número de Alunos por turma
- Inserido 9º Ano na modalidade de Ensino Fundamental Maior por padrão

## [Versão 3.89.201]
- Adicionando o informativo de total de aulas da carga horária e total de aulas ministradas nas telas de aulas ministradas
- Enriquecido Termo de Suspensão com Dados carregados do banco
Expand Down
11 changes: 7 additions & 4 deletions app/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -769,18 +769,21 @@ public function actionUpdate($id)
$model = Users::model()->findByPk($id);
$actualRole = $model->getRole();
$userSchools = UsersSchool::model()->findAllByAttributes(array('user_fk' => $id));

// Atribuindo valores da superglobal _POST à variáveis locais a fim de evitar o uso de globais
$users = Yii::app()->request->getPost('Users');
$schools = Yii::app()->request->getPost('schools');
$instructor = Yii::app()->request->getPost('instructor');
$role = Yii::app()->request->getPost('Role');

if (isset($users)) {
$model->attributes = $users;
$model->name = $users["name"];
$model->username = $users["username"];
$model->active = $users["active"];
if ($model->validate()) {
$passwordHasher = new PasswordHasher;
$model->password = $passwordHasher->bcriptHash($users['password']);
if ($users["password"] !== "") {
$passwordHasher = new PasswordHasher;
$model->password = $passwordHasher->bcriptHash($users['password']);
}
if ($model->save()) {
$save = true;
foreach ($userSchools as $userSchool) {
Expand Down
7 changes: 5 additions & 2 deletions app/controllers/ReportsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,14 +463,17 @@ private function translateStageNumbers ($stageNumber) {
case "2":
return "Ensino Fundamental Menor";
case "3":
case "7":
return "Ensino Fundamental Maior";
case "4":
return "Ensino Médio";
case "5":
return "Curso Técnico";
case "6":
return "EJA";
case "7":
return "Multisseriada";
default:
return "Resto";
return "Outro";
}
}

Expand Down
19 changes: 19 additions & 0 deletions app/migrations/2024-11-10_classroom_qtd_students_9º_ano/sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CREATE OR REPLACE VIEW `classroom_qtd_students` AS
select
`c`.`school_inep_fk` AS `school_inep_fk`,
`c`.`inep_id` AS `inep_id`,
`c`.`id` AS `id`,
`c`.`name` AS `name`,
concat_ws(' - ',concat_ws(':',`c`.`initial_hour`,`c`.`initial_minute`),
concat_ws(':',`c`.`final_hour`,`c`.`final_minute`)) AS `time`,

`c`.`schooling` AS `schooling`,
`c`.`complementary_activity` AS `complementary_activity`,
`c`.`aee` AS `aee`,

case `c`.`modality` when 1 then 'Ensino Regular' when 2 then 'Educação Especial' when 3 then 'Educação de Jovens e Adultos (EJA)' when 4 then 'Educação Profissional' when 5 then 'Atendimento Educacional Especializado (AEE)' else 'Não se Aplica' end AS `modality`,

`esm`.`name` AS `stage`,count(`c`.`id`) AS `students`,`c`.`school_year` AS `school_year`,`se`.`status` AS `status` from ((`classroom` `c` join `student_enrollment` `se` on(`c`.`id` = `se`.`classroom_fk`)) left join `edcenso_stage_vs_modality` `esm` on(`c`.`edcenso_stage_vs_modality_fk` = `esm`.`id`)) where `se`.`status` in (1,6,7,8,9,10) or `se`.`status` is null group by `c`.`id`;


update edcenso_stage_vs_modality set stage = 3 where upper(name) like '%9º ANO' or upper(alias) = '9º ANO';
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$debug = getenv("YII_DEBUG");
defined('YII_DEBUG') or define('YII_DEBUG', $debug);

define("TAG_VERSION", '3.89.201');
define("TAG_VERSION", '3.90.201');

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
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
. "<td>" . $r["id"] . "</td>"
. "<td>" . $r["name"] . "</td>"
. "<td>" . $r["time"] . "</td>"
. "<td>" . $r["assistance_type"] . "</td>"
. "<td>"
. ($r["schooling"] !== null && $r["schooling"] != 0 ? "Escolarização<br>" : "")
. ($r["complementary_activity"] !== null && $r["complementary_activity"] != 0 ? "Atividade Complementar<br>" : "")
. ($r["aee"] !== null && $r["aee"] != 0 ? "Atendimento Educacional Especializado (AEE)<br>" : "")
. "</td>"
. "<td>" . $r["modality"] . "</td>"
. "<td>" . $r["stage"] . "</td>"
. "<td>" . $r["students"] . "</td>"
Expand Down

0 comments on commit 5a2a05d

Please sign in to comment.