{{--
--}} @if ($student->priceid >= 1 && $student->priceid <= 2) @php $writing = (($score1 ? $writing1->score : $writing1) + ($score2 ? $writing2->score : $writing2) + ($score3 ? $writing3->score : $writing3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $speaking = (($score1 ? $speaking1->score : $speaking1) + ($score2 ? $speaking2->score : $speaking2) + ($score3 ? $speaking3->score : $speaking3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $reading = (($score1 ? $reading1->score : $reading1) + ($score2 ? $reading2->score : $reading2) + ($score3 ? $reading3->score : $reading3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $listening = (($score1 ? $listening1->score : $listening1) + ($score2 ? $listening2->score : $listening2) + ($score3 ? $listening3->score : $listening3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $average = ($average_score1 + $average_score2 + $average_score3) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); @endphp
{{ ucwords($student->name) }}
{{ ucwords($class->level) }}
{{ ucwords('Lie Citro Dewi Ruslie') }}
{{ ucwords($student->teacher->name) }}
{{ ucwords($student->date_certificate) }}
{{ round($writing) . ' (' . Helper::getGrade($writing) . ')' }}
{{ round($speaking) . ' (' . Helper::getGrade($speaking) . ')' }}
{{ round($reading) . ' (' . Helper::getGrade($reading) . ')' }}
{{ round($listening) . ' (' . Helper::getGrade($listening) . ')' }}
@elseif ($student->priceid >= 3 && $student->priceid <= 6) @php $writing = (($score1 ? $writing1->score : $writing1) + ($score2 ? $writing2->score : $writing2) + ($score3 ? $writing3->score : $writing3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $speaking = (($score1 ? $speaking1->score : $speaking1) + ($score2 ? $speaking2->score : $speaking2) + ($score3 ? $speaking3->score : $speaking3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $reading = (($score1 ? $reading1->score : $reading1) + ($score2 ? $reading2->score : $reading2) + ($score3 ? $reading3->score : $reading3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $listening = (($score1 ? $listening1->score : $listening1) + ($score2 ? $listening2->score : $listening2) + ($score3 ? $listening3->score : $listening3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $average = ($average_score1 + $average_score2 + $average_score3) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); @endphp
{{ ucwords($student->name) }}
{{ ucwords($class->level) }}
{{ ucwords('Lie Citro Dewi Ruslie') }}
{{ ucwords($student->teacher->name) }}
{{ ucwords($student->date_certificate) }}
{{ round($writing) . ' (' . Helper::getGrade($writing) . ')' }}
{{ round($speaking) . ' (' . Helper::getGrade($speaking) . ')' }}
{{ round($reading) . ' (' . Helper::getGrade($reading) . ')' }}
{{ round($listening) . ' (' . Helper::getGrade($listening) . ')' }}
@else
{{ ucwords($student->name) }}
{{ ucwords($class->level) }}
{{ ucwords('Lie Citro Dewi Ruslie') }}
{{ ucwords($student->teacher->name) }}
{{ $student->date_certificate }}
@php $writing = (($score1 ? $writing1->score : $writing1) + ($score2 ? $writing2->score : $writing2) + ($score3 ? $writing3->score : $writing3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $speaking = (($score1 ? $speaking1->score : $speaking1) + ($score2 ? $speaking2->score : $speaking2) + ($score3 ? $speaking3->score : $speaking3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $reading = (($score1 ? $reading1->score : $reading1) + ($score2 ? $reading2->score : $reading2) + ($score3 ? $reading3->score : $reading3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $listening = (($score1 ? $listening1->score : $listening1) + ($score2 ? $listening2->score : $listening2) + ($score3 ? $listening3->score : $listening3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $grammar = (($score1 ? $grammar1->score : $grammar1) + ($score2 ? $grammar2->score : $grammar2) + ($score3 ? $grammar3->score : $grammar3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $vocabulary = (($score1 ? $vocabulary1->score : $vocabulary1) + ($score2 ? $vocabulary2->score : $vocabulary2) + ($score3 ? $vocabulary3->score : $vocabulary3)) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); $average = ($average_score1 + $average_score2 + $average_score3) / (($score1 ? 1 : 0) + ($score2 ? 1 : 0) + ($score3 ? 1 : 0)); @endphp
{{ round($writing) . ' (' . Helper::getGrade($writing) . ')' }}
{{ round($speaking) . ' (' . Helper::getGrade($speaking) . ')' }}
{{ round($reading) . ' (' . Helper::getGrade($reading) . ')' }}
{{ round($listening) . ' (' . Helper::getGrade($listening) . ')' }}
{{ round($grammar) . ' (' . Helper::getGrade($grammar) . ')' }}
{{ round($vocabulary) . ' (' . Helper::getGrade($vocabulary) . ')' }}
{{ round($average) . ' (' . Helper::getGrade($average) . ')' }}
@endif {{--
--}}