This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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