test plan:
* Create a course with multiple sections
* Enroll students in both sections, and submit assignments. Keep
track of how many submissions were made in each section.
* Create a TA in one section, with limited privileges, and log in
as that TA.
* Check the to-do list on the right panel, and make sure it only
includes submissions from the TA's section.
* Check the TODO items API, and make sure the needs_grading_count
figure only includes submissions from the TA's section.
* Check the needs_grading_count in the Assignments API;
it should include only submissions in the TA's section
* Check the needs_grading_count in the Courses API;
it should sum all the submissions to all the assignments
in the TA's section of the course
Change-Id: I5f1f47321bb909abc24deabdfa47b8301dc83d8f
Reviewed-on: https://gerrit.instructure.com/14026
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
affects: user api
test plan:
* as a user with a grading todo, make the api call
and verify that you are returned a link to the
speed grader;
* as a user with a submission todo, make the api call
and verify that you are returned a link to the
assignment/quiz submission page.
Change-Id: I4cf6a9a1197b853a826f4bba728935925576a9ec
Reviewed-on: https://gerrit.instructure.com/7610
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
fixes#6510
Most of this is a refactor so that all API JSON generation goes through
an api_json method, in order to standardize stuff like permissions and
:include_root. The existing specs verify that this doesn't inadvertently
change any existing responses -- except the discussion topics responses,
which were returning the :permissions array in the json unintentionally.
The refactor fixes the locked assignment response as a side effect.
Change-Id: I287b366fe05ef6116f713fc52075aff93d5e87b6
Reviewed-on: https://gerrit.instructure.com/7262
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>