Yeah... it does seem better. Now that this is merged to master, does that
mean I need to create yet another migration script?


On Wed, Mar 26, 2014 at 10:25 AM, David Ormsbee <notifications@github.com>wrote:

> In apps/openassessment/assessment/peer_api.py:
>
> > -        timeout,
> > -        graded_by
> > -    )
> > -    return sub
> > +    try:
> > +        peer_workflows = list(PeerWorkflow.objects.raw(
> > +            "select pw.id, pw.submission_uuid "
> > +            "from assessment_peerworkflow pw "
> > +            "left join assessment_peerworkflowitem pwi "
> > +            "on pw.id=pwi.author_id "
> > +            "where pw.item_id=%s "
> > +            "and pw.course_id=%s "
> > +            "and pw.student_id<>%s "
> > +            "and pw.graded_count < %s "
> > +            "and pw.id not in (select pwi.author_id from assessment_peerworkflowitem pwi where pwi.scorer_id=%s) "
> > +            "and (pwi.scorer_id is NULL or pwi.assessment_id is not NULL or pwi.started_at > %s) "
>
> I think I would prefer that, if it's all the same. Especially since the
> number required for peer grading may change over the lifetime of the
> problem. If someone increases the requirement from 3 to 4, we don't want to
> be pulling from the top of the list those that have already gotten scored.
> Especially since that would introduce the bad performance case -- lots of
> workflow items and lots of workflows that are no longer in completed state.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-ora2/pull/208/files#r10978109>
> .
>