@receiver(score_set)
def submissions_score_set_handler(sender, **kwargs):
 points_possible = kwargs['points_possible']
 points_earned = kwargs['points_earned']
 course_id = kwargs['course_id']
 usage_id = kwargs['item_id']
 user = user_by_anonymous_id(kwargs['anonymous_user_id'])
 if (user is None):
  return
 PROBLEM_WEIGHTED_SCORE_CHANGED.send(sender=None, weighted_earned=points_earned, weighted_possible=points_possible, user_id=user.id, anonymous_user_id=kwargs['anonymous_user_id'], course_id=course_id, usage_id=usage_id, modified=kwargs['created_at'], score_db_table=ScoreDatabaseTableEnum.submissions)

@ receiver ( score_set ) def submissions_score_set_handler ( sender , ** kwargs ) : points_possible = kwargs [ 'points_possible' ] points_earned = kwargs [ 'points_earned' ] course_id = kwargs [ 'course_id' ] usage_id = kwargs [ 'item_id' ] user = user_by_anonymous_id ( kwargs [ 'anonymous_user_id' ] ) if ( user is None ) : return PROBLEM_WEIGHTED_SCORE_CHANGED . send ( sender = None , weighted_earned = points_earned , weighted_possible = points_possible , user_id = user . id , anonymous_user_id = kwargs [ 'anonymous_user_id' ] , course_id = course_id , usage_id = usage_id , modified = kwargs [ 'created_at' ] , score_db_table = ScoreDatabaseTableEnum . submissions )
consume the score_set signal defined in the submissions api .