also pins all migrations to Rails 4.2 semantics
Change-Id: I386566f7a1f3e3e8aa31675f467c87c443457aee
Reviewed-on: https://gerrit.instructure.com/95571
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-13521,CNVS-13489
This commit adds 3 things. One is a fix for deleting a poll_session when
there are poll_submissions created already for the poll_session. The
second is the addition of a new attribute on poll_choices called
'position'.
The 'position' attribute specifies the order a poll choice should be
returned in. The third is the visibility of poll sessions to students:
as long as a student is enrolled in the course (and course section, if
it exists on the poll session) associated with the poll session, they
can access it, whether or not it's open or closed.
Test plans
1. Deleting a poll session
As a teacher
- Create a poll and related poll session
- Open the poll session for submissions
As a student
- Create a submission for the newly created poll session
As a teacher
- You should be able to delete the poll session
2. Position ordering attribute
As a teacher
- Create a poll
- Create poll choices, passing along the 'position' attribute to specify
ordering (try to mix these up, e.g. create a poll choice with a
position
of 2, then a poll choice with an position of 4, then a poll choice with
an position of 3, then a poll choice with an position of 1)
- Retrieve the poll choices for the poll with the poll choices index
endpoint
- The poll should be returned in the order they were specified using the
'position' attribute
3. Poll session visibility to students
As a teacher
- Create a poll
- Create an associated poll session with a valid course
As a student enrolled in the given course
- You should be able to view the poll session whether or not it's open
or closed.
As a student not enrolled in the given course
- You should not be able to view the poll session, whether or not it's
open or closed.
Change-Id: Ifabd64540d843c83f3a22fb6668c4fcac8f728b0
Reviewed-on: https://gerrit.instructure.com/36087
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>