Commit 067d7782 by Eric Fischer Committed by GitHub

Merge pull request #54 from edx/efischer/swallow_reset_signal

Allow reset signal to be ignored
parents 8ded4b8c b0b76517
...@@ -704,7 +704,7 @@ def get_latest_score_for_submission(submission_uuid, read_replica=False): ...@@ -704,7 +704,7 @@ def get_latest_score_for_submission(submission_uuid, read_replica=False):
return ScoreSerializer(score).data return ScoreSerializer(score).data
def reset_score(student_id, course_id, item_id, clear_state=False): def reset_score(student_id, course_id, item_id, clear_state=False, emit_signal=True):
""" """
Reset scores for a specific student on a specific problem. Reset scores for a specific student on a specific problem.
...@@ -738,6 +738,7 @@ def reset_score(student_id, course_id, item_id, clear_state=False): ...@@ -738,6 +738,7 @@ def reset_score(student_id, course_id, item_id, clear_state=False):
# Create a "reset" score # Create a "reset" score
try: try:
score = Score.create_reset_score(student_item) score = Score.create_reset_score(student_item)
if emit_signal:
# Send a signal out to any listeners who are waiting for scoring events. # Send a signal out to any listeners who are waiting for scoring events.
score_reset.send( score_reset.send(
sender=None, sender=None,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment