Fix up the ora2 scores affected by the track changes bug.

  For affected assessments:
    - Sets PeerWorkflowItem.scored = 0 if currently = 1
    - Recalculates the score for the submission
    - If new score > old score, update the Score.points_earned with the new score
Ok, I think it's good.

On Wed, Oct 29, 2014 at 3:00 PM, David Adams <notifications@github.com>
wrote:

> In common/djangoapps/fix_bad_data/correct_ora2_data.py:
>
> > +    for track_change in track_changes:
> > +        owner_submission_uuid = track_change.owner_submission_uuid
> > +        scorer_id = track_change.scorer_id
> > +
> > +        # Change the scored flag on associated PeerWorkflowItem to 0
> > +        # so it is not considered in the score calculation
> > +        change_scored_flag(owner_submission_uuid, scorer_id)
> > +
> > +        # Get the existing score for this submission
> > +        try:
> > +            points_earned = get_submissions_score(owner_submission_uuid)
> > +        except IndexError:
> > +            continue
> > +
> > +        # Calculate new score; PeerWorkdlowItems with score=0 are not considered
> > +        new_generated_score = generate_score(owner_submission_uuid)
>
> I had a typo, should be PeerWorkflowItem.scored = 0
>
> The peer assessment grading works by summing the median of the individual
> scores.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Stanford-Online/edx-platform/pull/146/files#r19575525>
> .
>