This commit is contained in:
Ross
2021-01-28 09:35:54 +00:00
parent e5d74d59d5
commit 5e77160bbf
4 changed files with 38 additions and 7 deletions
+23 -1
View File
@@ -27,6 +27,9 @@ from physics.models import Exam as PhysicsExam
from anatomy.models import CidUserAnswer as AnatomyCidUserAnswer
from anatomy.models import Exam as AnatomyExam
from anatomy.views import active_exams as active_anatomy_exams
from rapids.views import active_exams as active_rapid_exams
@login_required
@@ -73,4 +76,23 @@ def cid_scores(request, pk):
"anatomy_exams": anatomy_exams,
"cid": cid,
},
)
)
def active_exams(request):
anatomy_exams = active_anatomy_exams(request, False)
rapid_exams = active_rapid_exams(request, False)
exams = []
exams.extend(anatomy_exams)
exams.extend(rapid_exams)
active_exams = {"exams": exams}
return JsonResponse(active_exams)
@csrf_exempt
def exam_submit(request):
# postExamAnswers
pass