@extends('template.app') @section('content')
@if (session('status')) @endif @if (session('success')) @endif

List Student

@foreach ($testItem as $itemTest) @endforeach @php $no = 1; @endphp @foreach ($students as $itemSKey => $itemSValue) @php $average = DB::table('student_scores') ->where('student_id', $itemSValue->id) ->where('price_id', $itemSValue->priceid) ->where('test_id', Request::get('test')) ->orderBy('id', 'ASC') ->limit(1) ->first(); @endphp @foreach ($testItem as $itemTestKey => $itemTestValue) @php $detail = null; if ($average != null) { $detail = DB::table('student_score_details'); $detail = $detail->where('student_score_id', $average->id); $detail = $detail->where('test_item_id', $itemTestValue->id)->first(); } @endphp @endforeach @endforeach
No Name{{ $itemTest->name }}Average Grade Comment For Student Date Test Date Time Action
{{ $no++ }} {{ ucwords($itemSValue->name) }}{{ $detail != null ? $detail->score : '-' }}{{ $average != null ? $average->average_score : '-' }} {{ $average != null ? Helper::getGrade($average->average_score) : '' }} {{ $average != null ? $average->comment : '-' }} {{ $average != null ? $average->date : '-' }} {{ $average != null ? $average->created_at : '-' }} @if ($average != null) Edit @else Create @endif
{{-- @endif --}}
@endsection