Revert "spec: reruns with ruby sel driver"

This reverts commit b0face8c19796fbf0038841be342b746200f2154.

Change-Id: Icdfe88033aa9ba9339a7f7a0349d24b32907c840
Reviewed-on: https://gerrit.instructure.com/26494
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
fix issue where hitting the back button while taking a quiz stops backing up answers

fixes CNVS-9607

test plan:
- create a quiz with a 1 minute time limit and 10 questions
- take the quiz and half way through hit the back button
- choose to stay on the page
- continue to answer questions
- close the window without submitting
- resume the quiz
- all questions you initially answered should have answers saved

Change-Id: Idd7a6bdf83423ce5286768e2019d1cd0d2f044ae
Reviewed-on: https://gerrit.instructure.com/26493
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
assignment cog wheel is tabbable for keyboard users

fixes CNVS-9529

test plan
- with VO and with JAWS
- use keyboard to tab through items on assignment index page
- verify that assignment group and assignment cog wheel are tabbable
- verify that VO/JAWS read the correct info for the cog wheels
- verify that keyboard tabbing works in all browsers

Change-Id: I9b8ea8e81b8e0f7e157331d3f0589d2686038ae1
Reviewed-on: https://gerrit.instructure.com/26396
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Aaron Cannon <acannon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
add teacher configuration of student organized group enrollment type

fixes CNVS-9363

test plan:
* create a student organized group
* log in as a teacher
* go to the new group management page
* select the "Student Groups" group set
* click on the "+ Group" button
* verify that you can select a join level
**  (either "Members are free to join" or
**          "Invitation only")
* select "Members are free to join"
* enter a group name
* hit save
* log in as a student
* go to /courses/:course_id/groups
* verify that the group you created appears
**  in the "Available Groups" listing
*******************************************
* log in as a teacher
* verify that the "Joining" option only appears
**  when adding or editing a group in the
**  Student Groups group set

Change-Id: I42c49869d68bebd6deb0ba9beff1fd0e94871911
Reviewed-on: https://gerrit.instructure.com/26304
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
intial ember quizzes skeleton with updated build

close CNVS-9396, CNVS-9515

test plan:
  - verify that ember app specs run as part of rake js:test
  - enable new quizzes flag
  - visit quiz index
  - verify that ember quiz app is instantiated (should see in console)

Change-Id: I4f5a0feb4b3dcd7c3055042f173207f3b8f0f0b6
Reviewed-on: https://gerrit.instructure.com/26263
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
automatically repair data before fixing unique index

Change-Id: I4d5689fe8872654f8c91233017ad1e1894a7dc2b
Reviewed-on: https://gerrit.instructure.com/26414
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fix issue where hitting the back button while taking a quiz stops backing up answers

fixes CNVS-9607

test plan:
- create a quiz with a 1 minute time limit and 10 questions
- take the quiz and half way through hit the back button
- choose to stay on the page
- continue to answer questions
- close the window without submitting
- resume the quiz
- all questions you initially answered should have answers saved

Change-Id: Idd7a6bdf83423ce5286768e2019d1cd0d2f044ae
Reviewed-on: https://gerrit.instructure.com/26493
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
import webct multiple short answer questions as fimb

test plan:
* import the course referenced in the ticket
* the question previous imported as short answer
should now be imported as a fill-in-multiple-
blanks question

fixes #CNVS-9355

Change-Id: Ia8f175249513bc4443a8ba339f867f3905f1d17d
Reviewed-on: https://gerrit.instructure.com/26447
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Editing a group name immediately changes the name in the UI

fixes CNVS-9319

Test Plan:
* Log in as teacher
* Navigate to /courses/:course_id/groups
* Create a new group set by clicking “+ Group Set”
* Create a new group by clicking “+ Group”
* Click the cog next to the group and click “Edit”
* Change the name and click save
* Observe the new name immediately reflected in the UI.

Change-Id: I91e5b008458dbd825c8098600692e07ebb941295
Reviewed-on: https://gerrit.instructure.com/26358
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Reviewed-by: Jeff Belser <jbelser@instructure.com>
update feature flag hidden feature ui

