.
This commit is contained in:
@@ -468,6 +468,12 @@ class CidUserAnswer(models.Model):
|
||||
# s = s.translate(str.maketrans('', '', string.punctuation))
|
||||
# return s
|
||||
|
||||
def get_blank_answer(self):
|
||||
return 0
|
||||
|
||||
def get_blank_answer_string(self):
|
||||
return ""
|
||||
|
||||
def get_answer_score(self, cached=True):
|
||||
if cached and self.score:
|
||||
if self.score == Answer.MarkOptions.CORRECT:
|
||||
|
||||
+4
-2
@@ -896,6 +896,8 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
|
||||
user_scores_list = list(user_scores.values())
|
||||
|
||||
max_score = len(questions) * 2
|
||||
|
||||
if len(user_scores_list) < 1:
|
||||
mean = 0
|
||||
median = 0
|
||||
@@ -920,8 +922,6 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
)
|
||||
fig_html = fig.to_html()
|
||||
|
||||
max_score = len(questions) * 2
|
||||
|
||||
exam.stats_mean = mean
|
||||
exam.stats_median = median
|
||||
exam.stats_mode = mode
|
||||
@@ -935,6 +935,8 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
exam.stats_graph = fig_html
|
||||
exam.save()
|
||||
|
||||
|
||||
|
||||
return render(
|
||||
request,
|
||||
f"{self.app_name}/exam_scores.html",
|
||||
|
||||
Reference in New Issue
Block a user