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

ルーブリック名 / 項目名

{{ $task->context_title }} {{ $task->title }} 他者評価一覧

評価者: {{ $user->display_name }}
{{-- 左側: 条件情報ブロック --}}
条件情報(集計情報として何を表示するか検討要
評価数:{{ is_iterable($reviewedids ?? []) ? count($reviewedids) : 0 }}
良い点(平均文字数、最大文字数)/改善点(平均文字数、最大文字数)
{{-- 右側: ルーブリック一覧ボタン --}}
ルーブリック一覧
{{-- ===== メイン表 ===== --}}
他者評価一覧
{{-- データ準備 --}} @php $labels = $rubricitems ?? collect(); $rowCount = is_countable($labels) ? count($labels) : 0; // 被評価者リスト $reviewedList = collect([ (object)['id' => 'avg', 'display_name' => '平均', 'type' => 'point'], ]); foreach(($reviewedids ?? []) as $id) { $reviewed = $otherReviews[$id]; $reviewedList->push((object)[ 'id' => $id, 'display_name' => $reviewed['display_name'], 'type' => 'reviewed' ]); } @endphp {{-- === 行列切替前の表 === --}}
{{-- 各被評価者列(display_name をヘッダに) --}} @foreach(($reviewedids) as $id) @php $reviewed = $otherReviews[$id]; @endphp @endforeach @for($i = 0; $i < $rowCount; $i++) @php // 最後の行 (i = rowCount - 1) の場合にのみ bd-thick-bottom クラスを追加 $lastRowClass = ($i === $rowCount-1) ? 'bd-thick-bottom' : ''; @endphp {{-- 平均 --}} @php $avg = $averagepoint[$i] ?? null; @endphp {{-- 各被評価者 --}} @foreach(($reviewedids ?? []) as $rid) @php $pt = $reviewedPoints[$rid][$i] ?? null; @endphp @endforeach @endfor {{-- コメント --}} @for($i = 0; $i < count($commentTitles); $i++) @foreach(($reviewedids ?? []) as $rid) @php $comment = null; foreach(($otherComments ?? []) as $c) { if ($c->reviewed_id === $rid && $c->comment_name_id === $commentTitles[$i]->id && isset($c->comment)) { $comment = $c->comment; break; } } @endphp @endforeach @endfor
No. 評価指標 平均 {{ $reviewed['display_name'] }}
{{ $i }} {{-- 0行目:ルーブリック名、以降:指標 --}} @if($i === 0) {{ $labels[$i] ?? '' }} @else {{ $labels[$i] ?? '' }} @endif {{ isset($avg) ? number_format($avg, 1) : '—' }} {{ is_numeric($pt) ? $pt : '—' }}
{{ $commentTitles[$i]->title }} @php $totalLength = 0; $count = 0; foreach(($otherComments ?? []) as $comment) { if ($comment->comment_name_id === $commentTitles[$i]->id && isset($comment->comment)) { $totalLength += mb_strlen($comment->comment); $count++; } } $avgLength = ($count > 0) ? round($totalLength / $count) : null; @endphp {{ isset($avgLength) ? $avgLength . '文字' : '—' }} {{ isset($comment) ? mb_strlen($comment) . '文字' : '—' }}
{{-- === 行列を切り替えた表 === --}}
※ 評価者が評価した被評価者または被評価グループ一覧が表示される
※ 被評価者名をクリックすると、評価結果の詳細へ
戻る
@endsection @push('scripts') @endpush