Scroll to top

Haloo! Selamat Datang di Komunitas Private Training Web Development (33843 Members, 291 Projects, 2971 Topic, 8294 Comments)

Butuh karyawan baru? atau seorang Web Developer (Part-time/Freelance/Full-time) untuk mengerjakan project/aplikasi anda?, cari disini : Members Area Jobs!
Masalah perhitungan pada Nilai Raport SIASELAH KTSP
Mahmud Al Fauzi Mengatakan : Members -
  1. Ketika Nilai UTS dengan Nilai UAS disamakan misalkan semua di jadikan 78, maka nilai malah mengecil dan tidak sesuai? (39)
Ada 1 File Kiriman :
1. Screenshot-2017-11-10_LMS_SMK_Plus_AL-MAFTUH.png (6 KB)
Mahmud Al Fauzi Mengatakan :
Members -
  1. up pk robby

Robby Prihandaya Mengatakan :
Admin -
  1. Assalam, coba buka file "application/raport/raport_nilai_pengetahuan.php"
  2. pada baris 172 cari :
  3.  
  4. $rapn[total]
  5.  
  6. dan menjadi :
  7.  
  8. ($ta[uh]+$ta[tugas]+$sms[nilai1]+$sms[nilai2])/4

Mahmud Al Fauzi Mengatakan :
Members -
  1. Setelah saya ganti seperti itu pak robby, di halaman input nilai sesuai... tapi pas di raport halaman 4 nilai jadi berbeda.... jadi lebih besar

Ada 2 File Kiriman :
1. tampilan_hal_6_raport.png (67 KB)
2. tampilan_input_raport.png (16 KB)
Mahmud Al Fauzi Mengatakan :
Members -
  1. Up pak Robby sebelum pembagian raport

Robby Prihandaya Mengatakan :
Admin -
  1. Iya mas, pada file raport halaman 4 jangan lupa diubah juga perhitungannya seperti di atas,..
  2. ($ta[uh]+$ta[tugas]+$sms[nilai1]+$sms[nilai2])/4
  3. agar sesuai dengan hasil pada perhitungan input,...

