This commit is contained in:
Ross
2021-08-19 10:09:08 +01:00
parent e76ed0209e
commit 80b690d6de
3 changed files with 20 additions and 2 deletions
+2 -1
View File
@@ -208,7 +208,8 @@ button a {
#full-question-list li::before{
counter-increment: question-list;
content: counter(question-list) ": ";
content: counter(question-list) " ";
padding-right: 0.5em;
}
#full-question-list img{
+17
View File
@@ -554,6 +554,23 @@ class CidUserAnswer(models.Model):
# Then compare answer strings (as per anatomy questions)
ans = self.answer_compare
try:
marked_ans = q.answers.objects.get(answer_compare__iexact=ans)
except q.answers.DoesNotExist:
marked_ans = None
mark = "unmarked"
if marked_ans is not None:
if marked_ans.status == Answer.MarkOptions.CORRECT:
mark = 1
elif Answer.MarkOptions.HALF_MARK:
mark = 0.5
elif Answer.MarkOptions.INCORRECT:
mark = 0
return mark
if (
q.answers.filter(
answer_compare__iexact=ans, status=Answer.MarkOptions.CORRECT
+1 -1
View File
@@ -480,7 +480,7 @@ def rapid_scrap(request, pk):
if (
not request.user.groups.filter(name="rapid_checker").exists()
and request.user not in question.author.all()
and request.user not in rapid.author.all()
):
raise PermissionDenied()