.
This commit is contained in:
+5
-6
@@ -186,11 +186,9 @@ def user_scores(request):
|
||||
},
|
||||
)
|
||||
|
||||
def cid_scores(request, pk, passcode):
|
||||
def cid_scores(request, cid, passcode):
|
||||
# exam = get_object_or_404(Exam, pk=pk)
|
||||
|
||||
cid = pk
|
||||
|
||||
cid_user = CidUser.objects.filter(cid=cid).first()
|
||||
print(cid_user)
|
||||
if not cid_user or cid_user.passcode != passcode:
|
||||
@@ -278,6 +276,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":
|
||||
print(request.POST)
|
||||
exam_type, exam_id = request.POST.get("eid").split("/")
|
||||
@@ -478,7 +477,7 @@ def view_feedback(request):
|
||||
|
||||
# HTTP Error 400
|
||||
def page_not_found(request, exception):
|
||||
response = render(request, "404.html", {})
|
||||
response = render(request, "404.html")
|
||||
|
||||
response.status_code = 404
|
||||
|
||||
@@ -486,7 +485,7 @@ def page_not_found(request, exception):
|
||||
|
||||
|
||||
def page_forbidden(request, exception):
|
||||
response = render(request, "403.html", {})
|
||||
response = render(request, "403.html")
|
||||
|
||||
response.status_code = 403
|
||||
|
||||
@@ -494,7 +493,7 @@ def page_forbidden(request, exception):
|
||||
|
||||
|
||||
def server_error(request):
|
||||
response = render(request, "500.html", {})
|
||||
response = render(request, "500.html")
|
||||
|
||||
response.status_code = 500
|
||||
|
||||
|
||||
Reference in New Issue
Block a user