closes GRADE-1480
test plan:
A. Setup
1. Create a published course
2. Enroll one teacher
3. Enroll two TAs
4. Enroll three students
5. Create a moderated assignment
* with Teacher as final grader
6. As the first TA:
a. Visit SpeedGrader for the assignment
b. Grade Student 1
c. Grade Student 2
7. As the second TA:
a. Visit SpeedGrader for the assignment
b. Grade Student 2
c. Grade Student 3
8. Open the Rails console
9. Note these attributes of the provisional grades:
* `id` (provisional grade id)
* `user_id` (student id)
* `scorer_id` (grader id)
assignment = Assignment.find(:id)
assignment.pluck(:id, :user_id, :scorer_id)
B. Verification without Anonymity
* To test bulk selection, send a PUT request to:
/api/v1/courses/:course_id/assignments/:assignment_id/
↪ provisional_grades/bulk_select
* Use a session for the final grader
* Include in the request body an object as follows:
{provisional_grade_ids: […]}
* The array will contain some of the provisional grade ids
noted from the Rails console
* The response will include an array of objects as follows:
{
"assignment_id": "1",
"selected_provisional_grade_id": "2",
"student_id": "3"
}
* To verify grade selection:
a. Log in or act as the Teacher
b. Visit the moderation page for the assignment
c. Verify the intended grades have been selected
* Each of the following steps will be done in sequence without
resetting anything to a prior state
1. Bulk select the following grades:
* TA-1's grade for Student 1
* TA-2's grade for Student 2
2. Verify the JSON includes the following grades:
* TA-1's grade for Student 1
* TA-2's grade for Student 2
3. Verify the following grades are selected:
* TA-1's grade for Student 1
* TA-2's grade for Student 2
4. Bulk select the following grades:
* TA-1's grade for Student 2
* TA-2's grade for Student 3
5. Verify the JSON includes the following grades:
* TA-1's grade for Student 2
* TA-2's grade for Student 3
6. Verify the following grades are selected:
* TA-1's grade for Student 1
* TA-1's grade for Student 2
* TA-2's grade for Student 3
7. Bulk select the following grades (listed in this order):
* TA-1's grade for Student 1
* TA-2's grade for Student 3
* TA-1's grade for Student 3
8. Verify the JSON includes the following grades:
* TA-1's grade for Student 3
9. Verify the following grades are selected:
* TA-1's grade for Student 1
* TA-1's grade for Student 2
* TA-1's grade for Student 3
B. Verification with Anonymity
1. Enable anonymous grading for the assignment
2. Bulk select the following grades:
* TA-2's grade for Student 2
* TA-2's grade for Student 3
3. Verify the JSON includes "anonymous_id"
4. Verify the JSON excludes "student_id"
e1d4b3ee4d
Change-Id: I51190808a9dfd321c6110f50d6d0e4661fa86c1c
Reviewed-on: https://gerrit.instructure.com/161215
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>