Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: regent teacher #321

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion js/classroom/form/functions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
////////////////////////////////////////////////
// Functions //
////////////////////////////////////////////////
var RegentTeacherCount = 0
var count = $('.regent-teacher').length;
var RegentTeacherCount = count;
var removeTeachingData = function () {
var instructor = $(this).parent().parent().parent().attr("instructor");
var discipline = ($(this).parent().attr("discipline"));
Expand Down
11 changes: 9 additions & 2 deletions themes/default/views/classroom/_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,14 @@ class="btn-action single glyphicons circle_question_mark"
$contractTypeName = [null, "Concursado/Efetivo", "Temporário", "Terceirizado", "CLT"];
$i = 0;
foreach ($modelTeachingData as $key => $model) {
$teachingDataList .= "<li instructor='" . $model->instructor_fk . "'><span>" . $model->instructorFk->name . "</span><span> - " . $roleName[$model->role] . "</span>"
. '<a href="#" class="deleteTeachingData delete" title="Excluir">
$regentText = "";
$classRegent = "";
if($model->regent == 1) {
$regentText = "&nbsp(Regente)";
$classRegent = "regent-teacher";
}
$teachingDataList .= "<li class='".$classRegent."' instructor='" . $model->instructor_fk . "'><span>" . $model->instructorFk->name . "</span><span>".$regentText."</span><span> - " . $roleName[$model->role] . "</span>"
.'<a href="#" class="deleteTeachingData delete" title="Excluir" regent="'.$model->regent.'">
</a>';
$teachingDataList .= "<ul>";

Expand All @@ -412,6 +418,7 @@ class="btn-action single glyphicons circle_question_mark"
$teachingDataArray[$i]['Classroom'] = $model->classroom_id_fk;
$teachingDataArray[$i]['Role'] = $model->role;
$teachingDataArray[$i]['ContractType'] = $model->contract_type;
$teachingDataArray[$i]['RegentTeacher'] = $model->regent;
$teachingDataArray[$i]['Disciplines'] = array();

foreach ($model->teachingMatrixes as $teachingMatrix) {
Expand Down