diff --git a/rapids/templates/rapids/view.html b/rapids/templates/rapids/view.html index b86daa17..e40d5a3e 100755 --- a/rapids/templates/rapids/view.html +++ b/rapids/templates/rapids/view.html @@ -15,7 +15,7 @@ {% render_table table %} -Add selected questions to +Add selected questions to exam @@ -56,12 +56,14 @@ $("table input:checked").each((n, el) => { ids.push(el.value) }) + post_url = document.getElementById("button-select-add-exam").dataset.exam_json_edit_url; + type = document.getElementById("button-select-add-exam").dataset.type; $.ajax({ - url: "{% url 'generic:generic_exam_json_edit' %}", + url: post_url, data: { csrfmiddlewaretoken: "{{ csrf_token }}", add_exam_questions: JSON.stringify(ids), - type: "rapid", + type: type, exam_id: $(evt.target).data("exam-id"), }, type: "POST",