Unverified Commit 56111263 authored by Antônio Durval's avatar Antônio Durval Committed by GitHub
Browse files

Merge pull request #927 from antonioDurval/master

Correção da listagem dos avaliadores de trabalhos
parents 4cf7a411 83009ce6
......@@ -93,14 +93,14 @@ class AvaliadorController extends Controller
} else {
foreach ($aval->trabalhos->where('evento_id',$evento->id) as $trab){
if($aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->orderBy('created_at','DESC')->first()->acesso == 2
|| $aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->orderBy('created_at','DESC')->first()->acesso == 3 ||
($aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->orderBy('created_at','DESC')->first()->acesso == null && $aval->tipo == "Interno")){
if($aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->wherePivot('acesso', 2)->orderBy('created_at','DESC')->first()
|| $aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->wherePivot('acesso', 3)->orderBy('created_at','DESC')->first() ||
($aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->wherePivot('acesso', null)->orderBy('created_at','DESC')->first() && $aval->tipo == "Interno")){
array_push($trabalhosIn,$aval->trabalhos()->where("trabalho_id",$trab->id)->first());
}
if ($aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->orderBy('created_at','DESC')->first()->acesso == 1 ||
$aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->orderBy('created_at','DESC')->first()->acesso == 3 ||
($aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->orderBy('created_at','DESC')->first()->acesso == null && $aval->tipo == "Externo")){
if ($aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->wherePivot('acesso', 1)->orderBy('created_at','DESC')->first() ||
$aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->wherePivot('acesso', 3)->orderBy('created_at','DESC')->first() ||
($aval->trabalhos()->where("trabalho_id",$trab->id)->wherePivot('avaliador_id', $aval->id)->wherePivot('acesso', null)->orderBy('created_at','DESC')->first() && $aval->tipo == "Externo")){
array_push($trabalhosEx,$aval->trabalhos()->where("trabalho_id",$trab->id)->first());
}
}
......
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