Fixes for django 4 (remove is_ajax)
This commit is contained in:
+4
-4
@@ -281,7 +281,7 @@ def active_exams_unbased(request, cid=None, passcode=None):
|
||||
@csrf_exempt
|
||||
def exam_submit(request):
|
||||
print(request)
|
||||
if request.is_ajax and request.method == "POST":
|
||||
if request.method == "POST":
|
||||
print(request.POST)
|
||||
exam_type, exam_id = request.POST.get("eid").split("/")
|
||||
|
||||
@@ -379,7 +379,7 @@ def feedback_mark_complete(request, pk):
|
||||
|
||||
@csrf_exempt
|
||||
def answer_suggestion_submit(request):
|
||||
if request.is_ajax and request.method == "POST":
|
||||
if request.method == "POST":
|
||||
post_data = json.loads(request.body)
|
||||
question_type, qid = post_data["qid"].split("/")
|
||||
answer_string = post_data["answer"]
|
||||
@@ -411,7 +411,7 @@ def answer_suggestion_submit(request):
|
||||
|
||||
@login_required
|
||||
def answer_submit(request):
|
||||
if request.is_ajax and request.method == "POST":
|
||||
if request.method == "POST":
|
||||
qid = request.POST.get("qid")
|
||||
question_type = request.POST.get("question_type")
|
||||
answer_string = request.POST.get("answer")
|
||||
@@ -442,7 +442,7 @@ def answer_submit(request):
|
||||
|
||||
@login_required
|
||||
def answer_suggestion_confirm(request):
|
||||
if request.is_ajax and request.method == "POST":
|
||||
if request.method == "POST":
|
||||
question_type = request.POST.get("question_type")
|
||||
aid = request.POST.get("aid")
|
||||
status = request.POST.get("status")
|
||||
|
||||
Reference in New Issue
Block a user