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
4fe99ac7
Commit
4fe99ac7
authored
May 16, 2023
by
PedroLopesUPE
Browse files
Merge branch 'main' into dev-joao-pdf_generator
parents
18f985d5
5e2a0494
Changes
9
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/PadController.php
View file @
4fe99ac7
...
...
@@ -609,10 +609,65 @@ class PadController extends Controller
return
$ch
;
}
public
function
relatorio
(
$id
){
$
menu
=
MenuItemsAvaliador
::
REPORT
;
$
user
=
Auth
::
user
()
;
$pad
=
Pad
::
find
(
$id
);
return
view
(
'pad.relatorio.relatorio'
,
[
'pad'
=>
$pad
,
'index_menu'
=>
$menu
]);
$index_menu
=
MenuItemsAvaliador
::
REPORT
;
$professores
=
User
::
join
(
'user_pad'
,
'user_pad.user_id'
,
'='
,
'users.id'
)
->
join
(
'pad'
,
'user_pad.pad_id'
,
'='
,
'pad.id'
)
->
where
(
function
(
$query
)
use
(
$user
,
$id
)
{
$query
->
where
(
'pad.status'
,
'='
,
Status
::
ATIVO
);
$query
->
where
(
'users.campus_id'
,
'='
,
$user
->
campus_id
);
$query
->
where
(
'users.id'
,
'!='
,
$user
->
id
);
$query
->
where
(
'pad.id'
,
'='
,
$id
);
})
->
select
(
'users.id'
,
'users.name'
,
'users.curso_id'
,
'users.campus_id'
)
->
orderBy
(
'name'
)
->
get
();
//Informando se o PAD foi enviado ou não
$avaliador_pad
=
AvaliadorPad
::
where
(
function
(
$query
)
use
(
$pad
,
$user
)
{
$query
->
where
(
'user_id'
,
'='
,
$user
->
id
);
$query
->
where
(
'pad_id'
,
'='
,
$pad
->
id
);
})
->
first
();
foreach
(
$professores
as
$professor
){
$professor
->
status
=
"Pendente"
;
$userPad
=
$professor
->
userPads
()
->
where
(
'pad_id'
,
'='
,
$pad
->
id
)
->
first
();
$avaliacoes
=
$this
->
get_avaliacoes
(
$userPad
,
$avaliador_pad
);
$professor
->
ch_ensino
=
$this
->
get_carga_horaria
(
$avaliacoes
[
'ensino'
]
->
get
());
$professor
->
ch_pesquisa
=
$this
->
get_carga_horaria
(
$avaliacoes
[
'pesquisa'
]
->
get
());
$professor
->
ch_extensao
=
$this
->
get_carga_horaria
(
$avaliacoes
[
'extensao'
]
->
get
());
$professor
->
ch_gestao
=
$this
->
get_carga_horaria
(
$avaliacoes
[
'gestao'
]
->
get
());
if
(
$professor
->
ch_ensino
>
0
||
$professor
->
ch_pesquisa
>
0
||
$professor
->
ch_extensao
>
0
||
$professor
->
ch_gestao
>
0
){
$professor
->
status
=
"Enviado"
;
}
}
return
view
(
'pad.relatorio.relatorio'
,
[
'pad'
=>
$pad
,
'index_menu'
=>
$index_menu
,
'professores'
=>
$professores
]);
}
private
function
get_carga_horaria
(
$avaliacoes
){
$ch
=
0
;
foreach
(
$avaliacoes
as
$avaliacao
){
$ch
+=
$avaliacao
->
tarefa
->
ch_semanal
;
}
return
$ch
;
}
}
public/images/estado_pe_logo.png
0 → 100644
View file @
4fe99ac7
390 KB
resources/views/layouts/header.blade.php
View file @
4fe99ac7
<header
class=
"navbar p-0"
>
<div
class=
"header-left-side"
>
<a
class=
"navbar-brand p-3"
href=
"#"
>
<img
src=
"http://www.avaliacaodocente.upe.br/assets/img/logo-upe.png"
class=
"img-fluid mr-3"
width=
"128"
{{--
<img
src=
"http://www.avaliacaodocente.upe.br/assets/img/logo-upe.png"
class=
"img-fluid mr-3"
width=
"128"
height=
"93"
alt=
""
/>
<img
src=
"https://www.gestaododesempenho.pe.gov.br/AvaliacaoDesempenho/public/resources/images/logos-direita.png"
class=
"img-fluid"
width=
"268"
height=
"100"
alt=
""
/>
class=
"img-fluid"
width=
"268"
height=
"100"
alt=
""
/>
--}}
<img
src=
"{{url('images/estado_pe_logo.png')}}"
alt=
"Logo do Estado"
class=
"img-fluid"
width=
"300"
height=
"100"
alt=
""
/>
</a>
</div>
<div
class=
"header-divider"
></div>
...
...
resources/views/pad/avaliacao/tarefas_ensino.blade.php
View file @
4fe99ac7
...
...
@@ -92,7 +92,7 @@
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
style
=
"height: 38px;"
onclick
=
"
setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
onclick
=
"setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
Reprovar
</
button
>
...
...
@@ -188,3 +188,15 @@
</
div
>
@
endsection
<
script
>
function
setaDadosModalAvaliacao
(
tarefa_id
,
professor_id
,
status
,
atividade_type
,
avaliacao_id
){
console
.
log
(
document
.
getElementById
(
'avaliacao_id_reprovar'
));
document
.
getElementById
(
'tarefa_id'
)
.
value
=
tarefa_id
;
document
.
getElementById
(
'professor_id'
)
.
value
=
professor_id
;
document
.
getElementById
(
'status'
)
.
value
=
status
;
document
.
getElementById
(
'atividade_type'
)
.
value
=
atividade_type
;
document
.
getElementById
(
'avaliacao_id_reprovar'
)
.
value
=
avaliacao_id
;
console
.
log
(
document
.
getElementById
(
'avaliacao_id_reprovar'
));
}
</
script
>
\ No newline at end of file
resources/views/pad/avaliacao/tarefas_extensao.blade.php
View file @
4fe99ac7
...
...
@@ -94,7 +94,7 @@
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
style
=
"height: 38px;"
onclick
=
"
setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
onclick
=
"setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
Reprovar
</
button
>
...
...
@@ -190,3 +190,15 @@
</
div
>
@
endsection
<
script
>
function
setaDadosModalAvaliacao
(
tarefa_id
,
professor_id
,
status
,
atividade_type
,
avaliacao_id
){
console
.
log
(
document
.
getElementById
(
'avaliacao_id_reprovar'
));
document
.
getElementById
(
'tarefa_id'
)
.
value
=
tarefa_id
;
document
.
getElementById
(
'professor_id'
)
.
value
=
professor_id
;
document
.
getElementById
(
'status'
)
.
value
=
status
;
document
.
getElementById
(
'atividade_type'
)
.
value
=
atividade_type
;
document
.
getElementById
(
'avaliacao_id_reprovar'
)
.
value
=
avaliacao_id
;
console
.
log
(
document
.
getElementById
(
'avaliacao_id_reprovar'
));
}
</
script
>
\ No newline at end of file
resources/views/pad/avaliacao/tarefas_gestao.blade.php
View file @
4fe99ac7
...
...
@@ -94,7 +94,7 @@
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
style
=
"height: 38px;"
onclick
=
"
setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
onclick
=
"setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
Reprovar
</
button
>
...
...
@@ -190,3 +190,15 @@
</
div
>
@
endsection
<
script
>
function
setaDadosModalAvaliacao
(
tarefa_id
,
professor_id
,
status
,
atividade_type
,
avaliacao_id
){
console
.
log
(
document
.
getElementById
(
'avaliacao_id_reprovar'
));
document
.
getElementById
(
'tarefa_id'
)
.
value
=
tarefa_id
;
document
.
getElementById
(
'professor_id'
)
.
value
=
professor_id
;
document
.
getElementById
(
'status'
)
.
value
=
status
;
document
.
getElementById
(
'atividade_type'
)
.
value
=
atividade_type
;
document
.
getElementById
(
'avaliacao_id_reprovar'
)
.
value
=
avaliacao_id
;
console
.
log
(
document
.
getElementById
(
'avaliacao_id_reprovar'
));
}
</
script
>
\ No newline at end of file
resources/views/pad/avaliacao/tarefas_pesquisa.blade.php
View file @
4fe99ac7
...
...
@@ -94,7 +94,7 @@
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
style
=
"height: 38px;"
onclick
=
"
setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
onclick
=
"setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
Reprovar
</
button
>
...
...
@@ -190,3 +190,15 @@
</
div
>
@
endsection
<
script
>
function
setaDadosModalAvaliacao
(
tarefa_id
,
professor_id
,
status
,
atividade_type
,
avaliacao_id
){
console
.
log
(
document
.
getElementById
(
'avaliacao_id_reprovar'
));
document
.
getElementById
(
'tarefa_id'
)
.
value
=
tarefa_id
;
document
.
getElementById
(
'professor_id'
)
.
value
=
professor_id
;
document
.
getElementById
(
'status'
)
.
value
=
status
;
document
.
getElementById
(
'atividade_type'
)
.
value
=
atividade_type
;
document
.
getElementById
(
'avaliacao_id_reprovar'
)
.
value
=
avaliacao_id
;
console
.
log
(
document
.
getElementById
(
'avaliacao_id_reprovar'
));
}
</
script
>
\ No newline at end of file
resources/views/pad/avaliacao/tarefas_professor.blade.php
View file @
4fe99ac7
...
...
@@ -70,7 +70,7 @@
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
style
=
"height: 38px;"
onclick
=
"
setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
onclick
=
"setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
Reprovar
</
button
>
...
...
@@ -151,7 +151,7 @@
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
style
=
"height: 38px;"
onclick
=
"
setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
onclick
=
"setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
Reprovar
</
button
>
...
...
@@ -234,7 +234,7 @@
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
style
=
"height: 38px;"
onclick
=
"
setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
onclick
=
"setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
Reprovar
</
button
>
...
...
@@ -317,7 +317,7 @@
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
style
=
"height: 38px;"
onclick
=
"
setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
onclick
=
"setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
', '
{
{$avaliacao->id}
}
') "
>
Reprovar
</
button
>
...
...
@@ -427,6 +427,5 @@
document
.
getElementById
(
'atividade_type'
)
.
value
=
atividade_type
;
document
.
getElementById
(
'avaliacao_id_reprovar'
)
.
value
=
avaliacao_id
;
console
.
log
(
document
.
getElementById
(
'avaliacao_id_reprovar'
));
}
</
script
>
resources/views/pad/relatorio/relatorio.blade.php
View file @
4fe99ac7
...
...
@@ -11,44 +11,97 @@
@
endsection
@
section
(
'title'
,
'Relatórios'
)
@
section
(
'body'
)
<
div
class
=
"tab-content"
>
<
div
class
=
"tab-pane active"
id
=
"home"
role
=
"tabpanel"
aria
-
labelledby
=
"home-tab"
>
<
div
class
=
"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"
>
<
h1
class
=
"h2"
>
Relatórios
</
h1
>
</
div
>
<
div
class
=
"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3"
>
<
h3
>
<
i
class
=
"bi bi-exclamation-octagon-fill"
></
i
>
Relatório
pad
{{
$pad
->
nome
}}
</
h3
>
</
div
>
<
table
class
=
"table"
>
<
div
class
=
"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3"
>
<
h3
>
<
i
class
=
"bi bi-exclamation-octagon-fill"
></
i
>
Relatório
pad
{{
$pad
->
nome
}}
</
h3
>
</
div
>
<
div
class
=
"card d-flex"
>
<
div
class
=
"card-head d-flex justify-content-center"
style
=
"background-color:#dfdfdf; padding-top:10px;"
>
<
h6
class
=
"card-title"
style
=
"font-weight:bold;"
>
PROFESSORES
QUE
NÃO
ENVIARAM
O
PAD
</
h6
>
</
div
>
<
div
class
=
"card-body"
>
<
table
class
=
"table table-hover table-striped table-striped table-sm"
>
<
thead
>
<
tr
>
<
th
scope
=
'col'
></
th
>
<
th
scope
=
'col'
>
Professor
</
th
>
<
th
scope
=
'col'
>
Ch
Ensino
</
th
>
<
th
scope
=
'col'
>
Ch
Pesqiosa
</
th
>
<
th
scope
=
'col'
>
Ch
Extensão
</
th
>
<
th
scope
=
'col'
>
Ch
Gestão
</
th
>
<
th
scope
=
'col'
>
Curso
</
th
>
<
th
scope
=
'col'
>
Campus
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
php
$index
=
1
;
@
endphp
@
foreach
(
$professores
as
$professor
)
@
if
(
$professor
->
status
==
"Pendente"
)
<
tr
scope
=
'row'
>
<
td
>
{{
$index
}}
</
td
>
<
td
>
{{
$professor
->
name
}}
</
td
>
<
td
>
{{
$professor
->
curso
}}
</
td
>
<
td
>
{{
$professor
->
campus
}}
</
td
>
</
tr
>
@
php
$index
+=
1
@
endphp
@
endif
@
endforeach
</
tbody
>
</
table
>
</
div
>
</
div
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
div
class
=
"card d-flex"
style
=
'margin-top:20px;'
>
<
div
class
=
"card-head d-flex justify-content-center"
style
=
"background-color:#dfdfdf; padding-top:10px;"
>
<
h6
class
=
"card-title"
style
=
"font-weight:bold;"
>
RELAÇÃO
DOS
PROFESSORES
QUE
ENVIARAM
O
PAD
</
h6
>
</
div
>
<
div
class
=
"card-body"
>
<
table
class
=
"table table-hover table-striped table-striped table-sm"
>
<
thead
>
<
tr
>
<
th
scope
=
'col'
></
th
>
<
th
scope
=
'col'
>
Professor
</
th
>
<
th
scope
=
'col'
>
CH
Ensino
</
th
>
<
th
scope
=
'col'
>
CH
Pesquisa
</
th
>
<
th
scope
=
'col'
>
CH
Extensão
</
th
>
<
th
scope
=
'col'
>
CH
Gestão
</
th
>
<
th
scope
=
'col'
>
Campus
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
php
$index
=
1
;
@
endphp
@
foreach
(
$professores
as
$professor
)
@
if
(
$professor
->
status
!=
"Pendente"
)
<
tr
scope
=
'row'
>
<
td
>
{{
$index
}}
</
td
>
<
td
>
{{
$professor
->
name
}}
</
td
>
<
td
>
{{
$professor
->
ch_ensino
}}
</
td
>
<
td
>
{{
$professor
->
ch_pesquisa
}}
</
td
>
<
td
>
{{
$professor
->
ch_extensao
}}
</
td
>
<
td
>
{{
$professor
->
ch_gestao
}}
</
td
>
<
td
>
{{
$professor
->
campus
}}
</
td
>
</
tr
>
@
php
$index
+=
1
@
endphp
@
endif
@
endforeach
</
tbody
>
</
table
>
</
div
>
</
div
>
</
div
>
@
endsection
\ No newline at end of file
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