diff --git a/rapids/templates/rapids/question_display_block.html b/rapids/templates/rapids/question_display_block.html
index ae01fe14..65e0d003 100755
--- a/rapids/templates/rapids/question_display_block.html
+++ b/rapids/templates/rapids/question_display_block.html
@@ -29,14 +29,14 @@
Checked by: {% for verified in question.verified.all %} {{verified}}, {% endfor %}
Scrapped: {{ question.scrapped }} (toggle)
-
- Answers (score): {% for answer in question.answers.all %}
-
- {{ answer }} ({{answer.status}}),
-
- {% endfor %}
-
+
+ Answers (score): {% for answer in question.answers.all %}
+
+ {{ answer }} ({{answer.status}}),
+
+ {% endfor %}
+
@@ -87,18 +87,18 @@
$(".suggested_answers li").each((n, el) => {
$(el).append($("[Add Correct]").on("click", function () {
$.ajax({
- url: "{% url 'answer_submit' %}",
- data: {
- csrfmiddlewaretoken: "{{ csrf_token }}",
- //active: this.checked // true if checked else false
- question_type: "rapid",
- qid: "{{question.pk}}",
- status: 2,
- answer: el.dataset.string,
- },
- type: "POST",
- dataType: "json",
- })
+ url: "{% url 'answer_submit' %}",
+ data: {
+ csrfmiddlewaretoken: "{{ csrf_token }}",
+ //active: this.checked // true if checked else false
+ question_type: "rapid",
+ qid: "{{question.pk}}",
+ status: 2,
+ answer: el.dataset.string,
+ },
+ type: "POST",
+ dataType: "json",
+ })
// $.ajax().done(), $.ajax().fail(), $ajax().always() are upto you. Add/change accordingly
.done(function (data) {
console.log(data);
@@ -123,17 +123,17 @@
// Add button to confirm answer is correct
$(el).append($("[Add Correct]").on("click", function () {
$.ajax({
- url: "{% url 'answer_suggestion_confirm' %}",
- data: {
- csrfmiddlewaretoken: "{{ csrf_token }}",
- //active: this.checked // true if checked else false
- question_type: "rapid",
- aid: el.dataset.aid,
- status: 2,
- },
- type: "POST",
- dataType: "json",
- })
+ url: "{% url 'answer_suggestion_confirm' %}",
+ data: {
+ csrfmiddlewaretoken: "{{ csrf_token }}",
+ //active: this.checked // true if checked else false
+ question_type: "rapid",
+ aid: el.dataset.aid,
+ status: 2,
+ },
+ type: "POST",
+ dataType: "json",
+ })
// $.ajax().done(), $.ajax().fail(), $ajax().always() are upto you. Add/change accordingly
.done(function (data) {
console.log(data);
@@ -154,17 +154,17 @@
// Add button to confirm answer is incorrect
$(el).append($("[Incorrect]").on("click", function () {
$.ajax({
- url: "{% url 'answer_suggestion_confirm' %}",
- data: {
- csrfmiddlewaretoken: "{{ csrf_token }}",
- //active: this.checked // true if checked else false
- question_type: "rapid",
- aid: el.dataset.aid,
- status: 0,
- },
- type: "POST",
- dataType: "json",
- })
+ url: "{% url 'answer_suggestion_confirm' %}",
+ data: {
+ csrfmiddlewaretoken: "{{ csrf_token }}",
+ //active: this.checked // true if checked else false
+ question_type: "rapid",
+ aid: el.dataset.aid,
+ status: 0,
+ },
+ type: "POST",
+ dataType: "json",
+ })
// $.ajax().done(), $.ajax().fail(), $ajax().always() are upto you. Add/change accordingly
.done(function (data) {
console.log(data);
@@ -183,5 +183,4 @@
}))
});
});
-
\ No newline at end of file