Mahmud Al Fauzi Mengatakan :
Members -
  1. tepatnya pada bagian mana pk Robby??? :)
  2.  
  3. echo "<tr>
  4. <td align=center><b>A.</b></td><td><b>Mata Pelajaran</b></td><td></td><td></td><td></td><td></td><td></td><td></td>
  5. </tr>";
  6. $kelompok = mysql_query("SELECT * FROM rb_kelompok_mata_pelajaran");
  7. while ($k = mysql_fetch_array($kelompok)){
  8. echo "<tr>
  9. <td colspan='8'><b>$k[nama_kelompok_mata_pelajaran]</b></td>
  10. </tr>";
  11. $mapel = mysql_query("SELECT * FROM rb_jadwal_pelajaran a JOIN rb_mata_pelajaran b ON a.kode_pelajaran=b.kode_pelajaran
  12. where a.kode_kelas='$_GET[kelas]' AND a.id_tahun_akademik='$_GET[tahun]' AND b.id_kelompok_mata_pelajaran='$k[id_kelompok_mata_pelajaran]'");
  13. $no = 1;
  14. while ($m = mysql_fetch_array($mapel)){
  15. $rapn = mysql_fetch_array(mysql_query("SELECT kodejdwl, nisn, (sum(uh)+sum(tugas))/4 as total FROM ((SELECT kodejdwl, nisn, sum(nilai1)/count(nisn) as uh, sum(nilai2)/count(nisn) as tugas FROM `rb_nilai_pengetahuan` where nisn='$_GET[id]' GROUP BY kodejdwl) UNION (SELECT kodejdwl, nisn, nilai1, (nilai2*2) FROM rb_nilai_pengetahuan_semester where nisn='$_GET[id]')) as a where a.kodejdwl='$m[kodejdwl]' GROUP by a.kodejdwl"));
  16.  
  17. $cekpredikat = mysql_num_rows(mysql_query("SELECT * FROM rb_predikat where kode_kelas='$_GET[kelas]'"));
  18. if ($cekpredikat >= 1){
  19. $grade3 = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapn[raport])." >=nilai_a) AND (".number_format($rapn[raport])." <= nilai_b) AND kode_kelas='$_GET[kelas]'"));
  20. }else{
  21. $grade3 = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapn[raport])." >=nilai_a) AND (".number_format($rapn[raport])." <= nilai_b) AND kode_kelas='0'"));
  22. }
  23.  
  24. $rapnk = mysql_fetch_array(mysql_query("SELECT sum(GREATEST(nilai1,nilai2,nilai3,nilai4,nilai5,nilai6))/count(nisn) as raport FROM rb_nilai_keterampilan where kodejdwl='$m[kodejdwl]' AND nisn='$s[nisn]'"));
  25. $cekpredikat2 = mysql_num_rows(mysql_query("SELECT * FROM rb_predikat where kode_kelas='$_GET[kelas]'"));
  26. if ($cekpredikat2 >= 1){
  27. $grade = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapnk[raport])." >=nilai_a) AND (".number_format($rapnk[raport])." <= nilai_b) AND kode_kelas='$_GET[kelas]'"));
  28. }else{
  29. $grade = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapnk[raport])." >=nilai_a) AND (".number_format($rapnk[raport])." <= nilai_b) AND kode_kelas='0'"));
  30. }
  31. $des = mysql_fetch_array(mysql_query("SELECT * FROM rb_ledger where kodejdwl='$m[kodejdwl]' AND nisn='$_GET[id]' AND kode_kelas='$_GET[kelas]'"));
  32. echo "<tr>
  33. <td align=center>$no</td>
  34. <td>$m[namamatapelajaran]</td>
  35. <td align=center>$m[kkm]</td>
  36. <td align=center>".number_format($rapn[total])."</td>
  37. <td>".ucwords(terbilang(number_format($rapn[total])))."</td>
  38. <td align=center>".number_format($rapnk[raport])."</td>
  39. <td>".ucwords(terbilang(number_format($rapnk[raport])))."</td>
  40. <td align=center>$des[sikap]</td>
  41. </tr>";
  42. $no++;
  43. }
  44. }

Mahmud Al Fauzi Mengatakan :
Members -
  1. Mohon maaf sekali... mohon bantu pk Robby

