Commit 000d3c23 authored by alissonalbuquerque's avatar alissonalbuquerque
Browse files

fix duplicacao de avaliacoes

parent 1abc2526
......@@ -465,20 +465,20 @@ class PadController extends Controller
//
//- - - Correção - - -
$tarefaIds = Avaliacao::whereType(AvaliacaoUtil::ENSINO_AULA)->get()->map(function($model) {
return $model->tarefa_id;
});
foreach($tarefaIds as $tarefaId)
{
$avas = Avaliacao::whereType(AvaliacaoUtil::ENSINO_AULA)->whereTarefaId($tarefaId)->get();
if(count($avas) == 2) {
$ava = Avaliacao::whereType(AvaliacaoUtil::ENSINO_AULA)->whereTarefaId($tarefaId)->first();
$ava->type = 23;
$ava->save();
}
}
// $tarefaIds = Avaliacao::whereType(AvaliacaoUtil::ENSINO_AULA)->get()->map(function($model) {
// return $model->tarefa_id;
// });
// foreach($tarefaIds as $tarefaId)
// {
// $avas = Avaliacao::whereType(AvaliacaoUtil::ENSINO_AULA)->whereTarefaId($tarefaId)->get();
// if(count($avas) == 2) {
// $ava = Avaliacao::whereType(AvaliacaoUtil::ENSINO_AULA)->whereTarefaId($tarefaId)->first();
// $ava->type = 23;
// $ava->save();
// }
// }
//- - - Correção - - -
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment