fix a few things

This commit is contained in:
Ross
2023-06-12 16:16:45 +01:00
parent d1ba8c87dc
commit 5fbd4cd35e
6 changed files with 57 additions and 72 deletions
+3 -2
View File
@@ -87,6 +87,7 @@ from django.db.models import Case, When
from django.conf import settings
from datetime import datetime
from django.utils import timezone
import os
import string
import random
@@ -1626,7 +1627,7 @@ class ExamViews(View, LoginRequiredMixin):
return redirect(url)
return JsonResponse(exam_json_cache)
time = datetime.now()
time = timezone.now()
exam.exam_json_id += 1
@@ -1672,7 +1673,7 @@ class ExamViews(View, LoginRequiredMixin):
if not exam.check_cid_user(cid, passcode, request, user_id):
raise Http404("No available exam")
time = datetime.now()
time = timezone.now()
exam_json = exam.get_exam_json(based=False)
exam_json["generated"] = time.isoformat()