Merge branch 'master' of ssh://penracourses.org.uk:/home/ross/web/rad

This commit is contained in:
Ross
2022-11-14 14:29:22 +00:00
3 changed files with 10 additions and 2 deletions
+5
View File
@@ -235,6 +235,11 @@ def generic_exam_urls(generic_exam_view):
generic_exam_view.exam_json_unbased, generic_exam_view.exam_json_unbased,
name="exam_json_unbased", name="exam_json_unbased",
), ),
path(
"exam/json/<int:pk>/<int:sk>",
generic_exam_view.exam_question_json,
name="exam_question_json_unbased",
),
path( path(
"exam/json/<int:pk>/<int:sk>/unbased", "exam/json/<int:pk>/<int:sk>/unbased",
generic_exam_view.exam_question_json_unbased, generic_exam_view.exam_question_json_unbased,
+2
View File
@@ -269,7 +269,9 @@ LongSeriesImageFormSet = inlineformset_factory(
class ExamForm(ExamFormMixin, ModelForm): class ExamForm(ExamFormMixin, ModelForm):
class Meta(ExamFormMixin.Meta): class Meta(ExamFormMixin.Meta):
model = Exam model = Exam
fields = ExamFormMixin.Meta.fields + ["double_mark"]
class ExamAuthorForm(ExamAuthorFormMixin): class ExamAuthorForm(ExamAuthorFormMixin):
class Meta(ExamAuthorFormMixin.Meta): class Meta(ExamAuthorFormMixin.Meta):
model = Exam model = Exam
#fields = ExamAuthorFormMixin.Meta.fields.append("double_mark")
+1
View File
@@ -1035,6 +1035,7 @@ def exam_scores_cid_user(request, pk, cid, passcode):
total_score = sum(answered) total_score = sum(answered)
unmarked_number = len(answers_marks) - len(answered) unmarked_number = len(answers_marks) - len(answered)
total_score = "{} ({} unmarked)".format(total_score, unmarked_number) total_score = "{} ({} unmarked)".format(total_score, unmarked_number)
normalised_score = "Not available"
else: else:
total_score = sum(answered) total_score = sum(answered)
normalised_score = normaliseScore(total_score) normalised_score = normaliseScore(total_score)