Skip to content

Commit

Permalink
apply per question exemptions when generating answer data
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Oct 23, 2023
1 parent 7f7fbb9 commit 5d66ef5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crowdsourcer/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,17 @@ def get_response_data(
else:
score = "-"

section = response.question.section
q = response.question.number_and_part
if (
SCORE_EXCEPTIONS.get(section.title, None) is not None
and SCORE_EXCEPTIONS[section.title].get(q, None) is not None
):
if score >= SCORE_EXCEPTIONS[section.title][q]["points_for_max"]:
score = SCORE_EXCEPTIONS[section.title][q]["max_score"]
else:
score = 0

if response.question.question_type == "negative":
score = response.points

Expand Down

0 comments on commit 5d66ef5

Please sign in to comment.