@extends('student.layouts.app') @section('title', app()->getLocale() === 'ar' ? 'نتيجة الاختبار' : 'Exam Result') @section('content') @php $isArabic = app()->getLocale() === 'ar'; $pct = $attempt->max_score > 0 ? round(($attempt->final_score / $attempt->max_score) * 100) : 0; $passed = $pct >= 50; @endphp
{{ $passed ? ($isArabic ? 'ناجح' : 'Passed') : ($isArabic ? 'راسب' : 'Failed') }}
{{ $pct }}%
{{ $attempt->final_score }} / {{ $attempt->max_score }} {{ $isArabic ? 'درجة' : 'pts' }}
@if($attempt->status === 'submitted'){{ $isArabic ? 'بعض الأسئلة تنتظر مراجعة المعلم' : 'Some answers pending teacher review' }}
@endif{{ $attempt->auto_score }}
{{ $isArabic ? 'درجات تلقائية' : 'Auto Score' }}
{{ $attempt->time_spent_seconds ? gmdate('i:s', $attempt->time_spent_seconds) : '—' }}
{{ $isArabic ? 'الوقت المستغرق' : 'Time Spent' }}
{{ $responses->count() }}
{{ $isArabic ? 'أسئلة أجبت عنها' : 'Answered' }}
{{ $q->prompt }}
@if($resp) {{ $resp->final_score }}/{{ $sq->points }} @endif{{ $isArabic ? 'الإجابة الصحيحة:' : 'Correct:' }} {{ $q->model_answer }}
@endif @if($resp?->teacher_feedback){{ $resp->teacher_feedback }}
@endif