fixes CNVS-9613

test plan:
  * as a site admin, navigate to site admin settings page
    and click "feature options" tab;
  * verify that hidden badge appears next to hidden
    features;
  * allow a hidden feature;
  * reload the page and verify that hidden badge still
    displays next to the allowed feature;
  * navigate to a root account settings page and verify
    that, as site admin, you can still see the hidden
    badge;
  * as an account admin, verify that you see the feature
    but that there is no hidden badge next to it;
  * as a site admin, turn off the now enabled hidden
    feature;
  * verify that the account admin can no longer see the
    now disallowed hidden feature.

Change-Id: I5b39ab11bda3b867e9f23f210bb2a4bd31536052
Reviewed-on: https://gerrit.instructure.com/26498
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
write zip reports to csv file then add file to zip

fixes CNVS-4418

test plan
 * run sis export report with multiple files
 * should return zip file
 * run other reports
 * they should still work

Change-Id: Ibfa598c12b730a54aee1c5af9fdb6c08d7e0cb36
Reviewed-on: https://gerrit.instructure.com/26197
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
return 'hidden' flag in list features API

test plan:
 - as a site admin
  - use the list features API and verify the hidden features
    have hidden=true returned
  - allow a hidden feature in site admin
   - use the list features API and verify the feature
     still has hidden=true even after state=allowed
 - as a root admin (no site admin rights)
  - use the list features API and verify no hidden features
    are returned

Change-Id: I50fd9d1be388d0a4f0ae8de1d555aafe70cb6129
Reviewed-on: https://gerrit.instructure.com/26428
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Prevent screen readers from treating the Time Block headers as a data table

fixes CNVS-6613

Test plan:
- Visit the  Create an Appointment Group screen with a screen reader.
- Read the Date and Time headers
- Verify that they are not reported as being inside a table by the screen
  reader.

Change-Id: I4ba5c8ac7114e592a0bc741e2102118f27d6f0e8
Reviewed-on: https://gerrit.instructure.com/26307
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
updates to draft state modules page

- don't publish/unpublish files yet
- change meaning of published on attachments from
  'hidden' to 'locked' because 'locked' determines
  visibility, not hidden.

Change-Id: Iac6c32dc02f68e39ff4a968f072d14c9424be5a5
Reviewed-on: https://gerrit.instructure.com/26241
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
discussions: add publish icon to index and show pages

fixes CNVS-9265

test plan
- ensure that the publish icon is not visible when the account
 level draft state variable is unset
- ensure that the publish icon is visible when the account level
 draft state setting is set
- ensure that ungraded topics with no replies can be published/unpublished

Change-Id: Ia93b91aa54812610e5c07e063f512e605d6235f2
Reviewed-on: https://gerrit.instructure.com/23470
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
don't save a ContentMigration for AcademicBenchmark before all the fields have been set

Change-Id: I0f4bce0d47ac3e42e67976882b25771de64432de
Reviewed-on: https://gerrit.instructure.com/26518
Reviewed-by: Jake Sorce <jake@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Quiz Submissions API - Index

Endpoints introduced:

  - GET /api/v1/courses/<course_id>/quizzes/<quiz_id>/submissions

Refactoring/changes:

  - Creating a ZIP archive has been moved, and refactored, to the
    Submission API model because it was used by both QuizSubmission
    and Submission controllers
  - time_spent is a property now exposed for QuizSubmission objects
  - new API spec shared example group 'API tests':
    - new API spec helper 'assert_jsonapi_compliance!' that tests a
      given API response for compliance with the JSON-API format
      specification

fixes CNVS-8978, CNVS-8923

Change-Id: I6a18e35a2bcd0ebe357faff46c18f1bce54ddac0
Reviewed-on: https://gerrit.instructure.com/26073
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
Controlling visibility of student quiz scores

Teachers can now control when, and for how long, students get to see the
correct answers to their quiz submissions.

The patchset introduces two new columns to Quiz and a CSS rework of the
quiz options form. See linked references for more info.

