Closes CNVS-15109, CNVS-15173
CHANGES
-------
- "auto-grading" of due submissions that was previously done
synchronously in the index action is now done in a DJ
- when viewing the index page, you don't get to see due/available
dates on load, instead the dates are fetched on the client-side and
load progressively
- new API endpoint for retrieving assignment overrides for a bunch of
quizzes at [GET] /courses/:course_id/quizzes/assignment_overrides
- we now cache the user's quiz permissions
- Canvas AMS API serializer now accepts a new option, see docs
- QuizSerializer behavior changed radically:
- "takeable", "submitted_students", "unsubmitted_students" disabled
- all associations disabled including the submission, assignment
group, and any student participants
- it can now utilize preloaded permissions
Rationale behind disabling things in the serializer is that these were
exclusive for the "show" action, so the next step forwards is to
allow the serializer to recognize different "modes" for output (e.g, for
index and one for show) and tailor the associations/fields accordingly.
Using "#filter" right now isn't cutting it, because assocs get loaded
anyway.
REFACTORING
-----------
- broke down index into three actions for visibility:
1. default, Draft-State version
2. legacy non-DS version that's not reachable in the UI, kept around
until we upgrade the tests
3. ember version
- legacy non-DS ERB code goes into its own file
- moved code that used to grade due submissions inside index to
SubmissionGrader in preparation to remove it from there entirely
- cleaned up internal docs for the Canvas AMS api serializer
TEST PLAN
---- ----
- create ~30 quizzes
+ make one of them have many questions
+ make a good number of submissions (i tested with 420 and 20
students)
- create multiple sections
+ specify date overrides for certain sections, and have at least one
student enrolled in that section
- as a teacher and/or an observer, go to quizzes index
+ verify the page renders fine
+ verify that you see "loading indicators" in the due/available
field which get replaced with actual dates when they're loaded
+ verify it's faster than the version in master (should be at least
60% faster)
- as a student in the general section, go to quizzes index
+ verify the page renders
+ verify you see the same loading behavior for dates as in teacher
view
- as a student in one of the section with overrides, go to index:
+ verify you see the overridden date
Change-Id: I741d89625da1b858148baa95e881fcc75c1802e5
Reviewed-on: https://gerrit.instructure.com/40350
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>