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
c7e295ad
Commit
c7e295ad
authored
Aug 28, 2023
by
PedroLopesUPE
Browse files
Modificação dos nomes das variáveis locais
parent
c41863fc
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/PadController.php
View file @
c7e295ad
...
@@ -934,10 +934,6 @@ class PadController extends Controller
...
@@ -934,10 +934,6 @@ class PadController extends Controller
$professor
->
ch_gestao
=
$this
->
get_carga_horaria
(
$avaliacoes
[
'gestao'
])
?
$this
->
get_carga_horaria
(
$avaliacoes
[
'gestao'
])
:
0
;
$professor
->
ch_gestao
=
$this
->
get_carga_horaria
(
$avaliacoes
[
'gestao'
])
?
$this
->
get_carga_horaria
(
$avaliacoes
[
'gestao'
])
:
0
;
if
(
$professor
->
ch_ensino
||
$professor
->
ch_pesquisa
||
$professor
->
ch_extensao
||
$professor
->
ch_gestao
)
{
if
(
$professor
->
ch_ensino
||
$professor
->
ch_pesquisa
||
$professor
->
ch_extensao
||
$professor
->
ch_gestao
)
{
$resource
=
tmpfile
();
$path
=
stream_get_meta_data
(
$resource
)[
'uri'
];
$fileName
=
storage_path
(
$professor
->
{
'name'
}
.
"_.pdf"
);
$fileName
=
storage_path
(
$professor
->
{
'name'
}
.
"_.pdf"
);
$userPadGeneratePDF
->
GeneratePDF
(
$userPad
->
{
'id'
},
$fileName
);
$userPadGeneratePDF
->
GeneratePDF
(
$userPad
->
{
'id'
},
$fileName
);
$pads
[
$professor
->
{
'name'
}]
=
$fileName
;
$pads
[
$professor
->
{
'name'
}]
=
$fileName
;
...
...
app/Http/Controllers/UserPadController.php
View file @
c7e295ad
...
@@ -138,7 +138,7 @@ class UserPadController extends Controller
...
@@ -138,7 +138,7 @@ class UserPadController extends Controller
$unidades_ensino
=
Unidade
::
listUnidades
();
$unidades_ensino
=
Unidade
::
listUnidades
();
$cursos
=
Curso
::
whereId
(
5
)
->
first
()
->
toArray
();
$cursos
=
Curso
::
whereId
(
5
)
->
first
()
->
toArray
();
$semestres
=
Anexo
::
listSemestre
();
$semestres
=
Anexo
::
listSemestre
();
$
nomes_
valores
=
$valores
Pad
=
[
[
'componente_curricular'
=>
'Componente Curricular'
,
'componente_curricular'
=>
'Componente Curricular'
,
'ch_semanal'
=>
'CH Semanal'
,
'ch_semanal'
=>
'CH Semanal'
,
...
@@ -155,7 +155,11 @@ class UserPadController extends Controller
...
@@ -155,7 +155,11 @@ class UserPadController extends Controller
'nivel'
=>
'Nível'
,
'nivel'
=>
'Nível'
,
'modalidade'
=>
'Modalidade'
,
'modalidade'
=>
'Modalidade'
,
'funcao'
=>
'Função'
,
'funcao'
=>
'Função'
,
'natureza'
=>
'Natureza'
,
'natureza'
=>
'Natureza'
];
$valoresAnexo
=
[
"campus_id"
=>
'UNIDADE DE EDUCAÇÃO/CAMPUS'
,
"campus_id"
=>
'UNIDADE DE EDUCAÇÃO/CAMPUS'
,
"curso_id"
=>
'CURSO'
,
"curso_id"
=>
'CURSO'
,
"unidade"
=>
'UNIDADE'
,
"unidade"
=>
'UNIDADE'
,
...
@@ -168,9 +172,11 @@ class UserPadController extends Controller
...
@@ -168,9 +172,11 @@ class UserPadController extends Controller
"afastamento_parcial"
=>
'AFASTAMENTO PARCIAL?'
,
"afastamento_parcial"
=>
'AFASTAMENTO PARCIAL?'
,
"afastamento_parcial_desc"
=>
'PORTARIA DE AFASTAMENTO (PARCIAL)'
,
"afastamento_parcial_desc"
=>
'PORTARIA DE AFASTAMENTO (PARCIAL)'
,
"direcao_sindical"
=>
'EXERCE FUNÇÃO ADMINISTRATIVA?'
,
"direcao_sindical"
=>
'EXERCE FUNÇÃO ADMINISTRATIVA?'
,
"licenca"
=>
'LICENÇA DE ACORDO COM A LEGISLAÇÃO VIGENTE. ESPECIFIQUE'
,
"licenca"
=>
'LICENÇA DE ACORDO COM A LEGISLAÇÃO VIGENTE. ESPECIFIQUE'
];
];
$valores_lista_negra
=
// dd(array_keys($valoresAnexo));
$valoresListaNegra
=
[
[
"id"
,
"id"
,
"user_pad_id"
,
"user_pad_id"
,
...
@@ -221,6 +227,7 @@ class UserPadController extends Controller
...
@@ -221,6 +227,7 @@ class UserPadController extends Controller
if
(
Anexo
::
whereUserPadId
(
$user_pad_id
)
->
first
()
!=
null
)
if
(
Anexo
::
whereUserPadId
(
$user_pad_id
)
->
first
()
!=
null
)
{
{
$anexoPad
=
Anexo
::
whereUserPadId
(
$user_pad_id
)
->
first
()
->
toArray
();
$anexoPad
=
Anexo
::
whereUserPadId
(
$user_pad_id
)
->
first
()
->
toArray
();
// dd($anexoPad);
}
}
else
{
$anexoPad
=
null
;
}
else
{
$anexoPad
=
null
;
}
$userPad
=
UserPad
::
whereId
(
$user_pad_id
)
->
first
();
$userPad
=
UserPad
::
whereId
(
$user_pad_id
)
->
first
();
...
@@ -259,15 +266,15 @@ class UserPadController extends Controller
...
@@ -259,15 +266,15 @@ class UserPadController extends Controller
];
];
// Geração de array tratado a partir do modelo
// Geração de array tratado a partir do modelo
$treated
_m
odel
=
[];
$treated
M
odel
=
[];
$treated
_n
ome
_d
imensao
=
""
;
$treated
N
ome
D
imensao
=
""
;
$treated
_n
ome
_c
ategoria
=
""
;
$treated
N
ome
C
ategoria
=
""
;
$treated
_t
arefa
_c
odigo
=
""
;
$treated
T
arefa
C
odigo
=
""
;
foreach
(
$model
as
$nome_dimensao
=>
$dimensao
)
foreach
(
$model
as
$nome_dimensao
=>
$dimensao
)
{
{
$treated
_n
ome
_d
imensao
=
strtoupper
(
$nome_dimensao
);
$treated
N
ome
D
imensao
=
strtoupper
(
$nome_dimensao
);
$treated
_m
odel
[
$treated
_n
ome
_d
imensao
]
=
[];
$treated
M
odel
[
$treated
N
ome
D
imensao
]
=
[];
foreach
(
$dimensao
as
$nome_categoria
=>
$categoria
)
foreach
(
$dimensao
as
$nome_categoria
=>
$categoria
)
{
{
...
@@ -277,46 +284,46 @@ class UserPadController extends Controller
...
@@ -277,46 +284,46 @@ class UserPadController extends Controller
}
}
else
else
{
{
$treated
_n
ome
_c
ategoria
=
str_replace
(
"."
,
":"
,
$nome_categoria
);
$treated
N
ome
C
ategoria
=
str_replace
(
"."
,
":"
,
$nome_categoria
);
$treated
_m
odel
[
$treated
_n
ome
_d
imensao
][
$treated
_n
ome
_c
ategoria
]
=
[];
$treated
M
odel
[
$treated
N
ome
D
imensao
][
$treated
N
ome
C
ategoria
]
=
[];
foreach
(
$categoria
as
$nome_item
=>
$item
)
foreach
(
$categoria
as
$nome_item
=>
$item
)
{
{
foreach
(
$item
as
$nome_valor
=>
$valor
)
foreach
(
$item
as
$nome_valor
=>
$valor
)
{
{
if
(
!
array_key_exists
(
'Cód: '
.
$item
[
'cod_atividade'
],
$treated
_m
odel
[
$treated
_n
ome
_d
imensao
][
$treated
_n
ome
_c
ategoria
]))
if
(
!
array_key_exists
(
'Cód: '
.
$item
[
'cod_atividade'
],
$treated
M
odel
[
$treated
N
ome
D
imensao
][
$treated
N
ome
C
ategoria
]))
{
{
$treated
_m
odel
[
$treated
_n
ome
_d
imensao
][
$treated
_n
ome
_c
ategoria
][
'Cód: '
.
$item
[
'cod_atividade'
]]
=
[];
$treated
M
odel
[
$treated
N
ome
D
imensao
][
$treated
N
ome
C
ategoria
][
'Cód: '
.
$item
[
'cod_atividade'
]]
=
[];
$treated
_t
arefa
_c
odigo
=
'Cód: '
.
$item
[
'cod_atividade'
];
$treated
T
arefa
C
odigo
=
'Cód: '
.
$item
[
'cod_atividade'
];
}
}
else
else
{
{
if
(
in_array
(
$nome_valor
,
$valores
_l
ista
_n
egra
))
if
(
in_array
(
$nome_valor
,
$valores
L
ista
N
egra
))
{
{
continue
;
continue
;
}
}
elseif
(
$nome_valor
==
"nivel"
)
elseif
(
$nome_valor
==
"nivel"
)
{
{
$treated
_m
odel
[
$treated
_n
ome
_d
imensao
][
$treated
_n
ome
_c
ategoria
][
$treated
_t
arefa
_c
odigo
][
$
nomes_
valores
[
$nome_valor
]]
=
$niveis
[
$valor
];
$treated
M
odel
[
$treated
N
ome
D
imensao
][
$treated
N
ome
C
ategoria
][
$treated
T
arefa
C
odigo
][
$valores
Pad
[
$nome_valor
]]
=
$niveis
[
$valor
];
}
}
elseif
(
$nome_valor
==
"modalidade"
)
elseif
(
$nome_valor
==
"modalidade"
)
{
{
$treated
_m
odel
[
$treated
_n
ome
_d
imensao
][
$treated
_n
ome
_c
ategoria
][
$treated
_t
arefa
_c
odigo
][
$
nomes_
valores
[
$nome_valor
]]
=
$modalidades
[
$valor
];
$treated
M
odel
[
$treated
N
ome
D
imensao
][
$treated
N
ome
C
ategoria
][
$treated
T
arefa
C
odigo
][
$valores
Pad
[
$nome_valor
]]
=
$modalidades
[
$valor
];
}
}
elseif
(
$nome_valor
==
"funcao"
)
elseif
(
$nome_valor
==
"funcao"
)
{
{
$treated
_m
odel
[
$treated
_n
ome
_d
imensao
][
$treated
_n
ome
_c
ategoria
][
$treated
_t
arefa
_c
odigo
][
$
nomes_
valores
[
$nome_valor
]]
=
$funcoes
[
$valor
];
$treated
M
odel
[
$treated
N
ome
D
imensao
][
$treated
N
ome
C
ategoria
][
$treated
T
arefa
C
odigo
][
$valores
Pad
[
$nome_valor
]]
=
$funcoes
[
$valor
];
}
}
elseif
(
$nome_valor
==
"natureza"
)
elseif
(
$nome_valor
==
"natureza"
)
{
{
$treated
_m
odel
[
$treated
_n
ome
_d
imensao
][
$treated
_n
ome
_c
ategoria
][
$treated
_t
arefa
_c
odigo
][
$
nomes_
valores
[
$nome_valor
]]
=
$naturezas
[
$valor
];
$treated
M
odel
[
$treated
N
ome
D
imensao
][
$treated
N
ome
C
ategoria
][
$treated
T
arefa
C
odigo
][
$valores
Pad
[
$nome_valor
]]
=
$naturezas
[
$valor
];
}
}
elseif
(
array_key_exists
(
$nome_valor
,
$
nomes_
valores
))
elseif
(
array_key_exists
(
$nome_valor
,
$valores
Pad
))
{
{
$treated
_m
odel
[
$treated
_n
ome
_d
imensao
][
$treated
_n
ome
_c
ategoria
][
$treated
_t
arefa
_c
odigo
][
$
nomes_
valores
[
$nome_valor
]]
=
$valor
;
$treated
M
odel
[
$treated
N
ome
D
imensao
][
$treated
N
ome
C
ategoria
][
$treated
T
arefa
C
odigo
][
$valores
Pad
[
$nome_valor
]]
=
$valor
;
}
}
else
else
{
{
$treated
_m
odel
[
$treated
_n
ome
_d
imensao
][
$treated
_n
ome
_c
ategoria
][
$treated
_t
arefa
_c
odigo
][
$nome_valor
]
=
$valor
;
$treated
M
odel
[
$treated
N
ome
D
imensao
][
$treated
N
ome
C
ategoria
][
$treated
T
arefa
C
odigo
][
$nome_valor
]
=
$valor
;
}
}
}
}
}
}
...
@@ -324,49 +331,48 @@ class UserPadController extends Controller
...
@@ -324,49 +331,48 @@ class UserPadController extends Controller
}
}
}
}
}
}
$treated_anexo_pad
=
[];
$ANEXOPLACEHOLDER
=
"Não especificado"
;
$treatedAnexo
=
[];
if
(
$anexoPad
!=
null
)
if
(
$anexoPad
!=
null
)
{
{
foreach
(
$anexoPad
as
$nome
_valor
=>
$valor
)
foreach
(
$anexoPad
as
$nome
=>
$valor
)
{
{
if
(
in_array
(
$nome
_valor
,
$valores
_l
ista
_n
egra
))
if
(
in_array
(
$nome
,
$valores
L
ista
N
egra
))
{
{
continue
;
continue
;
}
}
elseif
(
$nome
_valor
==
'
campus_id
'
)
elseif
(
$nome
==
"
campus_id
"
)
{
{
if
(
$valor
!=
null
)
if
(
$valor
!=
null
)
{
{
$campus
=
Campus
::
whereId
(
$valor
)
->
first
();
$campus
=
Campus
::
whereId
(
$valor
)
->
first
();
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
$campus
->
{
'name'
};
$treatedAnexo
[
$valoresAnexo
[
$nome
]]
=
$campus
->
{
'name'
};
// $treated_anexo_pad[$nomes_valores['unidade']] = strToUpper($unidades_ensino[$campus->{'unidade_id'}]);
}
}
else
else
{
{
$treated_anexo_pad
[
$nomes_valores
[
$nome_valor
]]
=
""
;
$treatedAnexo
[
$valoresAnexo
[
$nome
]]
=
$ANEXOPLACEHOLDER
;
// $treated_anexo_pad[$nomes_valores['unidade']] = "Não especificado";
}
}
}
}
elseif
(
$nome
_valor
==
'
curso_id
'
)
elseif
(
$nome
==
"
curso_id
"
)
{
{
$valor
!=
null
?
$treated
_a
nexo
_pad
[
$nomes_
valores
[
$nome
_valor
]]
=
Curso
::
whereId
(
$valor
)
->
first
()
->
{
'name'
}
:
$treated
_a
nexo
_pad
[
$nomes_
valores
[
$nome
_valor
]]
=
"Não especificado"
;
$valor
!=
null
?
$treated
A
nexo
[
$
valores
Anexo
[
$nome
]]
=
Curso
::
whereId
(
$valor
)
->
first
()
->
{
'name'
}
:
$treated
A
nexo
[
$
valores
Anexo
[
$nome
]]
=
$ANEXOPLACEHOLDER
;
}
}
elseif
(
$nome
_valor
==
'
semestre
'
)
elseif
(
$nome
==
"
semestre
"
)
{
{
$valor
!=
null
?
$treated
_a
nexo
_pad
[
$nomes_
valores
[
$nome
_valor
]]
=
$semestres
[
$valor
]
:
$treated
_a
nexo
_pad
[
$nomes_
valores
[
$nome
_valor
]]
=
"Não especificado"
;
$valor
!=
null
?
$treated
A
nexo
[
$
valores
Anexo
[
$nome
]]
=
$semestres
[
$valor
]
:
$treated
A
nexo
[
$
valores
Anexo
[
$nome
]]
=
$ANEXOPLACEHOLDER
;
}
}
elseif
(
$nome
_valor
==
'
afastamento_total
'
||
$nome
_valor
==
'
afastamento_parcial
'
||
$nome
_valor
==
'direcao_sindical'
)
elseif
(
$nome
==
"
afastamento_total
"
||
$nome
==
"
afastamento_parcial
"
||
$nome
==
'direcao_sindical'
)
{
{
$treated
_a
nexo
_pad
[
$nomes_
valores
[
$nome
_valor
]]
=
$valor
==
1
?
'Sim'
:
'Não'
;
$treated
A
nexo
[
$
valores
Anexo
[
$nome
]]
=
$valor
==
1
?
'Sim'
:
'Não'
;
}
}
elseif
(
array_key_exists
(
$nome
_valor
,
$nomes_
valores
))
elseif
(
array_key_exists
(
$nome
,
$
valores
Anexo
))
{
{
$valor
!=
null
?
$treated
_a
nexo
_pad
[
$nomes_
valores
[
$nome
_valor
]]
=
$valor
:
$treated
_a
nexo
_pad
[
$nomes_
valores
[
$nome
_valor
]]
=
"Não especificado"
;
$valor
!=
null
?
$treated
A
nexo
[
$
valores
Anexo
[
$nome
]]
=
$valor
:
$treated
A
nexo
[
$
valores
Anexo
[
$nome
]]
=
$ANEXOPLACEHOLDER
;
}
}
else
else
{
{
$valor
!=
null
?
$treated
_a
nexo
_pad
[
$nome
_valor
]
=
$valor
:
$treated
_a
nexo
_pad
[
$nome
_valor
]
=
"Não especificado"
;
$valor
!=
null
?
$treated
A
nexo
[
$nome
]
=
$valor
:
$treated
A
nexo
[
$nome
]
=
$ANEXOPLACEHOLDER
;
}
}
}
}
}
}
...
@@ -380,13 +386,13 @@ class UserPadController extends Controller
...
@@ -380,13 +386,13 @@ class UserPadController extends Controller
'nome'
=>
$userPad
->
user
->
{
'name'
},
'nome'
=>
$userPad
->
user
->
{
'name'
},
'email'
=>
$userPad
->
user
->
{
'email'
}
'email'
=>
$userPad
->
user
->
{
'email'
}
],
],
'anexo'
=>
$treated
_a
nexo
_pad
,
'anexo'
=>
$treated
A
nexo
,
'model'
=>
$treated
_m
odel
,
'model'
=>
$treated
M
odel
,
'horas'
=>
$horas
'horas'
=>
$horas
);
);
// dd(
// dd(
// // $userPad->pesquisaCoordenacoes->toArray(),
// // $userPad->pesquisaCoordenacoes->toArray(),
// $treated
_a
nexo
_pad
,
// $treated
A
nexo,
// // ($model['extensao']['1. EXTENSÃO (COORDENAÇÃO DE ATIVIDADES DE EXTENSÃO HOMOLOGADA NA PROEC)']),
// // ($model['extensao']['1. EXTENSÃO (COORDENAÇÃO DE ATIVIDADES DE EXTENSÃO HOMOLOGADA NA PROEC)']),
// // public_path('\images\estado_pe_logo.png'),
// // public_path('\images\estado_pe_logo.png'),
// // url('images\estado_pe_logo.png'),
// // url('images\estado_pe_logo.png'),
...
...
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