.
This commit is contained in:
@@ -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{
|
||||
|
||||
@@ -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
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user