@if ($list_items) @foreach ($list_items as $list_item) @php $limit = $list_item->questions_limit ?? 0; $currentCount = $list_item->total_questions; $remaining = max($limit - $currentCount, 0); // prevent negative values @endphp Quiz ID:
#{{ $list_item->id }}
@if($list_item->material && $list_item->material->course) {{ $list_item->material->course->title }} @endif {{ $list_item->created_at->format('d-m-Y, g:i A') }}
{{ $list_item->title }}
@if($list_item->description) {{ Str::limit($list_item->description, 100) }} @endif
{{ $list_item->total_questions }} questions (limit: {{ $list_item->questions_limit }}, @if ($remaining != 0) Remains: {{ $remaining }} @else Full @endif) @if($list_item->time_limit) {{ $list_item->time_limit }} min @endif @if($list_item->attempts) {{ $list_item->attempts }} attempts @endif
Pass: {{ $list_item->pass_score }}%
Max: {{ $list_item->max_score }}
+{{ $list_item->mark_correct }} -{{ $list_item->mark_wrong }}
Active @include('admin.crud.action-dropdown', [ 'cloneUrl' => route('admin.quizzes.clone', $list_item->id), 'cloneTitle' => 'Clone Quiz', 'editUrl' => route('admin.quizzes.edit', $list_item->id), 'editTitle' => 'Update Quiz', 'viewUrl' => route('admin.quizzes.show', $list_item->id), 'viewTitle' => 'View Quiz', 'deleteUrl' => route('admin.quizzes.destroy', $list_item->id), 'redirectUrl' => route('admin.quizzes.index'), 'customActions' => [ [ 'url' => route('admin.quizzes.attempts', $list_item->id), 'title' => 'View Attempts', 'icon' => 'mdi mdi-account-group' ], [ 'url' => route('admin.quizzes.stats', $list_item->id), 'title' => 'Statistics', 'icon' => 'mdi mdi-chart-line' ] ] ]) @endforeach @endif