{{-- Feedback for one session (Admin / Head of Operations only): how attendees answered each question (bars, with the "please explain" notes and written answers underneath), then every individual response. From SessionFeedbackController@session: $session (trainer), $feedback, $attended, $questions --}} @extends('layouts.app') @section('title', 'Session Feedback') @section('content') @include('partials.flash') @php use App\Support\SessionFeedbackForm as Form; $role = auth()->user()->primaryRole(); $n = $feedback->count(); $scores = $feedback->pluck('overall')->map(fn ($o) => Form::RATING_SCORE[$o] ?? null)->filter(); $avg = $scores->isEmpty() ? null : $scores->avg(); $bySection = collect($questions)->groupBy('section', true); @endphp arrow_back All session feedback
{{ $session->title }}
{{ $session->session_date->format('l, j F Y') }} · {{ $session->trainerName() ?? 'No trainer' }} · {{ $session->format === 'online' ? 'Online' : ($session->location ?: 'Face to face') }}
{{ $n }}/{{ $attended }}
responded
{{ $avg ? number_format($avg, 1) : '—' }}
rating / 4
{{ $n ? round($feedback->where('recommend', 'yes')->count() / $n * 100) : 0 }}%
would recommend
{{ $q['q'] }}
@if($q['type'] === 'choice') @php $counts = $feedback->map(fn ($f) => $f->answer($key))->filter()->countBy(); $answered = $counts->sum(); @endphp“{{ $f->answer($key) }}” — {{ $f->user->name }}
@emptyNo written answers.
@endforelse @endifOpen one to complete the management / quality review.