@extends('task.layout') @section('content')

ルーブリック一覧

@foreach ($rubrics as $rubric)
{{ $rubric->title }}
@php $levels = explode(',', $rubric->level); @endphp @foreach ($levels as $level) @php $cleanlevel = trim($level, '"'); @endphp @if ((int)$cleanlevel === 0) @else @endif @endforeach @foreach ($rubric->criteria as $criterion) @foreach ($criterion->performance as $p) @endforeach @if ($childRubrics->has($criterion->id)) @endif @endforeach
観点{{ $cleanlevel }}{{ $cleanlevel }}
@php // 該当の親観点に子ルーブリックはあるか? $hasChildren = $childRubrics->has($criterion->id); // 子ルーブリックのどれか1つでも criteria が1件以上あるか? $hasChecklist = $hasChildren && $childRubrics[$criterion->id]->contains(function ($r) { return $r->criteria && $r->criteria->isNotEmpty(); }); @endphp @if ($hasChecklist) @else {{ $criterion->item }} @endif {{ $p->descriptor }}
@endforeach
@endsection @push('scripts') @endpush