Back to Plans
@if($plan->program && $plan->program->department)
{{ $plan->program->department->department_name_en }} {{ $plan->program->department->department_name_ar }}
@endif

{{ $plan->plan_name }}

Courses in this plan @if($plan->program) · Program: {{ $plan->program->program_name }} @endif

@php // Top totals count only real-level courses plus the required elective credits, // NOT the elective pool option courses (those are listed at the bottom for reference). $mandatoryCourses = $grouped->reject(function ($courses, $levelId) use ($electiveLevelIds) { return $electiveLevelIds->contains($levelId); })->flatten(1); $totalCourses = $mandatoryCourses->count() + $electives->flatten(1)->count(); $totalCredits = $mandatoryCourses->sum('credit_hours') + $electives->flatten(1)->sum('elective_credit'); $levelIds = $grouped->keys()->merge($electives->keys())->unique()->sort()->values(); @endphp
{{ $totalCourses }} {{ Str::plural('Course', $totalCourses) }}
{{ $totalCredits }} Credit {{ Str::plural('Hour', $totalCredits) }}
Export to XLSX
@if($levelIds->isEmpty())

No courses found

This plan does not have any courses assigned yet.

@else
@foreach($levelIds as $levelId) @php $levelCourses = $grouped->get($levelId, collect()); $levelElectives = $electives->get($levelId, collect()); $levelCredits = $levelCourses->sum('credit_hours') + $levelElectives->sum('elective_credit'); $isElectivePool = $electiveLevelIds->contains($levelId); @endphp

{{ optional($levels->get($levelId))->level_name ?? 'Level '.$levelId }}

@if($isElectivePool) Elective Options · not counted in total @endif
{{ $levelCourses->count() }} {{ Str::plural('Course', $levelCourses->count()) }} @if($levelElectives->count()) {{ $levelElectives->count() }} {{ Str::plural('Elective', $levelElectives->count()) }} @endif {{ $levelCredits }} Credit {{ Str::plural('Hour', $levelCredits) }}
@foreach($levelCourses as $course) @endforeach @foreach($levelElectives as $elective) @endforeach
Code Name Coordinator Hours Type
{{ $course->course_code }}
{{ $course->course_name_en }}
{{ $course->course_name_ar }}
@if($course->coordinator)
{{ $course->coordinator->teacher_name_en }}
{{ $course->coordinator->teacher_name_ar }}
@else @endif
{{ $course->credit_hours }}
@if($course->is_practical) Practical @endif @if($course->is_general) General @endif @if(!$course->is_practical && !$course->is_general) @endif
{{ $elective->elective_level }}
Elective requirement
{{ $elective->elective_credit }} Elective
@endforeach
@endif