Mata Kuliah | CPL 1 | CPL 2 | CPL 3 | CPL 4 | CPL 5 | CPL 6 | CPL 7 | CPL 8 | CPL 9 | CPL 10 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ $nilai->mks->mkk->kode }} - {{ $nilai->mks->mkk->nama }} | @php $cplId1 = $cpls->where('nomor', 1)->first()->id; @endphp @if($nilai->nilaiCpl->where('cpl_id', $cplId1)->first()){{ $nilai->nilaiCpl->where('cpl_id', $cplId1)->first()->nilai_angka }} | @else@endif @php $cplId2 = $cpls->where('nomor', 2)->first()->id; @endphp @if($nilai->nilaiCpl->where('cpl_id', $cplId2)->first()) | {{ $nilai->nilaiCpl->where('cpl_id', $cplId2)->first()->nilai_angka }} | @else@endif @php $cplId3 = $cpls->where('nomor', 3)->first()->id; @endphp @if($nilai->nilaiCpl->where('cpl_id', $cplId3)->first()) | {{ $nilai->nilaiCpl->where('cpl_id', $cplId3)->first()->nilai_angka }} | @else@endif @php $cplId4 = $cpls->where('nomor', 4)->first()->id; @endphp @if($nilai->nilaiCpl->where('cpl_id', $cplId4)->first()) | {{ $nilai->nilaiCpl->where('cpl_id', $cplId4)->first()->nilai_angka }} | @else@endif @php $cplId5 = $cpls->where('nomor', 5)->first()->id; @endphp @if($nilai->nilaiCpl->where('cpl_id', $cplId5)->first()) | {{ $nilai->nilaiCpl->where('cpl_id', $cplId5)->first()->nilai_angka }} | @else@endif @php $cplId6 = $cpls->where('nomor', 6)->first()->id; @endphp @if($nilai->nilaiCpl->where('cpl_id', $cplId6)->first()) | {{ $nilai->nilaiCpl->where('cpl_id', 6)->first()->nilai_angka }} | @else@endif @php $cplId7 = $cpls->where('nomor', 7)->first()->id; @endphp @if($nilai->nilaiCpl->where('cpl_id', $cplId7)->first()) | {{ $nilai->nilaiCpl->where('cpl_id', $cplId7)->first()->nilai_angka }} | @else@endif @php $cplId8 = $cpls->where('nomor', 8)->first()->id; @endphp @if($nilai->nilaiCpl->where('cpl_id', $cplId8)->first()) | {{ $nilai->nilaiCpl->where('cpl_id', $cplId8)->first()->nilai_angka }} | @else@endif @php $cplId9 = $cpls->where('nomor', 9)->first()->id; @endphp @if($nilai->nilaiCpl->where('cpl_id', $cplId9)->first()) | {{ $nilai->nilaiCpl->where('cpl_id', $cplId9)->first()->nilai_angka }} | @else@endif @php $cplId10 = $cpls->where('nomor', 10)->first()->id; @endphp @if($nilai->nilaiCpl->where('cpl_id', $cplId10)->first()) | {{ $nilai->nilaiCpl->where('cpl_id', $cplId10)->first()->nilai_angka }} | @else@endif |
Mata Kuliah | SKS | Semester | Kelas | Nilai Angka | Nilai Huruf | Outcome |
---|---|---|---|---|---|---|
{{ $nilai->mks->mkk->kode }} - {{ $nilai->mks->mkk->nama }} | {{ $nilai->mks->mkk->sks }} | {{ $nilai->semester }} | {{ $nilai->kelas }} | {{ $nilai->nilai_akhir_angka }} | {{ $nilai->nilai_akhir_huruf }} | {{ $nilai->outcome }} |
CPL | @foreach($mahasiswa->nilai->pluck('semester')->unique()->sort() as $semester)Semester {{ $semester }} | @endforeach
---|---|
CPL {{ $cpl->nomor }}
{{ $cpl->nama }}
|
@foreach($mahasiswa->nilai->pluck('semester')->unique()->sort() as $semester)
@php
$semesterNilai = $mahasiswa->nilai->where('semester', $semester);
$cplTotal = 0;
$cplCount = 0;
foreach($semesterNilai as $nilai) {
foreach($nilai->nilaiCpmk as $nilaiCpmk) {
foreach($nilaiCpmk->cpmk->cpmkCpl as $cpmkCpl) {
if($cpmkCpl->cpl_id == $cpl->id) {
$cplTotal += $nilaiCpmk->nilai_bobot;
$cplCount++;
}
}
}
}
$average = $cplCount > 0 ? round($cplTotal / $cplCount, 2) : null;
@endphp
@if($average !== null) {{ number_format($average, 2) }} @else - @endif | @endforeach