@if(count($papers)>0)

Total Paper : {{ count($papers) }}, Mark Inserted : {{ $resultCount }}

@if($resultCount> count($papers)) Delete Result @endif {{-- @foreach($papers as $paper)--}} @foreach($singleResult as $item) @php($paper = $item->paper) @endforeach @php($status = null) @php($sl = 0) @foreach($students as $studentClass) @php($student = $studentClass->student) @if($data->section_id==3) @php($status = subjectCheck($student->id,$data->class_id,$data->subject_id)) @else @php($status = true) @endif @if($status === true) @php($sl++) @php($totalMarkObtained = 0) {{-- @foreach($papers as $paper)--}} @foreach($singleResult as $item) @php($paper = $item->paper) @php($data->paper_id = $paper->id) @php($result = resultCheck($data,$student->id)) @php($totalMarkObtained += isset($result)? $result->mark : 0) @endforeach @endif @endforeach
Sl. Stdn. ID Name{{ $paper->name }}({{ $paper->mark }})Total({{ $totalMark = $papers->sum('mark') }}) Average(%) Grade
{{ $sl }} {{ $student->roll }} {{ $student->name }}{{ isset($result)? numberFormat($result->mark,2) : '' }}{{ numberFormat($totalMarkObtained,2) }} {{ $average = avearge($totalMarkObtained,$totalMark,2) }} {{ grade($average) }}
@else

Please select all field above to view result !!!

@endif