@extends('template.app') @section('content')

Students Follow Up

{{--
Free Bootstrap 4 Admin Dashboard
--}}
@if (session('status')) @endif @if (session('error')) @endif

Data Students

@method('delete') @csrf {{-- @if (Auth::guard('teacher')->check() == true) @endif --}} @foreach ($students as $item) @php $score1 = DB::table('student_scores') ->join('student_score_details', 'student_score_details.student_score_id', 'student_scores.id') ->select('student_scores.*', 'student_score_details.score as score_test', 'student_score_details.test_item_id') ->where('student_id', $item->student_id) ->where('price_id', $item->old_price_id) ->where('test_id', 1) ->first(); $score2 = DB::table('student_scores') ->join('student_score_details', 'student_score_details.student_score_id', 'student_scores.id') ->select('student_scores.*', 'student_score_details.score as score_test', 'student_score_details.test_item_id') ->where('student_id', $item->student_id) ->where('price_id', $item->old_price_id) ->where('test_id', 2) ->first(); $score3 = DB::table('student_scores') ->join('student_score_details', 'student_score_details.student_score_id', 'student_scores.id') ->select('student_scores.*', 'student_score_details.score as score_test', 'student_score_details.test_item_id') ->where('student_id', $item->student_id) ->where('price_id', $item->old_price_id) ->where('test_id', 3) ->first(); // modify to get class $class_nya = $item->class->program; $day1_nya = $item->day1; $day2_nya = $item->day2; $course_time_nya = $item->course_time; // modify // Convert full day names to their abbreviations $day1_nya = substr($day1_nya, 0, 3); // Fri $day2_nya = substr($day2_nya, 0, 3); // Mon $modify_class = $class_nya . ' ' . $day1_nya . ' ' . $day2_nya . ' On ' . $course_time_nya; $order_reviews_nya = DB::table('order_reviews') ->where('id_teacher', $item->old_teacher_id) ->where('class', $modify_class) ->where('test_id', '3') ->where('type', 'test') ->get(); $order_reviews_nya = $order_reviews_nya->toArray(); @endphp {{-- @if (Auth::guard('teacher')->check() == true) @endif --}} {{-- --}} @endforeach
ID Student Name Previous Class Previous Schedule Previous Teacher Final TestFailed PassAction
{{ $item->student_id }} {{ ucwords($item->student->name) }} {{ $item->class->program }} {{ $item->day1 . '-' . $item->day2 . '/' . $item->course_time }} {{ $item->teacher->name }} @if ($order_reviews_nya != null) {{ Carbon\Carbon::parse($order_reviews_nya[0]->due_date)->format('d M Y') }}
@else empty @endif
@if (Auth::guard('staff')->check() == true) {{-- --}} Edit @endif @if (Auth::guard('teacher')->check() == true) @endif
@if (Auth::guard('teacher')->check() == true)
@endif
{{--
@method('delete') @csrf
--}}
@endsection