@extends('layouts.layoutMaster') @section('title', 'OMM-Print') @section('content')
| Question | --}}Level | Nascent | Stable | Maturing | Efficient | World Class |
|---|---|---|---|---|---|---|
| {{ $q->question_text }} | @foreach ($userAnswers as $userAnswer) @if ($q->type == 'radio') @foreach (json_decode($q->options) as $option){{ $option }} | @endforeach @endif @endforeach @if ($q->type == 'checkbox') @foreach (json_decode($q->options) as $option){{ $option }} | @endforeach @endif||||
|
@if ($q->type === 'text' || $q->type === 'textarea')
→ {{ $userAnswer->answer ?? 'No Answer' }} @elseif ($q->type === 'date')→ {{ $userAnswer->answer ?? 'No Answer' }} @elseif ($q->type === 'checkbox') {{-- @php $totalOptions = 5; // Total number of checkbox options $selectedValues = json_decode($userAnswer->answer); // User's selected answers (e.g., [1, 4]) // Ensure selected values are numeric and convert to zero-based index $selectedIndexes = array_map(function($value) use ($totalOptions) { return is_numeric($value) ? intval($value) - 1 : null; // Convert to zero-based index }, $selectedValues); // Filter out any null values (non-numeric) $selectedIndexes = array_filter($selectedIndexes); @endphp --}}{{-- --}} @elseif ($q->type === 'radio') |
||||||
Assessment Comments:
{{ $comment ?? '' }}