canvas-lms/app/models/assignments
Ethan Vizitei 173ab80f3a needs_grading by section for mobile
fixes CNVS-14375

Previously grading counts were only available
aggregated as a count for the assignment. This
lets you consume them split out by section
rather than.

needs_grading_count_by_section is the flag
to send.  This also splits out the needs_grading
query off into it's own object to reduce the
cognitive load of working in the assignment model.

TEST PLAN:
 - setup a course with multiple sections and
    assignments that need grading for students in
    each
 - hit the assignments API index with the
    "needs_grading_count_by_section" parameter set
    to true
 - the JSON response should include a
     "needs_grading_count_by_section" key for
     each assignment and it should have a hash
     of section ids and counts

Change-Id: I290a080b5f657996423798cacfb37660f5ed427c
Reviewed-on: https://gerrit.instructure.com/39627
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2014-09-08 13:21:31 +00:00
..
needs_grading_count_query.rb needs_grading by section for mobile 2014-09-08 13:21:31 +00:00