MATA PELAJARAN |
SEMESTER |
1 |
2 |
3 |
4 |
5 |
6 |
Kelompok A |
@php
$no = '1';
@endphp
@forelse ($kelompok_a as $item_a)
{{ $no++ }} |
{{ $item_a->nama_mapel }} |
{{ round($item_a->nilai_1) }} |
{{ round($item_a->nilai_2) }} |
{{ round($item_a->nilai_3) }} |
{{ round($item_a->nilai_4) }} |
{{ round($item_a->nilai_5) }} |
{{ round($item_a->nilai_6) }} |
@empty
Tidak Ada Data |
@endforelse
Kelompok B |
@forelse ($kelompok_b as $item_b)
{{ $no++ }} |
{{ $item_b->nama_mapel }} |
{{ round($item_b->nilai_1) }} |
{{ round($item_b->nilai_2) }} |
{{ round($item_b->nilai_3) }} |
{{ round($item_b->nilai_4) }} |
{{ round($item_b->nilai_5) }} |
{{ round($item_b->nilai_6) }} |
@empty
Tidak Ada Data |
@endforelse
Kelompok C (Peminatan) |
C1. Dasar Bidang Keahlian |
@forelse ($kelompok_c1 as $item_c1)
{{ $no++ }} |
{{ $item_c1->nama_mapel }} |
{{ round($item_c1->nilai_1) }} |
{{ round($item_c1->nilai_2) }} |
{{ round($item_c1->nilai_3) }} |
{{ round($item_c1->nilai_4) }} |
{{ round($item_c1->nilai_5) }} |
{{ round($item_c1->nilai_6) }} |
@empty
Tidak Ada Data |
@endforelse
C2. Dasar Program Keahlian |
@forelse ($kelompok_c2 as $item_c2)
{{ $no++ }} |
{{ $item_c2->nama_mapel }} |
{{ round($item_c2->nilai_1) }} |
{{ round($item_c2->nilai_2) }} |
{{ round($item_c2->nilai_3) }} |
{{ round($item_c2->nilai_4) }} |
{{ round($item_c2->nilai_5) }} |
{{ round($item_c2->nilai_6) }} |
@empty
Tidak Ada Data |
@endforelse
C3. Paket Keahlian |
@forelse ($kelompok_c3 as $item_c3)
{{ $no++ }} |
{{ $item_c3->nama_mapel }} |
{{ round($item_c3->nilai_1) }} |
{{ round($item_c3->nilai_2) }} |
{{ round($item_c3->nilai_3) }} |
{{ round($item_c3->nilai_4) }} |
{{ round($item_c3->nilai_5) }} |
{{ round($item_c3->nilai_6) }} |
@empty
Tidak Ada Data |
@endforelse
NO |
MATA PELAJARAN |
NILAI RATA-RATA RAPOR |
NILAI UJIAN SEKOLAH |
Muatan Nasional |
@php
$no = '1';
$total_a = '0';
$total_ra = '0';
$total_b = '0';
$total_rb = '0';
$total_c1 = '0';
$total_rc1 = '0';
$total_c3 = '0';
$total_rata_c3 = '0';
$total_rc3 = '0';
@endphp
@forelse ($ijazah_a as $item_a)
@php
$rapor_a = DB::table('nilais')->SELECT('nilai_1','nilai_2','nilai_3','nilai_4','nilai_5','nilai_6')
->JOIN('mapeljurusans','nilais.mapeljurusan_id','=','mapeljurusans.id')->where('siswa_id', $item_a->siswa_id)
->where('jurusan_id', $item_a->jurusan_id)->where('mapel_id', $item_a->mapel_id)->first();
if ($rapor_a->nilai_1>0) { $nilai_ra1 = 1; } else { $nilai_ra1 = 0; }
if ($rapor_a->nilai_2>0) { $nilai_ra2 = 1; } else { $nilai_ra2 = 0; }
if ($rapor_a->nilai_3>0) { $nilai_ra3 = 1; } else { $nilai_ra3 = 0; }
if ($rapor_a->nilai_4>0) { $nilai_ra4 = 1; } else { $nilai_ra4 = 0; }
if ($rapor_a->nilai_5>0) { $nilai_ra5 = 1; } else { $nilai_ra5 = 0; }
if ($rapor_a->nilai_6>0) { $nilai_ra6 = 1; } else { $nilai_ra6 = 0; }
$count_rapor_a = $nilai_ra1+$nilai_ra2+$nilai_ra3+$nilai_ra4+$nilai_ra5+$nilai_ra6;
$sum_rapor_a = $rapor_a->nilai_1+$rapor_a->nilai_2+$rapor_a->nilai_3+$rapor_a->nilai_4+$rapor_a->nilai_5+
$rapor_a->nilai_6;
$rata_a = $sum_rapor_a/$count_rapor_a;
$total_ra = $total_ra + round($rata_a);
$total_a = $total_a + $item_a->nilai;
@endphp
{{ $no++ }} |
{{ $item_a->nama_mapel }} |
{{ round($rata_a) }} |
{{ round($item_a->nilai) }} |
@empty
Tidak Ada Data |
@endforelse
Muatan Kewilayahan |
@forelse ($ijazah_b as $item_b)
@php
$rapor_b = DB::table('nilais')->SELECT('nilai_1','nilai_2','nilai_3','nilai_4','nilai_5','nilai_6')
->JOIN('mapeljurusans','nilais.mapeljurusan_id','=','mapeljurusans.id')->where('siswa_id', $item_b->siswa_id)
->where('jurusan_id', $item_b->jurusan_id)->where('mapel_id', $item_b->mapel_id)->first();
if ($rapor_b->nilai_1>0) { $nilai_rb1 = 1; } else { $nilai_rb1 = 0; }
if ($rapor_b->nilai_2>0) { $nilai_rb2 = 1; } else { $nilai_rb2 = 0; }
if ($rapor_b->nilai_3>0) { $nilai_rb3 = 1; } else { $nilai_rb3 = 0; }
if ($rapor_b->nilai_4>0) { $nilai_rb4 = 1; } else { $nilai_rb4 = 0; }
if ($rapor_b->nilai_5>0) { $nilai_rb5 = 1; } else { $nilai_rb5 = 0; }
if ($rapor_b->nilai_6>0) { $nilai_rb6 = 1; } else { $nilai_rb6 = 0; }
$count_rapor_b = $nilai_rb1+$nilai_rb2+$nilai_rb3+$nilai_rb4+$nilai_rb5+$nilai_rb6;
$sum_rapor_b = $rapor_b->nilai_1+$rapor_b->nilai_2+$rapor_b->nilai_3+$rapor_b->nilai_4+$rapor_b->nilai_5+
$rapor_b->nilai_6;
$rata_b = $sum_rapor_b/$count_rapor_b;
$total_rb = $total_rb + round($rata_b);
$total_b = $total_b + $item_b->nilai;
@endphp
{{ $no++ }} |
{{ $item_b->nama_mapel }} |
{{ round($rata_b) }} |
{{ round($item_b->nilai) }} |
@empty
Tidak Ada Data |
@endforelse
Muatan Peminatan Kejuruan |
@forelse ($ijazah_c1 as $item_c1)
@php
$rapor_c1 = DB::table('nilais')->SELECT('nilai_1','nilai_2','nilai_3','nilai_4','nilai_5','nilai_6')
->JOIN('mapeljurusans','nilais.mapeljurusan_id','=','mapeljurusans.id')->where('siswa_id', $item_c1->siswa_id)
->where('jurusan_id', $item_c1->jurusan_id)->where('mapel_id', $item_c1->mapel_id)->first();
if ($rapor_c1->nilai_1>0) { $nilai_rc11 = 1; } else { $nilai_rc11 = 0; }
if ($rapor_c1->nilai_2>0) { $nilai_rc12 = 1; } else { $nilai_rc12 = 0; }
if ($rapor_c1->nilai_3>0) { $nilai_rc13 = 1; } else { $nilai_rc13 = 0; }
if ($rapor_c1->nilai_4>0) { $nilai_rc14 = 1; } else { $nilai_rc14 = 0; }
if ($rapor_c1->nilai_5>0) { $nilai_rc15 = 1; } else { $nilai_rc15 = 0; }
if ($rapor_c1->nilai_6>0) { $nilai_rc16 = 1; } else { $nilai_rc16 = 0; }
$count_rapor_c1 = $nilai_rc11+$nilai_rc12+$nilai_rc13+$nilai_rc14+$nilai_rc15+$nilai_rc16;
$sum_rapor_c1 = $rapor_c1->nilai_1+$rapor_c1->nilai_2+$rapor_c1->nilai_3+$rapor_c1->nilai_4+$rapor_c1->nilai_5+
$rapor_c1->nilai_6;
$rata_c1 = $sum_rapor_c1/$count_rapor_c1;
$total_rc1 = $total_rc1 + round($rata_c1);
$total_c1 = $total_c1 + $item_c1->nilai;
@endphp
{{ $no++ }} |
{{ $item_c1->nama_mapel }} |
{{ round($rata_c1) }} |
{{ round($item_c1->nilai) }} |
@empty
Tidak Ada Data |
@endforelse
@forelse ($ijazah_c3 as $item_c3)
@php
if ($item_c3->mapel_id==82) {
$jenis_mapel = "C2";
} else {
$jenis_mapel = "C3";
}
$count_c3 = DB::table('nilais')->JOIN('mapeljurusans','nilais.mapeljurusan_id','=','mapeljurusans.id')
->JOIN('mapels','mapeljurusans.mapel_id','=','mapels.id')->where('siswa_id', $item_c3->siswa_id)
->where('jurusan_id', $item_c3->jurusan_id)->where('jenis_mapel', $jenis_mapel)->get()->count();
$rapor_c3 = DB::table('nilais')->SELECT(
DB::raw('
sum(nilai_1) as sum_nilai_1,
sum(nilai_2) as sum_nilai_2,
sum(nilai_3) as sum_nilai_3,
sum(nilai_4) as sum_nilai_4,
sum(nilai_5) as sum_nilai_5,
sum(nilai_6) as sum_nilai_6
'))
->JOIN('mapeljurusans','nilais.mapeljurusan_id','=','mapeljurusans.id')
->JOIN('mapels','mapeljurusans.mapel_id','=','mapels.id')->where('siswa_id', $item_c3->siswa_id)
->where('jurusan_id', $item_c3->jurusan_id)->where('jenis_mapel', $jenis_mapel)->first();
if ($rapor_c3->sum_nilai_1>0) { $nilai_rc31 = 1; } else { $nilai_rc31 = 0; }
if ($rapor_c3->sum_nilai_2>0) { $nilai_rc32 = 1; } else { $nilai_rc32 = 0; }
if ($rapor_c3->sum_nilai_3>0) { $nilai_rc33 = 1; } else { $nilai_rc33 = 0; }
if ($rapor_c3->sum_nilai_4>0) { $nilai_rc34 = 1; } else { $nilai_rc34 = 0; }
if ($rapor_c3->sum_nilai_5>0) { $nilai_rc35 = 1; } else { $nilai_rc35 = 0; }
if ($rapor_c3->sum_nilai_6>0) { $nilai_rc36 = 1; } else { $nilai_rc36 = 0; }
$count_rapor_c3 = $nilai_rc31+$nilai_rc32+$nilai_rc33+$nilai_rc34+$nilai_rc35+$nilai_rc36;
if ($item_c3->jurusan_id == 4) {
if ($item_c3->mapel_id==82) {
$sum_rapor_c3 = $rapor_c3->sum_nilai_1/$count_c3+$rapor_c3->sum_nilai_2/$count_c3+
$rapor_c3->sum_nilai_3/$count_c3+$rapor_c3->sum_nilai_4/$count_c3+
$rapor_c3->sum_nilai_5/$count_c3+$rapor_c3->sum_nilai_6/$count_c3;
} else {
$sum_rapor_c3 = $rapor_c3->sum_nilai_1/3+$rapor_c3->sum_nilai_2/3+$rapor_c3->sum_nilai_3/3+
$rapor_c3->sum_nilai_4/3+$rapor_c3->sum_nilai_5/3+$rapor_c3->sum_nilai_6/3;
}
} elseif ($item_c3->jurusan_id == 5) {
if ($item_c3->mapel_id==82) {
$sum_rapor_c3 = $rapor_c3->sum_nilai_1/$count_c3+$rapor_c3->sum_nilai_2/$count_c3+
$rapor_c3->sum_nilai_3/$count_c3+$rapor_c3->sum_nilai_4/$count_c3+
$rapor_c3->sum_nilai_5/$count_c3+$rapor_c3->sum_nilai_6/$count_c3;
} else {
$sum_rapor_c3 = $rapor_c3->sum_nilai_1/5+$rapor_c3->sum_nilai_2/5+$rapor_c3->sum_nilai_3/5+
$rapor_c3->sum_nilai_4/5+$rapor_c3->sum_nilai_5/4+$rapor_c3->sum_nilai_6/4;
}
} elseif ($item_c3->jurusan_id == 3) {
if ($item_c3->mapel_id==82) {
$sum_rapor_c3 = $rapor_c3->sum_nilai_1/$count_c3+$rapor_c3->sum_nilai_2/$count_c3+
$rapor_c3->sum_nilai_3/$count_c3+$rapor_c3->sum_nilai_4/$count_c3+
$rapor_c3->sum_nilai_5/$count_c3+$rapor_c3->sum_nilai_6/$count_c3;
} else {
$sum_rapor_c3 = $rapor_c3->sum_nilai_1/6+$rapor_c3->sum_nilai_2/6+$rapor_c3->sum_nilai_3/6+
$rapor_c3->sum_nilai_4/6+$rapor_c3->sum_nilai_5/5+$rapor_c3->sum_nilai_6/5;
}
} elseif ($item_c3->jurusan_id == 8) {
if ($item_c3->mapel_id==82) {
$sum_rapor_c3 = $rapor_c3->sum_nilai_1/$count_c3+$rapor_c3->sum_nilai_2/$count_c3+
$rapor_c3->sum_nilai_3/$count_c3+$rapor_c3->sum_nilai_4/$count_c3+
$rapor_c3->sum_nilai_5/$count_c3+$rapor_c3->sum_nilai_6/$count_c3;
} else {
$sum_rapor_c3 = $rapor_c3->sum_nilai_1/6+$rapor_c3->sum_nilai_2/6+$rapor_c3->sum_nilai_3/5+
$rapor_c3->sum_nilai_4/5+$rapor_c3->sum_nilai_5/6+$rapor_c3->sum_nilai_6/6;
}
} else {
$sum_rapor_c3 = $rapor_c3->sum_nilai_1/$count_c3+$rapor_c3->sum_nilai_2/$count_c3+
$rapor_c3->sum_nilai_3/$count_c3+$rapor_c3->sum_nilai_4/$count_c3+
$rapor_c3->sum_nilai_5/$count_c3+$rapor_c3->sum_nilai_6/$count_c3;
}
$rata_c3 = $sum_rapor_c3/$count_rapor_c3;
$total_rc3 = $total_rc3 + round($rata_c3);
$total_c3 = $total_c3 + $item_c3->nilai;
@endphp
{{ $no++ }} |
{{ $item_c3->nama_mapel }} |
{{ round($rata_c3) }} |
{{ round($item_c3->nilai) }} |
@empty
Tidak Ada Data |
@endforelse
Rata-Rata |
{{ round(($total_ra + $total_rb + $total_rc1 + $total_rc3) / $count, 2) }}
|
{{ round(($total_a + $total_b + $total_c1 + $total_c3) / $count, 2) }}
|