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
87eb6d97
"git@sites.upe.br:walter.felipe/submeta.git" did not exist on "0055e3e6d539060354b562421f6a219564ece269"
Commit
87eb6d97
authored
May 15, 2023
by
alissonalbuquerque
Browse files
fix duplicacao de avaliacoes
parent
000d3c23
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/PadController.php
View file @
87eb6d97
...
@@ -465,20 +465,20 @@ class PadController extends Controller
...
@@ -465,20 +465,20 @@ class PadController extends Controller
//
//
//- - - Correção - - -
//- - - Correção - - -
//
$tarefaIds = Avaliacao::whereType(AvaliacaoUtil::ENSINO_AULA)->get()->map(function($model) {
$tarefaIds
=
Avaliacao
::
whereType
(
AvaliacaoUtil
::
ENSINO_AULA
)
->
get
()
->
map
(
function
(
$model
)
{
//
return $model->tarefa_id;
return
$model
->
tarefa_id
;
//
});
});
//
foreach($tarefaIds as $tarefaId)
foreach
(
$tarefaIds
as
$tarefaId
)
//
{
{
//
$avas = Avaliacao::whereType(AvaliacaoUtil::ENSINO_AULA)->whereTarefaId($tarefaId)->get();
$avas
=
Avaliacao
::
whereType
(
AvaliacaoUtil
::
ENSINO_AULA
)
->
whereTarefaId
(
$tarefaId
)
->
get
();
//
if(count($avas) == 2) {
if
(
count
(
$avas
)
==
2
)
{
//
$ava = Avaliacao::whereType(AvaliacaoUtil::ENSINO_AULA)->whereTarefaId($tarefaId)->first();
$ava
=
Avaliacao
::
whereType
(
AvaliacaoUtil
::
ENSINO_AULA
)
->
whereTarefaId
(
$tarefaId
)
->
first
();
//
$ava->type = 23;
$ava
->
type
=
23
;
//
$ava->save();
$ava
->
save
();
//
}
}
//
}
}
//- - - Correção - - -
//- - - Correção - - -
}
}
...
...
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