Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
pad-upe
Commits
ca6df521
Commit
ca6df521
authored
May 28, 2023
by
Yuri Resende
Browse files
Adicionando uma coluna de carga horária corrigida na listagem dos professores
parent
ef8c47f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/PadController.php
View file @
ca6df521
...
@@ -339,6 +339,7 @@ class PadController extends Controller
...
@@ -339,6 +339,7 @@ class PadController extends Controller
}
}
$professor
->
ch
=
$this
->
get_carga_horaria_total
(
$avaliacoes
);
$professor
->
ch
=
$this
->
get_carga_horaria_total
(
$avaliacoes
);
$professor
->
ch_corrigida
=
$this
->
get_carga_horaria_corrigida
(
$avaliacoes_ensino
,
$avaliacoes_pesquisa
,
$avaliacoes_extensao
,
$avaliacoes_gestao
);
}
}
return
view
(
"pad.avaliacao.professores"
,
compact
(
'professores'
,
'pad'
,
'index_menu'
));
return
view
(
"pad.avaliacao.professores"
,
compact
(
'professores'
,
'pad'
,
'index_menu'
));
...
@@ -624,6 +625,45 @@ class PadController extends Controller
...
@@ -624,6 +625,45 @@ class PadController extends Controller
}
}
private
function
get_carga_horaria_corrigida
(
$ensino
,
$pesquisa
,
$extensao
,
$gestao
)
{
$ch
=
0
;
if
(
$ensino
)
{
for
(
$i
=
0
;
$i
<
count
(
$ensino
->
all
());
$i
++
){
if
(
$ensino
[
$i
]
->
status
!=
Status
::
REPROVADO
){
$ch
+=
$ensino
[
$i
]
->
tarefa
()
->
first
()
->
ch_semanal
;
}
}
}
if
(
$pesquisa
)
{
for
(
$i
=
0
;
$i
<
count
(
$pesquisa
->
all
());
$i
++
){
if
(
$pesquisa
[
$i
]
->
status
!=
Status
::
REPROVADO
){
$ch
+=
$pesquisa
[
$i
]
->
tarefa
()
->
first
()
->
ch_semanal
;
}
}
}
if
(
$extensao
)
{
for
(
$i
=
0
;
$i
<
count
(
$extensao
->
all
());
$i
++
){
if
(
$extensao
[
$i
]
->
status
!=
Status
::
REPROVADO
){
$ch
+=
$extensao
[
$i
]
->
tarefa
()
->
first
()
->
ch_semanal
;
}
}
}
if
(
$gestao
)
{
for
(
$i
=
0
;
$i
<
count
(
$gestao
->
all
());
$i
++
){
if
(
$gestao
[
$i
]
->
status
!=
Status
::
REPROVADO
){
$ch
+=
$gestao
[
$i
]
->
tarefa
()
->
first
()
->
ch_semanal
;
}
}
}
return
$ch
;
}
public
function
relatorio
(
$id
){
public
function
relatorio
(
$id
){
$user
=
Auth
::
user
();
$user
=
Auth
::
user
();
$pad
=
Pad
::
find
(
$id
);
$pad
=
Pad
::
find
(
$id
);
...
...
resources/views/pad/avaliacao/professores.blade.php
View file @
ca6df521
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
<
th
scope
=
"col"
>
Professor
</
th
>
<
th
scope
=
"col"
>
Professor
</
th
>
<
th
scope
=
"col"
>
Status
</
th
>
<
th
scope
=
"col"
>
Status
</
th
>
<
th
scope
=
"col"
>
CH
</
th
>
<
th
scope
=
"col"
>
CH
</
th
>
<
th
scope
=
"col"
>
CH
Corrigida
</
th
>
<
th
scope
=
"col"
>
Opções
</
th
>
<
th
scope
=
"col"
>
Opções
</
th
>
</
tr
>
</
tr
>
</
thead
>
</
thead
>
...
@@ -39,6 +40,7 @@
...
@@ -39,6 +40,7 @@
<
td
style
=
"color:green;"
>
{{
$professor
->
status
}}
</
td
>
<
td
style
=
"color:green;"
>
{{
$professor
->
status
}}
</
td
>
@
endif
@
endif
<
td
>@
if
(
$professor
->
ch
>
0
)
{{
$professor
->
ch
}}
H
@
endif
</
td
>
<
td
>@
if
(
$professor
->
ch
>
0
)
{{
$professor
->
ch
}}
H
@
endif
</
td
>
<
td
>@
if
(
$professor
->
ch_corrigida
>
0
&&
$professor
->
ch
!=
$professor
->
ch_corrigida
)
{{
$professor
->
ch_corrigida
}}
H
@
endif
</
td
>
<
td
>
<
td
>
@
include
(
'components.buttons.btn-avaliar'
,
[
@
include
(
'components.buttons.btn-avaliar'
,
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment