.
This commit is contained in:
@@ -78,6 +78,7 @@ $(document).ready(function () {
|
||||
|
||||
var jqxhr = $.get(evt.target.dataset.exam_list_url, function (data) {
|
||||
console.log(data);
|
||||
$("#exam-options").empty();
|
||||
data.forEach((obj, n) => {
|
||||
$("#exam-options").append($(document.createElement('button')).prop({
|
||||
type: 'button',
|
||||
@@ -106,6 +107,12 @@ $(document).ready(function () {
|
||||
$("table input:checked").each((n, el) => {
|
||||
ids.push(el.value)
|
||||
})
|
||||
|
||||
// if no question selected
|
||||
if (ids.length < 1) {
|
||||
toastr.info('No question selected.');
|
||||
return
|
||||
}
|
||||
let post_url = document.getElementById("button-select-add-exam").dataset.exam_json_edit_url;
|
||||
let type = document.getElementById("button-select-add-exam").dataset.type;
|
||||
let csrf = document.getElementById("button-select-add-exam").dataset.csrf;
|
||||
|
||||
Reference in New Issue
Block a user