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

Dashboard

Dashboard
@if (session('message')) @endif

Test History

{{--
--}}

@if (Request::get('student')) @php $testItem = DB::table('test_items')->get(); $studentScore = DB::table('student_scores') ->select('student_scores.*', 'student.name', 'tests.name as test_name', 'price.program as class', 'teacher.name as teacher_name') ->join('student', 'student.id', 'student_scores.student_id') ->join('tests', 'tests.id', 'student_scores.test_id') ->join('price', 'price.id', 'student_scores.price_id') ->join('teacher', 'teacher.id', 'student.id_teacher') // ->where('date', Request::get('date')) ->where('student_id', Request::get('student')) ->get(); @endphp @if (count($studentScore) != 0)
@foreach ($testItem as $itemTest) @endforeach @php $no = 1; @endphp @foreach ($studentScore as $item) @foreach ($testItem as $itemTestKey => $itemTestValue) @php $detail = DB::table('student_score_details') ->where('student_score_id', $item->id) ->where('test_item_id', $itemTestValue->id) ->first(); @endphp @endforeach @endforeach
No Name Test Level Teacher{{ $itemTest->name }}Average Grade Comment For Student
{{ $no++ }} {{ $item->name }} {{ $item->test_name }} {{ $item->class }} {{ $item->teacher_name }}{{ $detail == null ? '-' : $detail->score }}{{ $item->average_score }} {{ Helper::getGrade($item->average_score) }} {{ $item->comment }}
@else
@foreach ($testItem as $itemTest) @endforeach @php $countTest = count($testItem) + 6; @endphp
No Name Test{{ $itemTest->name }}Average Grade Comment For Student

Data not found

@endif @endif
@endsection