| # | Student | Total | Graded | Missed | Persantage | Progress |
|---|---|---|---|---|---|---|
| {{ ++$count }} | {{ $student->first_name }} {{ $student->middle_name }} {{ $student->last_name }} | {{ count($quizzes_grades) + count($assignments_grades) }} | @php $graded = 0; $missed = 0; $ratio = 0; $data_quiz = []; $data_homework = []; @endphp @foreach ($quizzes_grades as $quiz) @if (in_array($student->id, $quiz->attempts_quiz->pluck('id')->toArray())) @php $flag = $quiz->attempts_quiz->where('id', $student->id)->first()->pivot->attempts_remainder; if ($flag == $quiz->attempts) { $missed += 1; array_push($data_quiz, ' '); } elseif ($flag < $quiz->attempts) { $graded += 1; $ratio += $quiz->attempts_quiz->where('id', $student->id)->first()->pivot->ratio; $temp = $quiz->attempts_quiz->where('id', $student->id)->first()->pivot->ratio; array_push($data_quiz, $temp); } array_push($data_homework, null); @endphp @endif @endforeach @foreach ($assignments_grades as $assignment) @if (in_array($student->id, $assignment->attempts_assignment->pluck('id')->toArray())) @php $flag = $assignment->attempts_assignment->where('id', $student->id)->first()->pivot->attempts_remainder; if ($flag == $assignment->attempts) { $missed += 1; array_push($data_homework, ' '); } elseif ($flag < $assignment->attempts) { $graded += 1; $ratio += $assignment->attempts_assignment->where('id', $student->id)->first()->pivot->ratio; $temp = $assignment->attempts_assignment->where('id', $student->id)->first()->pivot->ratio; array_push($data_homework, $temp); } array_push($data_quiz, null); @endphp @endif @endforeach{{ $graded }} | {{ $missed }} | {{ $graded != 0 ? round($ratio / $graded, 2) : 0 }}% |
|
Displaying {{ $students->count() }} of {{ $students->total() }} student(s).
{{-- end:pagination --}}