@extends('admin::layouts.plane') @section('content')

Students Enrolled in {{ $course->course_name }}

{{ Form::open(['method' => 'GET', 'id' => 'searchForm']) }} {{ Form::select('sort_by', ['first_name' => 'Sorted By Name', 'admission_no' => 'Sorted By UID'], Request::input('sort_by', 'first_name'), ['class' => 'form-control search', 'id' => 'sort_by', 'placeholder' => 'Sort By']) }} {{ Form::close() }} Dashboard

Code: {{ $course->course_code }}

Type: {{ $course->course_type }}

Scheme: {{ $course->scheme_name }}

Teacher: {{ $course->teacher_name }}

@php $course_category = $course->course_category; $alowed_types = []; if ($course_category == 'theory') { if (!empty($course->internal)) { $alowed_types['internal'] = 'Theory Internal'; } if (!empty($course->mcq)) { $alowed_types['mcq'] = 'MCQ'; } } if ($course_category == 'practical') { if (!empty($course->practical)) { $alowed_types['partical_internal'] = 'Partical Internal'; } } @endphp @foreach ($alowed_types as $type => $type_name) @endforeach @foreach ($students as $student) @foreach ($alowed_types as $type => $type_name) @php $absent_field = $type . '_absent'; $marks_field = $type; @endphp @endforeach @endforeach
UID Name Class{{ $type_name }} ({{ $course->$type }})
{{ $student->uid }} {{ $student->name }} {{ $student->class_name }} @if (isset($student->$absent_field) && $student->$absent_field) Ab @else @if (!isset($student->$marks_field) || $student->$marks_field === null) NA @else {{ $student->$marks_field }} @endif @endif
@endsection