@extends('admin.layout.app') @section('body')

{{ $course->title }}

{{ $course->semester->name ?? '—' }} {{ __('admin.code') }}: {{ $course->code ?? '—' }} {{ __('admin.credit') }}: {{ $course->credit_hours ?? '—' }}
{{ __('admin.id_2') }} {{ $course->id }}
{{ __('admin.semester_3') }} {{ $course->semester->name ?? '—' }}
{{ __('admin.code_2') }} {{ $course->code ?? '—' }}
{{ __('admin.credit_hours_2') }} {{ $course->credit_hours ?? '—' }}
Information
{!! $course->information ? nl2br(e($course->information)) : 'No information added yet.' !!}

{{ __('admin.back_to_list') }} {{ __('admin.assign_teachers_n_a') }} {{ __('admin.materials_n_a') }} {{ __('admin.enter_marks') }} @if($course->semester_id) {{ __('admin.view_semester_results') }} @endif
@php $totalResultsEntered = \App\Models\StudentCourseResult::where('course_id', $course->id)->count(); $totalExpected = \App\Models\CourseEnrollment::where('course_id', $course->id) ->where('status', 'active') ->count(); $percentage = $totalExpected ? round(($totalResultsEntered / $totalExpected) * 100) : 0; @endphp
{{ __('admin.marks_entry_status') }} @if($totalResultsEntered > 0) {{ $totalResultsEntered }} / {{ $totalExpected }} student results saved ({{ $percentage }}%) @if($percentage < 100) {{ __('admin.incomplete') }} @else {{ __('admin.complete') }} @endif @else No marks entered yet. @endif
@endsection