Quiz#show_correct_answers should no longer be directly accessed, use
Quiz#show_correct_answers? instead.

== Test plan

CAs stands for Correct Answers.

  - Create a quiz with 3 questions
  - Take the quiz as a student, and:
    - get 2/3 of the questions answered correctly
    - submit it

Case A - Showing CAs the moment the submission goes in:

  - Edit the quiz, and:
    - Tick the 'Let Students See Their Score Points' checkbox
    - Leave both date fields empty
    - Save quiz
  - Refresh student view
    - You should see the CAs

Case B - Showing CAs after some date:

  - Edit the quiz, and:
    - Tick the 'Let Students See Their Score Points' checkbox
    - Set the "Show Correct Answers At" to 3-days from now
  - Refresh student view:
    - You should not see the CAs
  - Edit the quiz, and:
    - Set the date to 3-days back
  - Refresh student view:
    - You should see the CAs

Case C - Hiding CAs after some date:

  - Edit the quiz, and:
    - Tick the 'Let Students See Their Score Points' checkbox
    - Set the "Hide Correct Answers At" to 3-days from now
  - Refresh student view:
    - You should see the CAs
    - You should see an alert that tells you the CAs will be hidden at
      the date you chose earlier
  - Edit the quiz, and:
    - Set the date to 3-days-back
  - Refresh student view:
    - You should no longer see the CAs
    - Alert should read that the answers stopped being visible as of the
      date you chose earlier

Case D - Creating a time-frame for showing CAs:

  - Edit the quiz, and:
    - Tick the 'Let Students See Their Score Points' checkbox
    - Set the "Show Correct Answers At" to yesterday
    - Set the "Hide Correct Answers At" to 3-days from now
  - Refresh student view:
    - You should see the CAs
    - You should see an alert that tells you the CAs will be visible
      between yesterday and 3 days from now
  - Edit the quiz, and:
    - Set the "Show At" date to tomorrow
  - Refresh student view:
    - You should no longer see the CAs
    - Alert should still tell you that the CAs will be visible starting
      tomorrow until 3 days from now

Case E - Choosing a bad range

  - Edit the quiz and:
    - Tick the 'Let Students See Their Score Points' checkbox
    - Set the "Show at" to tomorrow
    - Set the "Hide at" to today, or tomorrow
    - You should see an error-box

== Notes and really wild things

- http://docs.kodoware.com/canvas/cnvs-8103-take2
- http://docs.kodoware.com/canvas/cnvs-8103 (legacy changes)

refs CNVS-8103, CNVS-9386

Change-Id: Ib241ee5f143b87164105b7541aadac00f38f79ad
Reviewed-on: https://gerrit.instructure.com/25505
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
calendar: simplify handling of role="button" elements

test plan:
  * open calendar 2 with agenda view enabled
  * verify that you can click the following elements
   using the mouse, keyboard, and screenreader:
    * the date selection header
    * the sidebar expand/collapse titles
    * the sidebar calendar checkboxes
    * the agenda events
  * verify that, without a screenreader, clicking with
   "enter" triggers on keydown and clicking with "space"
   triggers on keyup
  * verify that the event details popup close link
   is announced properly in a screenreader
  * verify that the calendar header has proper vertical
   alignment, including when picking a date
  * verify that focus is set to the first undated item
   when opening the section but not when enabling a calendar
  * verify that "loading undated events" is announced only
   when the undated events section is open and the events
   are not cached

Change-Id: I00dbe26a9dddec7633b017259d3474b734e19da5
Reviewed-on: https://gerrit.instructure.com/26359
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
use file_download_url+verifier for discussion attachments

since these are attached to the user now, instead of
the course, after commit 5ab1d2.

test plan:
 1. enable "let students attach files to discussions" in
    a course's settings.
 2. create a graded discussion.
 3. as a student, post to the discussion and attach a file.
 4. as a teacher, view the post in SpeedGrader
    and ensure the attachment can be downloaded

fixes CNVS-9572

Change-Id: I503fb63db8325c5851408cc4d092aafad7afe10f
Reviewed-on: https://gerrit.instructure.com/26468
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>