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
bb6c0ce1
Commit
bb6c0ce1
authored
May 09, 2023
by
Yuri Resende
Browse files
Consertando bug das abas.
parent
7864ea12
Changes
9
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/PadController.php
View file @
bb6c0ce1
...
...
@@ -341,7 +341,7 @@ class PadController extends Controller
return
view
(
"pad.avaliacao.professores"
,
compact
(
'professores'
,
'pad'
,
'index_menu'
));
}
public
function
professor_atividades
(
$id
,
$professor_id
)
public
function
professor_atividades
(
$id
,
$professor_id
,
$aba
=
null
)
{
$pad
=
Pad
::
find
(
$id
);
$user
=
Auth
::
user
();
...
...
@@ -367,7 +367,21 @@ class PadController extends Controller
$avaliacoes_extensao
=
$avaliacoes
[
'extensao'
];
$avaliacoes_gestao
=
$avaliacoes
[
'gestao'
];
return
view
(
'pad.avaliacao.taferas_professor'
,
compact
(
'pad'
,
'index_menu'
,
'professor'
,
'avaliacoes_ensino'
,
'avaliacoes_pesquisa'
,
'avaliacoes_extensao'
,
'avaliacoes_gestao'
,
'niveis'
,
'modalidades'
));
//Informando quais tipos (ensino, pesquisa, extensão ou gestão) de atividades podem ser avaliadas pelo usuário logado.
$avalPad
=
$user
->
avaliadorPad
()
->
first
();
$dimensoes
=
[];
foreach
(
$avalPad
->
dimensions
()
->
get
()
as
$dimensao
){
array_push
(
$dimensoes
,
$dimensao
->
dimensao
);
}
// dd($aba);
if
(
$aba
==
null
){
$caminho
=
'pad.avaliacao.tarefas_'
.
Dimensao
::
getDimensaoToRoute
(
$dimensoes
[
0
]);
}
else
{
$caminho
=
'pad.avaliacao.tarefas_'
.
$aba
;
}
return
view
(
$caminho
,
compact
(
'pad'
,
'index_menu'
,
'professor'
,
'avaliacoes_ensino'
,
'avaliacoes_pesquisa'
,
'avaliacoes_extensao'
,
'avaliacoes_gestao'
,
'niveis'
,
'modalidades'
));
}
private
function
add_tipo_atividade
(
$query
,
$type
)
...
...
@@ -576,29 +590,21 @@ class PadController extends Controller
$avaliacoes_pesquisa
=
$avaliacoes
[
'pesquisa'
];
$avaliacoes_extensao
=
$avaliacoes
[
'extensao'
];
$avaliacoes_gestao
=
$avaliacoes
[
'gestao'
];
foreach
(
$avaliacoes_ensino
->
all
()
as
$avaliacao
){
foreach
(
$avaliacao
->
tarefa
()
->
get
()
as
$tarefa
){
$ch
+=
$tarefa
->
ch_semanal
;
}
for
(
$i
=
0
;
$i
<
count
(
$avaliacoes_ensino
->
all
());
$i
++
){
$ch
+=
$avaliacoes_ensino
[
$i
]
->
tarefa
()
->
first
()
->
ch_semanal
;
}
foreach
(
$avaliacoes_pesquisa
->
all
()
as
$avaliacao
){
foreach
(
$avaliacao
->
tarefa
()
->
get
()
as
$tarefa
){
$ch
+=
$tarefa
->
ch_semanal
;
}
for
(
$i
=
0
;
$i
<
count
(
$avaliacoes_pesquisa
->
all
());
$i
++
){
$ch
+=
$avaliacoes_pesquisa
[
$i
]
->
tarefa
()
->
first
()
->
ch_semanal
;
}
foreach
(
$avaliacoes_extensao
->
all
()
as
$avaliacao
){
foreach
(
$avaliacao
->
tarefa
()
->
get
()
as
$tarefa
){
$ch
+=
$tarefa
->
ch_semanal
;
}
for
(
$i
=
0
;
$i
<
count
(
$avaliacoes_extensao
->
all
());
$i
++
){
$ch
+=
$avaliacoes_extensao
[
$i
]
->
tarefa
()
->
first
()
->
ch_semanal
;
}
foreach
(
$avaliacoes_gestao
->
all
()
as
$avaliacao
){
foreach
(
$avaliacao
->
tarefa
()
->
get
()
as
$tarefa
){
$ch
+=
$tarefa
->
ch_semanal
;
}
for
(
$i
=
0
;
$i
<
count
(
$avaliacoes_gestao
->
all
());
$i
++
){
$ch
+=
$avaliacoes_gestao
[
$i
]
->
tarefa
()
->
first
()
->
ch_semanal
;
}
return
$ch
;
...
...
app/Models/User.php
View file @
bb6c0ce1
...
...
@@ -266,4 +266,12 @@ class User extends Authenticatable
public
function
userPads
()
{
return
$this
->
hasMany
(
UserPad
::
class
);
}
/**
* @return Illuminate\Database\Eloquent\Collection
* @return Collection<UserPad>
*/
public
function
avaliadorPad
()
{
return
$this
->
hasOne
(
AvaliadorPad
::
class
);
}
}
app/Models/Util/Dimensao.php
View file @
bb6c0ce1
...
...
@@ -22,4 +22,18 @@ class Dimensao
return
$value
!==
null
?
$values
[
$value
]
:
$values
;
}
public
static
function
getDimensaoToRoute
(
$dimensoes
){
switch
(
Dimensao
::
listDimensao
(
$dimensoes
))
{
case
'Ensino'
:
return
"ensino"
;
case
'Pesquisa'
:
return
"pesquisa"
;
case
'Extensão'
:
return
"extensao"
;
case
'Gestão'
:
return
"gestao"
;
break
;
}
}
}
resources/views/pad/avaliacao/tarefas_ensino.blade.php
0 → 100644
View file @
bb6c0ce1
@
extends
(
'layouts.main'
)
@
section
(
'title'
,
'Ensino'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[
'index_menu'
=>
$index_menu
,
])
@
endsection
@
section
(
'body'
)
<
div
class
=
"container"
>
@
if
(
session
(
'mensage'
))
<
div
class
=
"alert alert-success"
>
{{
session
(
'mensage'
)}}
</
div
>
@
endif
<
h3
>
{{
$professor
->
name
}}
</
h3
><
br
><
br
>
<
div
class
=
"row justify-content-end"
>
<
div
class
=
"col-1"
>
<
a
href
=
'{{route("pad_professores", ["id" => $pad->id])}}'
class
=
'btn btn-outline-primary'
>
Voltar
</
a
>
</
div
>
</
div
>
<
ul
class
=
"nav nav-tabs justify-content-center"
id
=
"myTab"
role
=
"tablist"
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'ensino'])}}"
class
=
"nav-link active"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Ensino
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'pesquisa'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Pesquisa
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'extensao'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Extensao
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'gestao'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Gestão
</
a
>
</
li
>
</
ul
>
<
div
class
=
"tab-content"
id
=
"myTabContent"
>
<!--
Ensino
-->
<
div
class
=
"tab-pane fade show active"
id
=
"ensino"
role
=
"tabpanel"
aria
-
labelledby
=
"ensino-tab"
>
@
if
(
isset
(
$avaliacoes_ensino
)
&&
!
empty
(
$avaliacoes_ensino
[
0
]))
@
foreach
(
$avaliacoes_ensino
as
$avaliacao
)
<
div
class
=
"card"
>
<
h5
class
=
"card-header"
>
Cód
.
Atividade
-
{{
$avaliacao
->
tarefa
->
cod_atividade
}}
</
h5
>
<
div
class
=
"card-body"
>
<
ul
>
@
foreach
(
$avaliacao
->
tarefa
->
avaliable_attributes
as
$key
=>
$attribute
)
<
li
>
<
span
class
=
"fw-bold "
>
{{
$key
}}
</
span
><
span
class
=
"card-text"
>
{{
$avaliacao
->
tarefa
->
$attribute
}}
</
span
><
br
>
</
li
>
@
endforeach
</
ul
>
<
span
class
=
"fw-bold"
>
Status
:
</
span
>
{{
$avaliacao
->
getStatusAsText
()}}
@
if
(
$avaliacao
->
status
==
3
)
<
div
style
=
"width: 100%;"
class
=
"btns-avaliar d-flex justify-content-end"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
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}
}
') "
>
Reprovar
</
button
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id"
value
=
"
{
{$avaliacao->id}
}
"
>
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_aprovar"
value
=
"
{
{$avaliacao->tarefa->id}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_aprovar"
value
=
"
{
{$avaliacao->tarefa->userPad->user->id}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_aprovar"
value
=
'7'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_aprovar"
value
=
"
{
{$avaliacao->type}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-primary"
value
=
"Aprovar"
>
</
form
>
</
div
>
@
else
<
div
class
=
"btns-avaliar mt-4 d-flex justify-content-end"
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id_cancelar"
value
=
"
{
{$avaliacao->id}
}
"
>
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_cancelar"
value
=
"
{
{$avaliacao->tarefa->id}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_cancelar"
value
=
"
{
{$avaliacao->tarefa->userPad->user->id}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_cancelar"
value
=
'3'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_cancelar"
value
=
"
{
{$avaliacao->type}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-secondary"
value
=
"Cancelar Avaliação"
>
</
form
>
</
div
>
@
endif
</
div
>
</
div
><
br
>
@
endforeach
<
div
class
=
"row justify-content-center"
>
<
ul
class
=
"col-4 pagination pagination-sm "
>
{{
$avaliacoes_ensino
->
links
()
}}
</
ul
>
</
div
>
@
else
<
div
class
=
"container col-sm-6"
>
<
div
class
=
"card"
>
<
div
class
=
"card-header"
style
=
"height:40px;"
></
div
>
<
div
class
=
"card-body"
style
=
"margin-top:10px;"
>
<
div
class
=
"row justify-content-center"
>
<
h4
style
=
"text-align:center;"
>
Não
existem
atividades
desta
categoria
cadastradas
!
</
h4
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endif
</
div
>
</
div
>
<
div
class
=
"modal fade"
id
=
"modal_avaliacao"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog"
role
=
"document"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Avaliação
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
bs
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status"
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type"
>
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id_reprovar"
>
<
div
class
=
"modal-body"
>
<
div
class
=
"form-group"
>
<
label
for
=
"hora_reajuste"
>
Hora
de
reajuste
:</
label
>
<
input
class
=
"form-control"
type
=
"number"
name
=
"hora_reajuste"
id
=
"hora_reajuste"
><
br
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"descricao"
>
Descrição
:</
label
>
<
input
class
=
"form-control"
type
=
"textarea"
name
=
"descricao"
id
=
"descricao"
>
</
div
>
</
div
>
<
div
class
=
"modal-footer"
>
<
input
type
=
"submit"
class
=
"btn btn-outline-danger"
value
=
"Reprovar"
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
resources/views/pad/avaliacao/tarefas_extensao.blade.php
0 → 100644
View file @
bb6c0ce1
@
extends
(
'layouts.main'
)
@
section
(
'title'
,
'Ensino'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[
'index_menu'
=>
$index_menu
,
])
@
endsection
@
section
(
'body'
)
<
div
class
=
"container"
>
@
if
(
session
(
'mensage'
))
<
div
class
=
"alert alert-success"
>
{{
session
(
'mensage'
)}}
</
div
>
@
endif
<
h3
>
{{
$professor
->
name
}}
</
h3
><
br
><
br
>
<
div
class
=
"row justify-content-end"
>
<
div
class
=
"col-1"
>
<
a
href
=
'{{route("pad_professores", ["id" => $pad->id])}}'
class
=
'btn btn-outline-primary'
>
Voltar
</
a
>
</
div
>
</
div
>
<
ul
class
=
"nav nav-tabs justify-content-center"
id
=
"myTab"
role
=
"tablist"
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'ensino'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Ensino
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'pesquisa'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Pesquisa
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'extensao'])}}"
class
=
"nav-link active"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Extensao
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'gestao'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Gestão
</
a
>
</
li
>
</
ul
>
<
div
class
=
"tab-content"
id
=
"myTabContent"
>
<!--
Extensao
-->
<
div
class
=
"tab-pane fade show active"
id
=
"ensino"
role
=
"tabpanel"
aria
-
labelledby
=
"ensino-tab"
>
@
if
(
isset
(
$avaliacoes_extensao
)
&&
!
empty
(
$avaliacoes_extensao
[
0
]))
@
foreach
(
$avaliacoes_extensao
as
$avaliacao
)
<
div
class
=
"card"
>
<
h5
class
=
"card-header"
>
Cód
.
Atividade
-
{{
$avaliacao
->
tarefa
->
cod_atividade
}}
</
h5
>
<
div
class
=
"card-body"
>
<
ul
>
@
foreach
(
$avaliacao
->
tarefa
->
avaliable_attributes
as
$key
=>
$attribute
)
<
li
>
<
span
class
=
"fw-bold "
>
{{
$key
}}
</
span
><
span
class
=
"card-text"
>
{{
$avaliacao
->
tarefa
->
$attribute
}}
</
span
><
br
>
</
li
>
@
endforeach
</
ul
>
<
span
class
=
"fw-bold"
>
Status
:
</
span
>
{{
$avaliacao
->
getStatusAsText
()}}
@
if
(
$avaliacao
->
status
==
3
)
<
div
style
=
"width: 100%;"
class
=
"btns-avaliar d-flex justify-content-end"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
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}
}
') "
>
Reprovar
</
button
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id"
value
=
"
{
{$avaliacao->id}
}
"
>
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_aprovar"
value
=
"
{
{$avaliacao->tarefa->id}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_aprovar"
value
=
"
{
{$avaliacao->tarefa->userPad->user->id}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_aprovar"
value
=
'7'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_aprovar"
value
=
"
{
{$avaliacao->type}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-primary"
value
=
"Aprovar"
>
</
form
>
</
div
>
@
else
<
div
class
=
"btns-avaliar mt-4 d-flex justify-content-end"
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id_cancelar"
value
=
"
{
{$avaliacao->id}
}
"
>
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_cancelar"
value
=
"
{
{$avaliacao->tarefa->id}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_cancelar"
value
=
"
{
{$avaliacao->tarefa->userPad->user->id}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_cancelar"
value
=
'3'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_cancelar"
value
=
"
{
{$avaliacao->type}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-secondary"
value
=
"Cancelar Avaliação"
>
</
form
>
</
div
>
@
endif
</
div
>
</
div
><
br
>
@
endforeach
<
div
class
=
"row justify-content-center"
>
<
ul
class
=
"col-4 pagination pagination-sm "
>
{{
$avaliacoes_extensao
->
links
()
}}
</
ul
>
</
div
>
@
else
<
div
class
=
"container col-sm-6"
>
<
div
class
=
"card"
>
<
div
class
=
"card-header"
style
=
"height:40px;"
></
div
>
<
div
class
=
"card-body"
style
=
"margin-top:10px;"
>
<
div
class
=
"row justify-content-center"
>
<
h4
style
=
"text-align:center;"
>
Não
existem
atividades
desta
categoria
cadastradas
!
</
h4
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endif
</
div
>
</
div
>
<
div
class
=
"modal fade"
id
=
"modal_avaliacao"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog"
role
=
"document"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Avaliação
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
bs
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status"
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type"
>
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id_reprovar"
>
<
div
class
=
"modal-body"
>
<
div
class
=
"form-group"
>
<
label
for
=
"hora_reajuste"
>
Hora
de
reajuste
:</
label
>
<
input
class
=
"form-control"
type
=
"number"
name
=
"hora_reajuste"
id
=
"hora_reajuste"
><
br
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"descricao"
>
Descrição
:</
label
>
<
input
class
=
"form-control"
type
=
"textarea"
name
=
"descricao"
id
=
"descricao"
>
</
div
>
</
div
>
<
div
class
=
"modal-footer"
>
<
input
type
=
"submit"
class
=
"btn btn-outline-danger"
value
=
"Reprovar"
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
resources/views/pad/avaliacao/tarefas_gestao.blade.php
0 → 100644
View file @
bb6c0ce1
@
extends
(
'layouts.main'
)
@
section
(
'title'
,
'Ensino'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[
'index_menu'
=>
$index_menu
,
])
@
endsection
@
section
(
'body'
)
<
div
class
=
"container"
>
@
if
(
session
(
'mensage'
))
<
div
class
=
"alert alert-success"
>
{{
session
(
'mensage'
)}}
</
div
>
@
endif
<
h3
>
{{
$professor
->
name
}}
</
h3
><
br
><
br
>
<
div
class
=
"row justify-content-end"
>
<
div
class
=
"col-1"
>
<
a
href
=
'{{route("pad_professores", ["id" => $pad->id])}}'
class
=
'btn btn-outline-primary'
>
Voltar
</
a
>
</
div
>
</
div
>
<
ul
class
=
"nav nav-tabs justify-content-center"
id
=
"myTab"
role
=
"tablist"
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'ensino'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Ensino
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'pesquisa'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Pesquisa
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'extensao'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Extensao
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'gestao'])}}"
class
=
"nav-link active"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Gestão
</
a
>
</
li
>
</
ul
>
<
div
class
=
"tab-content"
id
=
"myTabContent"
>
<!--
Gestão
-->
<
div
class
=
"tab-pane fade show active"
id
=
"ensino"
role
=
"tabpanel"
aria
-
labelledby
=
"ensino-tab"
>
@
if
(
isset
(
$avaliacoes_gestao
)
&&
!
empty
(
$avaliacoes_gestao
[
0
]))
@
foreach
(
$avaliacoes_gestao
as
$avaliacao
)
<
div
class
=
"card"
>
<
h5
class
=
"card-header"
>
Cód
.
Atividade
-
{{
$avaliacao
->
tarefa
->
cod_atividade
}}
</
h5
>
<
div
class
=
"card-body"
>
<
ul
>
@
foreach
(
$avaliacao
->
tarefa
->
avaliable_attributes
as
$key
=>
$attribute
)
<
li
>
<
span
class
=
"fw-bold "
>
{{
$key
}}
</
span
><
span
class
=
"card-text"
>
{{
$avaliacao
->
tarefa
->
$attribute
}}
</
span
><
br
>
</
li
>
@
endforeach
</
ul
>
<
span
class
=
"fw-bold"
>
Status
:
</
span
>
{{
$avaliacao
->
getStatusAsText
()}}
@
if
(
$avaliacao
->
status
==
3
)
<
div
style
=
"width: 100%;"
class
=
"btns-avaliar d-flex justify-content-end"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
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}
}
') "
>
Reprovar
</
button
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id"
value
=
"
{
{$avaliacao->id}
}
"
>
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_aprovar"
value
=
"
{
{$avaliacao->tarefa->id}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_aprovar"
value
=
"
{
{$avaliacao->tarefa->userPad->user->id}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_aprovar"
value
=
'7'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_aprovar"
value
=
"
{
{$avaliacao->type}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-primary"
value
=
"Aprovar"
>
</
form
>
</
div
>
@
else
<
div
class
=
"btns-avaliar mt-4 d-flex justify-content-end"
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id_cancelar"
value
=
"
{
{$avaliacao->id}
}
"
>
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_cancelar"
value
=
"
{
{$avaliacao->tarefa->id}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_cancelar"
value
=
"
{
{$avaliacao->tarefa->userPad->user->id}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_cancelar"
value
=
'3'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_cancelar"
value
=
"
{
{$avaliacao->type}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-secondary"
value
=
"Cancelar Avaliação"
>
</
form
>
</
div
>
@
endif
</
div
>
</
div
><
br
>
@
endforeach
<
div
class
=
"row justify-content-center"
>
<
ul
class
=
"col-4 pagination pagination-sm "
>
{{
$avaliacoes_gestao
->
links
()
}}
</
ul
>
</
div
>
@
else
<
div
class
=
"container col-sm-6"
>
<
div
class
=
"card"
>
<
div
class
=
"card-header"
style
=
"height:40px;"
></
div
>
<
div
class
=
"card-body"
style
=
"margin-top:10px;"
>
<
div
class
=
"row justify-content-center"
>
<
h4
style
=
"text-align:center;"
>
Não
existem
atividades
desta
categoria
cadastradas
!
</
h4
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endif
</
div
>
</
div
>
<
div
class
=
"modal fade"
id
=
"modal_avaliacao"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog"
role
=
"document"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Avaliação
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
bs
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status"
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type"
>
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id_reprovar"
>
<
div
class
=
"modal-body"
>
<
div
class
=
"form-group"
>
<
label
for
=
"hora_reajuste"
>
Hora
de
reajuste
:</
label
>
<
input
class
=
"form-control"
type
=
"number"
name
=
"hora_reajuste"
id
=
"hora_reajuste"
><
br
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"descricao"
>
Descrição
:</
label
>
<
input
class
=
"form-control"
type
=
"textarea"
name
=
"descricao"
id
=
"descricao"
>
</
div
>
</
div
>
<
div
class
=
"modal-footer"
>
<
input
type
=
"submit"
class
=
"btn btn-outline-danger"
value
=
"Reprovar"
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
resources/views/pad/avaliacao/tarefas_pesquisa.blade.php
0 → 100644
View file @
bb6c0ce1
@
extends
(
'layouts.main'
)
@
section
(
'title'
,
'Ensino'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[
'index_menu'
=>
$index_menu
,
])
@
endsection
@
section
(
'body'
)
<
div
class
=
"container"
>
@
if
(
session
(
'mensage'
))
<
div
class
=
"alert alert-success"
>
{{
session
(
'mensage'
)}}
</
div
>
@
endif
<
h3
>
{{
$professor
->
name
}}
</
h3
><
br
><
br
>
<
div
class
=
"row justify-content-end"
>
<
div
class
=
"col-1"
>
<
a
href
=
'{{route("pad_professores", ["id" => $pad->id])}}'
class
=
'btn btn-outline-primary'
>
Voltar
</
a
>
</
div
>
</
div
>
<
ul
class
=
"nav nav-tabs justify-content-center"
id
=
"myTab"
role
=
"tablist"
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'ensino'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Ensino
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'pesquisa'])}}"
class
=
"nav-link active"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Pesquisa
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'extensao'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Extensao
</
a
>
</
li
>
<
li
class
=
"nav-item"
role
=
"presentation"
>
<
a
href
=
"{{Route('pad_professor_atividades', ['id'=>
$pad->id
, 'professor_id'=>
$professor->id
, 'aba'=>'gestao'])}}"
class
=
"nav-link"
id
=
"profile-tab"
type
=
"button"
role
=
"tab"
aria
-
controls
=
"profile"
aria
-
selected
=
"false"
>
Gestão
</
a
>
</
li
>
</
ul
>
<
div
class
=
"tab-content"
id
=
"myTabContent"
>
<!--
Pesquisa
-->
<
div
class
=
"tab-pane fade show active"
id
=
"ensino"
role
=
"tabpanel"
aria
-
labelledby
=
"ensino-tab"
>
@
if
(
isset
(
$avaliacoes_pesquisa
)
&&
!
empty
(
$avaliacoes_pesquisa
[
0
]))
@
foreach
(
$avaliacoes_pesquisa
as
$avaliacao
)
<
div
class
=
"card"
>
<
h5
class
=
"card-header"
>
Cód
.
Atividade
-
{{
$avaliacao
->
tarefa
->
cod_atividade
}}
</
h5
>
<
div
class
=
"card-body"
>
<
ul
>
@
foreach
(
$avaliacao
->
tarefa
->
avaliable_attributes
as
$key
=>
$attribute
)
<
li
>
<
span
class
=
"fw-bold "
>
{{
$key
}}
</
span
><
span
class
=
"card-text"
>
{{
$avaliacao
->
tarefa
->
$attribute
}}
</
span
><
br
>
</
li
>
@
endforeach
</
ul
>
<
span
class
=
"fw-bold"
>
Status
:
</
span
>
{{
$avaliacao
->
getStatusAsText
()}}
@
if
(
$avaliacao
->
status
==
3
)
<
div
style
=
"width: 100%;"
class
=
"btns-avaliar d-flex justify-content-end"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
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}
}
') "
>
Reprovar
</
button
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id"
value
=
"
{
{$avaliacao->id}
}
"
>
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_aprovar"
value
=
"
{
{$avaliacao->tarefa->id}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_aprovar"
value
=
"
{
{$avaliacao->tarefa->userPad->user->id}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_aprovar"
value
=
'7'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_aprovar"
value
=
"
{
{$avaliacao->type}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-primary"
value
=
"Aprovar"
>
</
form
>
</
div
>
@
else
<
div
class
=
"btns-avaliar mt-4 d-flex justify-content-end"
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id_cancelar"
value
=
"
{
{$avaliacao->id}
}
"
>
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_cancelar"
value
=
"
{
{$avaliacao->tarefa->id}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_cancelar"
value
=
"
{
{$avaliacao->tarefa->userPad->user->id}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_cancelar"
value
=
'3'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_cancelar"
value
=
"
{
{$avaliacao->type}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-secondary"
value
=
"Cancelar Avaliação"
>
</
form
>
</
div
>
@
endif
</
div
>
</
div
><
br
>
@
endforeach
<
div
class
=
"row justify-content-center"
>
<
ul
class
=
"col-4 pagination pagination-sm "
>
{{
$avaliacoes_pesquisa
->
links
()
}}
</
ul
>
</
div
>
@
else
<
div
class
=
"container col-sm-6"
>
<
div
class
=
"card"
>
<
div
class
=
"card-header"
style
=
"height:40px;"
></
div
>
<
div
class
=
"card-body"
style
=
"margin-top:10px;"
>
<
div
class
=
"row justify-content-center"
>
<
h4
style
=
"text-align:center;"
>
Não
existem
atividades
desta
categoria
cadastradas
!
</
h4
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endif
</
div
>
</
div
>
<
div
class
=
"modal fade"
id
=
"modal_avaliacao"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog"
role
=
"document"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Avaliação
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
bs
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status"
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type"
>
<
input
type
=
"hidden"
name
=
"avaliacao_id"
id
=
"avaliacao_id_reprovar"
>
<
div
class
=
"modal-body"
>
<
div
class
=
"form-group"
>
<
label
for
=
"hora_reajuste"
>
Hora
de
reajuste
:</
label
>
<
input
class
=
"form-control"
type
=
"number"
name
=
"hora_reajuste"
id
=
"hora_reajuste"
><
br
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"descricao"
>
Descrição
:</
label
>
<
input
class
=
"form-control"
type
=
"textarea"
name
=
"descricao"
id
=
"descricao"
>
</
div
>
</
div
>
<
div
class
=
"modal-footer"
>
<
input
type
=
"submit"
class
=
"btn btn-outline-danger"
value
=
"Reprovar"
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
resources/views/pad/avaliacao/ta
fer
as_professor.blade.php
→
resources/views/pad/avaliacao/ta
ref
as_professor.blade.php
View file @
bb6c0ce1
File moved
routes/pad.php
View file @
bb6c0ce1
...
...
@@ -13,7 +13,11 @@ Route::prefix('/pad')->group(function () {
Route
::
put
(
'/update/{id}'
,
[
PadController
::
class
,
'update'
])
->
name
(
'pad_update'
);
Route
::
delete
(
'/delete/{id}'
,
[
PadController
::
class
,
'delete'
])
->
name
(
'pad_delete'
);
Route
::
get
(
'/{id}/avaliar/professores'
,
[
PadController
::
class
,
'professores'
])
->
name
(
'pad_professores'
);
Route
::
get
(
'/{id}/professor/{professor_id}/atividades'
,
[
PadController
::
class
,
'professor_atividades'
])
->
name
(
'pad_professor_atividades'
);
Route
::
get
(
'/{id}/professor/{professor_id}/atividades/{aba?}'
,
[
PadController
::
class
,
'professor_atividades'
])
->
name
(
'pad_professor_atividades'
);
Route
::
get
(
'/{id}/professor/{professor_id}/atividades/ensino'
,
[
PadController
::
class
,
'professor_atividades'
])
->
name
(
'pad_professor_atividades_ensino'
);
Route
::
get
(
'/{id}/professor/{professor_id}/atividades/pesquisa'
,
[
PadController
::
class
,
'professor_atividades'
])
->
name
(
'pad_professor_atividades_pesquisa'
);
Route
::
get
(
'/{id}/professor/{professor_id}/atividades/gestao'
,
[
PadController
::
class
,
'professor_atividades'
])
->
name
(
'pad_professor_atividades_gestao'
);
Route
::
get
(
'/{id}/professor/{professor_id}/atividades/extensao'
,
[
PadController
::
class
,
'professor_atividades'
])
->
name
(
'pad_professor_atividades_extensao'
);
});
/** PadProfessor */
...
...
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