fix a few things
This commit is contained in:
+3
-2
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user