Robby Prihandaya Mengatakan :
Admin -
  1. Tinggal sesuaikan saja querynya dengan file "application/raport/raport_nilai_pengetahuan.php" yg sdah saya jelaskan di atas :
  2.  
  3. $ta = mysql_fetch_array(mysql_query("SELECT kodejdwl, nisn, sum(nilai1)/count(nisn) as uh, sum(nilai2)/count(nisn) as tugas
  4. FROM `rb_nilai_pengetahuan` where nisn='$_GET[id]' AND kodejdwl='$m[kodejdwl]' GROUP BY kodejdwl"));
  5.  
  6. $sms = mysql_fetch_array(mysql_query("SELECT * FROM rb_nilai_pengetahuan_semester
  7. where kodejdwl='$m[kodejdwl]' AND nisn='$_GET[id]'"));
  8.  
  9. $nilai_pengetahuan = number_format(($ta[uh]+$ta[tugas]+$sms[nilai1]+$sms[nilai2])/4);
  10. echo "$nilai_pengetahuan";
  11.  
  12. Hapus saja perhitungan yang lama :
  13. $rapn = mysql_fetch_array(mysql_query("SELECT kodejdwl, nisn, (sum(uh)+sum(tugas))/4 as total FROM ((SELECT kodejdwl, nisn, sum(nilai1)/count(nisn) as uh, sum(nilai2)/count(nisn) as tugas FROM `rb_nilai_pengetahuan` where nisn='$_GET[id]' GROUP BY kodejdwl) UNION (SELECT kodejdwl, nisn, nilai1, (nilai2*2) FROM rb_nilai_pengetahuan_semester where nisn='$_GET[id]')) as a where a.kodejdwl='$m[kodejdwl]' GROUP by a.kodejdwl"));

Robby Prihandaya Mengatakan :
Admin -
  1. Tinggal sesuaikan saja querynya dengan file "application/raport/raport_nilai_pengetahuan.php" yg sdah saya jelaskan di atas :
  2.  
  3. $ta = mysql_fetch_array(mysql_query("SELECT kodejdwl, nisn, sum(nilai1)/count(nisn) as uh, sum(nilai2)/count(nisn) as tugas
  4. FROM `rb_nilai_pengetahuan` where nisn='$_GET[id]' AND kodejdwl='$m[kodejdwl]' GROUP BY kodejdwl"));
  5.  
  6. $sms = mysql_fetch_array(mysql_query("SELECT * FROM rb_nilai_pengetahuan_semester
  7. where kodejdwl='$m[kodejdwl]' AND nisn='$_GET[id]'"));
  8.  
  9. $nilai_pengetahuan = number_format(($ta[uh]+$ta[tugas]+$sms[nilai1]+$sms[nilai2])/4);
  10. echo "$nilai_pengetahuan";
  11.  
  12. Hapus saja perhitungan yang lama :
  13. $rapn = mysql_fetch_array(mysql_query("SELECT kodejdwl, nisn, (sum(uh)+sum(tugas))/4 as total FROM ((SELECT kodejdwl, nisn, sum(nilai1)/count(nisn) as uh, sum(nilai2)/count(nisn) as tugas FROM `rb_nilai_pengetahuan` where nisn='$_GET[id]' GROUP BY kodejdwl) UNION (SELECT kodejdwl, nisn, nilai1, (nilai2*2) FROM rb_nilai_pengetahuan_semester where nisn='$_GET[id]')) as a where a.kodejdwl='$m[kodejdwl]' GROUP by a.kodejdwl"));

Mahmud Al Fauzi Mengatakan :
Members -
  1. Solved pk .... Untuk merubah query pada bagian ledger_kelas dan ledger mapel dimana dan gimana pk?

Mahmud Al Fauzi Mengatakan :
Members -
  1. Satu lagi pk Robby.... Selain mohon bantuan cara merubah query pada bagian ledger_kelas dan ledger mapel juga masih ada masalah pada nilai penngetahuan setalah edit query... seperti tampilan berikut

Ada 1 File Kiriman :
1. 12345.png (14 KB)
Mahmud Al Fauzi Mengatakan :
Members -
  1. up pak robby... minimal bantu saya kenapa jumlah nilai di hal 4 pada nilai pengetahuan... setelah di rubah ke rumus diatas

Robby Prihandaya Mengatakan :
Admin -
  1. Assalam , jika kesulitan dalam query bisa gunakan kode php saja untuk menjumlahkannya mas, ex :
  2. $jumlah_sum = 0;
  3. $query = mysql_query("SELECT * FROM Table blablaaaa");
  4. while($row = mysql_fetch_array($query)){
  5. $jumlah_sum = $jumlah_sum + $nilai_pengetahuan;
  6. }
  7. echo "Jumlah = $jumlah_sum";

Mahmud Al Fauzi Mengatakan :
Members -
  1. saya masih blm paham pak.... bisa bantu tuliskan scriptnya pk robby untu saya pasangkan di halaman 4 setelah saya rubah ke rumus $nilai_pengetahuan = number_format(($ta[uh]+$ta[tugas]+$sms[nilai1]+$sms[nilai2])/4);
  2. echo "$nilai_pengetahuan";

Ada 1 File Kiriman :
1. 123451.png (14 KB)
Mahmud Al Fauzi Mengatakan :
Members -
  1. ini script lengkap hal 4 raport :
  2.  
  3. <?php
  4. include "../config/koneksi.php";
  5. include "../config/fungsi_indotgl.php";
  6. $frt = mysql_fetch_array(mysql_query("SELECT * FROM rb_header_print ORDER BY id_header_print DESC LIMIT 1"));
  7. ?>
  8. <head>
  9. <title>Hal 4 - Raport Siswa</title>
  10. <link rel="stylesheet" href="../bootstrap/css/printer.css">
  11. </head>
  12. <body onload="window.print()">
  13. <?php
  14. $t = mysql_fetch_array(mysql_query("SELECT * FROM rb_tahun_akademik where id_tahun_akademik='$_GET[tahun]'"));
  15. $s = mysql_fetch_array(mysql_query("SELECT a.*, b.*, c.nama_guru as walikelas, c.nip FROM rb_siswa a
  16. JOIN rb_kelas b ON a.kode_kelas=b.kode_kelas
  17. LEFT JOIN rb_guru c ON b.nip=c.nip where a.nisn='$_GET[id]'"));
  18. if (substr($_GET[tahun],4,5)=='1'){ $semester = 'Ganjil'; }else{ $semester = 'Genap'; }
  19. $iden = mysql_fetch_array(mysql_query("SELECT * FROM rb_identitas_sekolah ORDER BY id_identitas_sekolah DESC LIMIT 1"));
  20.  
  21. echo "<h1 align=center>LAPORAN HASIL BELAJAR SISWA</h1><br>
  22. <table width=100%>
  23. <tr><td>Nama Peserta Didik</td> <td> : <b>$s[nama]</b> </td> <td>Kelas / Semester </td> <td>: $s[kode_kelas] (".substr($_GET[tahun],4,5).") $semester</td></tr>
  24. <tr><td>No Induk</td> <td> : $s[nipd] / $s[nisn]</td> <td>Tahun Pelajaran </td> <td>: $t[keterangan]</td></tr>
  25. <tr><td width=140px>Nama Sekolah</td> <td> : $iden[nama_sekolah] </td> <td width=140px></td> <td></td></tr>
  26.  
  27.  
  28.  
  29. </table><br>";
  30.  
  31. echo "<table id='tablemodul1' width=100% border=1>
  32. <tr>
  33. <th rowspan='3'>No</th>
  34. <th width='160px' rowspan='3'>Komponen</th>
  35. <th width='60px' rowspan='3'>KKM</th>
  36. <th colspan='5'>Nilai Hasil Belajar</th>
  37. </tr>
  38. </tr>
  39. <th colspan='2' style='text-align:center'>Pengetahuan dan Pemahaman Konsep</th>
  40. <th colspan='2' style='text-align:center'>Kemampuan Praktik</th>
  41. <th colspan='2' style='text-align:center'>Sikap / Afektif</th>
  42. </tr>
  43. <tr>
  44. <th>Angka</th>
  45. <th width='120px'>Huruf</th>
  46. <th>Angka</th>
  47. <th width='120px'>Huruf</th>
  48. <th>Predikat</th>
  49. </tr>";
  50.  
  51. echo "<tr>
  52. <td align=center><b>A.</b></td><td><b>Mata Pelajaran</b></td><td></td><td></td><td></td><td></td><td></td><td></td>
  53. </tr>";
  54. $kelompok = mysql_query("SELECT * FROM rb_kelompok_mata_pelajaran");
  55. while ($k = mysql_fetch_array($kelompok)){
  56. echo "<tr>
  57. <td colspan='8'><b>$k[nama_kelompok_mata_pelajaran]</b></td>
  58. </tr>";
  59. $mapel = mysql_query("SELECT * FROM rb_jadwal_pelajaran a JOIN rb_mata_pelajaran b ON a.kode_pelajaran=b.kode_pelajaran
  60. where a.kode_kelas='$_GET[kelas]' AND a.id_tahun_akademik='$_GET[tahun]' AND b.id_kelompok_mata_pelajaran='$k[id_kelompok_mata_pelajaran]'");
  61. $no = 1;
  62. while ($m = mysql_fetch_array($mapel)){
  63. $ta = mysql_fetch_array(mysql_query("SELECT kodejdwl, nisn, sum(nilai1)/count(nisn) as uh, sum(nilai2)/count(nisn) as tugas
  64. FROM `rb_nilai_pengetahuan` where nisn='$_GET[id]' AND kodejdwl='$m[kodejdwl]' GROUP BY kodejdwl"));
  65.  
  66. $sms = mysql_fetch_array(mysql_query("SELECT * FROM rb_nilai_pengetahuan_semester
  67. where kodejdwl='$m[kodejdwl]' AND nisn='$_GET[id]'"));
  68.  
  69. $nilai_pengetahuan = number_format(($ta[uh]+$ta[tugas]+$sms[nilai1]+$sms[nilai2])/4);
  70.  
  71. $cekpredikat = mysql_num_rows(mysql_query("SELECT * FROM rb_predikat where kode_kelas='$_GET[kelas]'"));
  72. if ($cekpredikat >= 1){
  73. $grade3 = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapn[raport])." >=nilai_a) AND (".number_format($rapn[raport])." <= nilai_b) AND kode_kelas='$_GET[kelas]'"));
  74. }else{
  75. $grade3 = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapn[raport])." >=nilai_a) AND (".number_format($rapn[raport])." <= nilai_b) AND kode_kelas='0'"));
  76. }
  77.  
  78. $rapnk = mysql_fetch_array(mysql_query("SELECT sum(GREATEST(nilai1,nilai2,nilai3,nilai4,nilai5,nilai6))/count(nisn) as raport FROM rb_nilai_keterampilan where kodejdwl='$m[kodejdwl]' AND nisn='$s[nisn]'"));
  79. $cekpredikat2 = mysql_num_rows(mysql_query("SELECT * FROM rb_predikat where kode_kelas='$_GET[kelas]'"));
  80. if ($cekpredikat2 >= 1){
  81. $grade = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapnk[raport])." >=nilai_a) AND (".number_format($rapnk[raport])." <= nilai_b) AND kode_kelas='$_GET[kelas]'"));
  82. }else{
  83. $grade = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapnk[raport])." >=nilai_a) AND (".number_format($rapnk[raport])." <= nilai_b) AND kode_kelas='0'"));
  84. }
  85. $des = mysql_fetch_array(mysql_query("SELECT * FROM rb_ledger where kodejdwl='$m[kodejdwl]' AND nisn='$_GET[id]' AND kode_kelas='$_GET[kelas]'"));
  86. echo "<tr>
  87. <td align=center>$no</td>
  88. <td>$m[namamatapelajaran]</td>
  89. <td align=center>$m[kkm]</td>
  90. <td align=center>".number_format($nilai_pengetahuan)."</td>
  91. <td>".ucwords(terbilang(number_format($nilai_pengetahuan)))."</td>
  92. <td align=center>".number_format($rapnk[raport])."</td>
  93. <td>".ucwords(terbilang(number_format($rapnk[raport])))."</td>
  94. <td align=center>$des[sikap]</td>
  95. </tr>";
  96. $no++;
  97. }
  98. }
  99.  
  100. $ta = mysql_fetch_array(mysql_query("SELECT kodejdwl, nisn, sum(nilai1)/count(nisn) as uh, sum(nilai2)/count(nisn) as tugas
  101. FROM `rb_nilai_pengetahuan` where nisn='$_GET[id]' AND kodejdwl='$m[kodejdwl]' GROUP BY kodejdwl"));
  102. $rapnk = mysql_fetch_array(mysql_query("SELECT sum(raport) as raporttotal FROM (SELECT sum(GREATEST(nilai1,nilai2,nilai3,nilai4,nilai5,nilai6))/count(nisn) as raport FROM rb_nilai_keterampilan where nisn='$_GET[id]' GROUP BY kodejdwl) as a"));
  103. $siswa = mysql_num_rows(mysql_query("SELECT * FROM rb_siswa where kode_kelas='$_GET[kelas]'"));
  104. $rank = mysql_fetch_array(mysql_query("SELECT * FROM rb_peringkat where nisn='$_GET[id]' AND kode_kelas='$_GET[kelas]' AND id_tahun_akademik='$_GET[tahun]'"));
  105. echo "<tr>
  106. <td colspan='3' align=center><b>JUMLAH</b></td>
  107. <td align=center><b>".number_format($ta[total])."</b></td>
  108. <td align=center></td>
  109. <td align=center><b>".number_format($rapnk[raporttotal])."</b></td>
  110. <td align=center></td>
  111. <td></td>
  112. </tr>";
  113.  
  114. echo "<tr>
  115. <td align=center><b></b></td>
  116. <td><b>PERINGKAT</b></td>
  117. <td align=center><b>$rank[rank]</b></td>
  118. <td colspan='2'><b>Dari $siswa Siswa</b></td>
  119. <td align=center></td>
  120. <td align=center></td>
  121. <td></td>
  122. </tr>";
  123.  
  124. echo "</table><br/>";
  125. ?>
  126.  
  127. <table border=0 width=100%>
  128. <tr>
  129. <td width="260" align="left">Orang Tua / Wali</td>
  130. <td width="520"align="center">Mengetahui <br> Kepala SMK Plus AL-MAFTUH</td>
  131. <td width="260" align="left">Sukabumi, <?php echo tgl_raport(date("Y-m-d")); ?> <br> Wali Kelas</td>
  132. </tr>
  133. <tr>
  134. <td align="left"><br /><br /><br /><br /><br />
  135. ................................... <br /><br /></td>
  136.  
  137. <td align="center" valign="top"><br /><br /><br /><br /><br />
  138. <b>ASEP ABDUL AZIZ, S.Pd<br>
  139. NIP : -</b>
  140. </td>
  141.  
  142. <td align="left" valign="top"><br /><br /><br /><br /><br />
  143. <b><?php echo $s[walikelas]; ?><br />
  144. NRY : <?php echo $s[nip]; ?></b>
  145. </td>
  146. </tr>
  147. </table>
  148. </body>

Robby Prihandaya Mengatakan :
Admin -
  1. <?php
  2. include "../config/koneksi.php";
  3. include "../config/fungsi_indotgl.php";
  4. $frt = mysql_fetch_array(mysql_query("SELECT * FROM rb_header_print ORDER BY id_header_print DESC LIMIT 1"));
  5. ?>
  6. <head>
  7. <title>Hal 4 - Raport Siswa</title>
  8. <link rel="stylesheet" href="../bootstrap/css/printer.css">
  9. </head>
  10. <body onload="window.print()">
  11. <?php
  12. $t = mysql_fetch_array(mysql_query("SELECT * FROM rb_tahun_akademik where id_tahun_akademik='$_GET[tahun]'"));
  13. $s = mysql_fetch_array(mysql_query("SELECT a.*, b.*, c.nama_guru as walikelas, c.nip FROM rb_siswa a
  14. JOIN rb_kelas b ON a.kode_kelas=b.kode_kelas
  15. LEFT JOIN rb_guru c ON b.nip=c.nip where a.nisn='$_GET[id]'"));
  16. if (substr($_GET[tahun],4,5)=='1'){ $semester = 'Ganjil'; }else{ $semester = 'Genap'; }
  17. $iden = mysql_fetch_array(mysql_query("SELECT * FROM rb_identitas_sekolah ORDER BY id_identitas_sekolah DESC LIMIT 1"));
  18.  
  19. echo "<h1 align=center>LAPORAN HASIL BELAJAR SISWA</h1><br>
  20. <table width=100%>
  21. <tr><td>Nama Peserta Didik</td> <td> : <b>$s[nama]</b> </td> <td>Kelas / Semester </td> <td>: $s[kode_kelas] (".substr($_GET[tahun],4,5).") $semester</td></tr>
  22. <tr><td>No Induk</td> <td> : $s[nipd] / $s[nisn]</td> <td>Tahun Pelajaran </td> <td>: $t[keterangan]</td></tr>
  23. <tr><td width=140px>Nama Sekolah</td> <td> : $iden[nama_sekolah] </td> <td width=140px></td> <td></td></tr>
  24.  
  25.  
  26.  
  27. </table><br>";
  28.  
  29. echo "<table id='tablemodul1' width=100% border=1>
  30. <tr>
  31. <th rowspan='3'>No</th>
  32. <th width='160px' rowspan='3'>Komponen</th>
  33. <th width='60px' rowspan='3'>KKM</th>
  34. <th colspan='5'>Nilai Hasil Belajar</th>
  35. </tr>
  36. </tr>
  37. <th colspan='2' style='text-align:center'>Pengetahuan dan Pemahaman Konsep</th>
  38. <th colspan='2' style='text-align:center'>Kemampuan Praktik</th>
  39. <th colspan='2' style='text-align:center'>Sikap / Afektif</th>
  40. </tr>
  41. <tr>
  42. <th>Angka</th>
  43. <th width='120px'>Huruf</th>
  44. <th>Angka</th>
  45. <th width='120px'>Huruf</th>
  46. <th>Predikat</th>
  47. </tr>";
  48.  
  49. echo "<tr>
  50. <td align=center><b>A.</b></td><td><b>Mata Pelajaran</b></td><td></td><td></td><td></td><td></td><td></td><td></td>
  51. </tr>";
  52. $kelompok = mysql_query("SELECT * FROM rb_kelompok_mata_pelajaran");
  53. while ($k = mysql_fetch_array($kelompok)){
  54. echo "<tr>
  55. <td colspan='8'><b>$k[nama_kelompok_mata_pelajaran]</b></td>
  56. </tr>";
  57. $mapel = mysql_query("SELECT * FROM rb_jadwal_pelajaran a JOIN rb_mata_pelajaran b ON a.kode_pelajaran=b.kode_pelajaran
  58. where a.kode_kelas='$_GET[kelas]' AND a.id_tahun_akademik='$_GET[tahun]' AND b.id_kelompok_mata_pelajaran='$k[id_kelompok_mata_pelajaran]'");
  59. $no = 1;
  60. $jumlah_sum = 0;
  61. while ($m = mysql_fetch_array($mapel)){
  62. $ta = mysql_fetch_array(mysql_query("SELECT kodejdwl, nisn, sum(nilai1)/count(nisn) as uh, sum(nilai2)/count(nisn) as tugas
  63. FROM `rb_nilai_pengetahuan` where nisn='$_GET[id]' AND kodejdwl='$m[kodejdwl]' GROUP BY kodejdwl"));
  64.  
  65. $sms = mysql_fetch_array(mysql_query("SELECT * FROM rb_nilai_pengetahuan_semester
  66. where kodejdwl='$m[kodejdwl]' AND nisn='$_GET[id]'"));
  67.  
  68. $nilai_pengetahuan = number_format(($ta[uh]+$ta[tugas]+$sms[nilai1]+$sms[nilai2])/4);
  69. $jumlah_sum = $jumlah_sum + $nilai_pengetahuan;
  70. $cekpredikat = mysql_num_rows(mysql_query("SELECT * FROM rb_predikat where kode_kelas='$_GET[kelas]'"));
  71. if ($cekpredikat >= 1){
  72. $grade3 = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapn[raport])." >=nilai_a) AND (".number_format($rapn[raport])." <= nilai_b) AND kode_kelas='$_GET[kelas]'"));
  73. }else{
  74. $grade3 = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapn[raport])." >=nilai_a) AND (".number_format($rapn[raport])." <= nilai_b) AND kode_kelas='0'"));
  75. }
  76.  
  77. $rapnk = mysql_fetch_array(mysql_query("SELECT sum(GREATEST(nilai1,nilai2,nilai3,nilai4,nilai5,nilai6))/count(nisn) as raport FROM rb_nilai_keterampilan where kodejdwl='$m[kodejdwl]' AND nisn='$s[nisn]'"));
  78. $cekpredikat2 = mysql_num_rows(mysql_query("SELECT * FROM rb_predikat where kode_kelas='$_GET[kelas]'"));
  79. if ($cekpredikat2 >= 1){
  80. $grade = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapnk[raport])." >=nilai_a) AND (".number_format($rapnk[raport])." <= nilai_b) AND kode_kelas='$_GET[kelas]'"));
  81. }else{
  82. $grade = mysql_fetch_array(mysql_query("SELECT * FROM `rb_predikat` where (".number_format($rapnk[raport])." >=nilai_a) AND (".number_format($rapnk[raport])." <= nilai_b) AND kode_kelas='0'"));
  83. }
  84. $des = mysql_fetch_array(mysql_query("SELECT * FROM rb_ledger where kodejdwl='$m[kodejdwl]' AND nisn='$_GET[id]' AND kode_kelas='$_GET[kelas]'"));
  85. echo "<tr>
  86. <td align=center>$no</td>
  87. <td>$m[namamatapelajaran]</td>
  88. <td align=center>$m[kkm]</td>
  89. <td align=center>".number_format($nilai_pengetahuan)."</td>
  90. <td>".ucwords(terbilang(number_format($nilai_pengetahuan)))."</td>
  91. <td align=center>".number_format($rapnk[raport])."</td>
  92. <td>".ucwords(terbilang(number_format($rapnk[raport])))."</td>
  93. <td align=center>$des[sikap]</td>
  94. </tr>";
  95. $no++;
  96. }
  97. }
  98.  
  99. $ta = mysql_fetch_array(mysql_query("SELECT kodejdwl, nisn, sum(nilai1)/count(nisn) as uh, sum(nilai2)/count(nisn) as tugas
  100. FROM `rb_nilai_pengetahuan` where nisn='$_GET[id]' AND kodejdwl='$m[kodejdwl]' GROUP BY kodejdwl"));
  101. $rapnk = mysql_fetch_array(mysql_query("SELECT sum(raport) as raporttotal FROM (SELECT sum(GREATEST(nilai1,nilai2,nilai3,nilai4,nilai5,nilai6))/count(nisn) as raport FROM rb_nilai_keterampilan where nisn='$_GET[id]' GROUP BY kodejdwl) as a"));
  102. $siswa = mysql_num_rows(mysql_query("SELECT * FROM rb_siswa where kode_kelas='$_GET[kelas]'"));
  103. $rank = mysql_fetch_array(mysql_query("SELECT * FROM rb_peringkat where nisn='$_GET[id]' AND kode_kelas='$_GET[kelas]' AND id_tahun_akademik='$_GET[tahun]'"));
  104. echo "<tr>
  105. <td colspan='3' align=center><b>JUMLAH</b></td>
  106. <td align=center><b>".number_format($jumlah_sum)."</b></td>
  107. <td align=center></td>
  108. <td align=center><b>".number_format($rapnk[raporttotal])."</b></td>
  109. <td align=center></td>
  110. <td></td>
  111. </tr>";
  112.  
  113. echo "<tr>
  114. <td align=center><b></b></td>
  115. <td><b>PERINGKAT</b></td>
  116. <td align=center><b>$rank[rank]</b></td>
  117. <td colspan='2'><b>Dari $siswa Siswa</b></td>
  118. <td align=center></td>
  119. <td align=center></td>
  120. <td></td>
  121. </tr>";
  122.  
  123. echo "</table><br/>";
  124. ?>
  125.  
  126. <table border=0 width=100%>
  127. <tr>
  128. <td width="260" align="left">Orang Tua / Wali</td>
  129. <td width="520"align="center">Mengetahui <br> Kepala SMK Plus AL-MAFTUH</td>
  130. <td width="260" align="left">Sukabumi, <?php echo tgl_raport(date("Y-m-d")); ?> <br> Wali Kelas</td>
  131. </tr>
  132. <tr>
  133. <td align="left"><br /><br /><br /><br /><br />
  134. ................................... <br /><br /></td>
  135.  
  136. <td align="center" valign="top"><br /><br /><br /><br /><br />
  137. <b>ASEP ABDUL AZIZ, S.Pd<br>
  138. NIP : -</b>
  139. </td>
  140.  
  141. <td align="left" valign="top"><br /><br /><br /><br /><br />
  142. <b><?php echo $s[walikelas]; ?><br />
  143. NRY : <?php echo $s[nip]; ?></b>
  144. </td>
  145. </tr>
  146. </table>
  147. </body>

Mahmud Al Fauzi Mengatakan :
Members -
  1. Ko yang terjumlahkan hanya pada bagian kelompok mapel terakhir,,, tidak semua kelompok mapel pk robby

Ada 1 File Kiriman :
1. 1234567.png (46 KB)
Mahmud Al Fauzi Mengatakan :
Members -
  1. up pak robby saya mau print raport

Robby Prihandaya Mengatakan :
Admin -
  1. Coba pindahkan $jumlah_sum = 0; di atas query kelompok, jadi posisinya gini :
  2.  
  3. $jumlah_sum = 0;
  4. $kelompok = mysql_query("SELECT * FROM rb_kelompok_mata_pelajaran");

Mahmud Al Fauzi Mengatakan :
Members -
  1. Siap pak Robbyy.... Solved. :) Terima Kasih

Maaf, Untuk Memberikan Komentar Anda Harus Login !!!