Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function selesaikan_ujian(id) {
swal({
title: 'Apa anda yakin?',
text: "aksi ini akan menyelesaikan secara paksa ujian yang sedang berlangsung!",
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes!'
}).then((result) => {
if (result.value) {
$.ajax({
url: 'selesaikan.php',
method: "POST",
data: 'id=' + id,
success: function (data) {
$('#htmlujianselesai').html('1');
toastr.success(data);
}
});
}
})
}
function ulang_ujian(id) {
console.log(id);
swal({
title: 'Apa anda yakin?',
text: "Akan Mengulang Ujian Ini ??",
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes!'
}).then((result) => {
if (result.value) {
$.ajax({
url: 'ulangujian.php',
method: "POST",
data: 'id=' + id,
success: function (data) {
toastr.success("berhasil diulang");
}
});
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.