if ($_POST['jawabantest' . $i] == "") { $jawabankosong++; } if ($_POST['jawabantest' . $i] != "") { $jawabanterisi++; } if ($_POST['jawabantest' . $i] == $kuncijawaban[$i - 1]) { $jawabanbenar++; } $ppil .= $_POST['jawabantest' . $i] . "#"; $ppil = substr_replace($ppil, "", -1, 1); } $jawabansalah = $jawabanterisi - $jawabanbenar; $score = $pointbenar * $jawabanbenar + $pointsalah * $jawabansalah + $pointkosong * $jawabankosong; /*******************/ simpannilai($idujian, $user, $score, $tipeujian, $levelakses); /********************/ $admin .= "<table class='table'>"; $admin .= "<tr><td><h2>Total Score : {$score} </h2></td></tr>"; $admin .= "<tr><td>\nLevel : {$levelakses} <br>\nUser : {$user} <br>\n\t\tJawaban Terisi : {$jawabanterisi} <br>"; $admin .= "Jawaban Benar : {$jawabanbenar} <br>"; $admin .= "Jawaban Salah : {$jawabansalah} </td></tr>"; $admin .= "<tr><td><a href='?pilih=ujian&mod=yes&aksi=listujian&id={$idkursus}'><span class='btn btn-primary'>BACK</span></a> </td></tr>"; $admin .= "</table>"; } if ($_GET['aksi'] == "hapusfilessoal") { global $koneksi_db; $id = int_filter($_GET['id']); $idsoal = int_filter($_GET['idsoal']); $idujian = int_filter($_GET['idujian']); $hasil = $koneksi_db->sql_query("SELECT * FROM soal WHERE id='{$idsoal}'");
if ($_POST['jawabantest' . $i] == "") { $jawabankosong++; } if ($_POST['jawabantest' . $i] != "") { $jawabanterisi++; } if ($_POST['jawabantest' . $i] == $kuncijawaban[$i - 1]) { $jawabanbenar++; } $ppil .= $_POST['jawabantest' . $i] . "#"; $ppil = substr_replace($ppil, "", -1, 1); } $jawabansalah = $jawabanterisi - $jawabanbenar; $score = $pointbenar * $jawabanbenar + $pointsalah * $jawabansalah + $pointkosong * $jawabankosong; /*******************/ simpannilai($idmapel, $user, $score, $tipeujian, $levelakses, $jawabanterisi, $jawabanbenar, $jawabansalah); /********************/ $admin .= "<table class='table'>"; $admin .= "<tr><td><h2>Total Score : {$score} </h2></td></tr>"; $admin .= "<tr><td>\nLevel : {$levelakses} <br>\nUser : {$user} <br>\n\t\tJawaban Terisi : {$jawabanterisi} <br>"; $admin .= "Jawaban Benar : {$jawabanbenar} <br>"; $admin .= "Jawaban Salah : {$jawabansalah} </td></tr>"; $admin .= "<tr><td><a href='?pilih=ujian&mod=yes&aksi=listujian&id={$idmapel}'><span class='btn btn-primary'>BACK</span></a> </td></tr>"; $admin .= "</table>"; $admin .= '</div><!-- /.box-body --> </div><!-- /.box -->'; } /* NILAI UJIAN */ if ($_GET['aksi'] == "nilaiujian") { $admin .= '<div class="box"> <div class="box-header">