Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 4ebb35e

Browse files
committed
Add: Log an error if peer questions are not scored all
1 parent b177f61 commit 4ebb35e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

modules/rs_grading.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -844,9 +844,16 @@ def _autograde_one_q(
844844
elif (
845845
which_to_grade == "all_answer"
846846
): # This is used for scoring peer instruction where we want to look at multiple answers
847-
score = scoring_fn(results, points, autograde)
848-
id = None
849-
logger.debug("SCORE = %s by %s", score, scoring_fn)
847+
# TODO: This will need to change if there are other question types
848+
# that support the all_answer which to grade.
849+
if scoring_fn == _score_peer_instruction:
850+
score = scoring_fn(results, points, autograde)
851+
id = None
852+
logger.debug("SCORE = %s by %s", score, scoring_fn)
853+
else:
854+
logger.error(
855+
"Scoring function must be _score_peer_instruction for all_answer"
856+
)
850857

851858
else:
852859
logger.error("Unknown Scoring Scheme %s ", which_to_grade)

0 commit comments

Comments
 (0)