added keybinding for full preview on old assignments page

fixes CNVS-3688

test plan:
go to assignments page (not draft state)
tab onto an assignment (or use j/k to get to one)
press "f" and you should be redirected to that assignment page

Change-Id: Ia155393c5c37a4e9bc3351af32ff6042d3a20d8c
Reviewed-on: https://gerrit.instructure.com/27112
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Calendar Group Scheduler: fixed accessibility issues with deleting timeblocks

Clarified what the delete timeblock control  does for screen reader users and
  prevented keyboard focus from getting lost after activating it.

Fixes CNVS-6610

Test plan:
- Visit the group event scheduler
- Verify that the label on the delete time block has a label more meaningful
  than simply "delete" for screen reader users.
- Verify that when pressing enter on the delete control using a keyboard, the
  keyboard focus is taken to the first timeblock, and not lost somewhere else
  on the page.

Change-Id: Ic22bae224ec0830b01c3c84a44893a00204b3879
Reviewed-on: https://gerrit.instructure.com/26746
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
turn on new groups by default, closes CNVS-9878

test plan:
1. go into an account that doesn't have the enable_manage_groups2 setting
   set yet.
2. you should see the new group management ui
3. set it to true
4. you should still see the new ui
5. set it to false
6. you should see the old ui again

Change-Id: Ifdf5a75423370013be8e4747e1cb512e69db8ecb
Reviewed-on: https://gerrit.instructure.com/27116
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Reviewed-by: Jeff Belser <jbelser@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
update wiki page view count using AR

makes it shard safe and detectable by auto-switch-to-master

Change-Id: Ia19c9c8afc607be480d790a9f6890e7d5223f7c4
Reviewed-on: https://gerrit.instructure.com/27155
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
spec: intermittent calendar_spec delete event tweak

Change-Id: Ibfcd342eded7e40b99b118235c40d483eb89276d
Reviewed-on: https://gerrit.instructure.com/27096
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <kyler@instructure.com>
QA-Review: Kyle Rosenbaum <kyler@instructure.com>
Product-Review: Kyle Rosenbaum <kyler@instructure.com>
Reviewed-by: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
spec: courses_spec gradebook redirect tweak

Change-Id: I106f0170357ccc2cc369f8423b79191ba6b2314e
Reviewed-on: https://gerrit.instructure.com/27029
Reviewed-by: Kyle Rosenbaum <kyler@instructure.com>
Product-Review: Kyle Rosenbaum <kyler@instructure.com>
QA-Review: Kyle Rosenbaum <kyler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
hide Diigo from UI

fixes CNVS-9843

Test Plan
Visit the user settings page and verify that the Diigo button does not show

Change-Id: I6526d902f04574e6a13fd4004bb376702d928301
Reviewed-on: https://gerrit.instructure.com/27006
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
manage focus with rubric on submission page

fixes CNVS-8916

test plan:
- create an assignment with a rubric
- go to /assignments/:id/submissions/:user_id
- using a screenreader, open the rubric with "show rubric"
- it should move focus to the rubric close button
- close the rubric with the button
- it should move focus back to the "show rubric" link

Change-Id: I3dcaea5bf8339ddf352a1619beec46ffa4c3a900
Reviewed-on: https://gerrit.instructure.com/27110
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Aaron Cannon <acannon@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
spec: cleanup selenium code in common.rb

Change-Id: I2f243ef32487cdd683463c7755839ea6c0575f8a
Reviewed-on: https://gerrit.instructure.com/27161
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
remove @domain_root_account for api specs

fixes CNVS-9899

test plan:
 - specs should pass

Change-Id: I5e4e1d32dd8bf55a9ed821361a45c7b65b6c3a81
Reviewed-on: https://gerrit.instructure.com/27159
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
spec: sequel gem for fireworks

Change-Id: Ib53775765d400ce5818f10a47119f15262df3727
Reviewed-on: https://gerrit.instructure.com/27203
Reviewed-by: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
fix gb2 for multiple student view students

fixes CNVS-9889

Test plan:
  * make a course with a student view student
  * delete the student view student
  * make another student view student
  * bring back the original student view student (now you have 2)
  * load gb2
  * the student view students should both be displayed at the bottom
    (no matter how you sort the gradebook)

Change-Id: Id53cbe11923440ed0fedd1f965424c647a5a6f96
Reviewed-on: https://gerrit.instructure.com/27172
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Clare Strong <clare@instructure.com>
fix migration issue for populating duedatecacher

Since temp tables are cleared in data fixups the temp table for the update is
being cleared and throwing errors during migration to beta.

Change-Id: I780f0341c504b5bc45c78331c3065000e35891cd
Reviewed-on: https://gerrit.instructure.com/27169
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QuizQuestion::AnswerParser refactor and clean up

fixes
CNVS-8975,CNVS-8976,CNVS-8974,CNVS-8973,CNVS-8971,CNVS-8972,CNVS-8970,CNVS-8965,CNVS-8966,CNVS-8967,CNVS-8968,CNVS-8969

this commit addresses each of the answer format tickets, with minor
refactoring and cleanup.

Test Plan
Make sure all questions can be created and edited normally.

Change-Id: I65fc184b2ea9bb5cc76e4167bd57031be1f4e3ce
Reviewed-on: https://gerrit.instructure.com/27122
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
validate quiz score is numeric with a reasonable value when creating a graded survey

fixes CNVS-3637, CNVS-1421

test plan:
- as a teacher
  - create a new graded survey
  - setting score to a valid number should save
  - setting score to a string should give a validation error
  - setting score to a number > 2,000,000,000 should give a validation error
  - setting score to a number < 0 should give a validation error
  - the validation errors should show up after you change the value and move to the next field
  - the validation errors should also show up if you attempt to save the quiz

- as a student
  - take the graded survey and make sure that you can successfully complete the survey

Change-Id: Idea8732169ded62569483c2c872e928a05f86ef0
Reviewed-on: https://gerrit.instructure.com/27119
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
TinyMCE: prevent keyboard trap after switching to the HTML edit view

When a keyboard user presses enter to switch to the HTML edit view, their focus
is now set to the textarea field. It also prevents the HTML editor field from being hidden from screen reader users

fixes CNVS-6534

Test plan:
- Visit all WYSIWYG editors that offer a link for switching to an HTML edit
  view, such as the editors available on:
  - EPortfolio
  - course wikis
  - Quiz/assignment editors and submission pages
  - discussion topics
  - etc.
- Navigate to the switch view link with the keyboard.
- With the WYSIWYG editor active, press enter on that link.
- Verify that focus is placed in the HTML editor textarea.
- Verify that focus can still be changed by use of the keyboard, such as with
  the tab and shift-tab keys.
- Verify that the textarea in the HTML editor is not hidden for screen reader users.
- Because this change was not able to be made in one single location, verify
  that all WYSIWYG editors that offer the HTML edit option exhibit the above
  behaviors.

Change-Id: Ibe0793457fbc0381f24fca9399c2a79a4a79ff74
Reviewed-on: https://gerrit.instructure.com/26477
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
add new profile modal layout

fixes CNVS-9756

test plan:
  * navigate to user profile settings page;
  * click their avatar and verify that the modal is empty
    but for navigation pills at the top that can be
    selected.

Change-Id: I6737fb25a4de644e3e2db99ebc4d5b8436e915cb
Reviewed-on: https://gerrit.instructure.com/26843
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
discussion draft state backend

fixes CNVS-9263

test plan
be sure to test ungraded discussions, graded discussions, graded
group discussions (root level and group topics), and announcements

with draft state disabled
- ensure publish icons do not appear on discussion index page
- ensure publish button does not appear on discussion show page
- ensure that discussions for delayed posting are not visible to
 students

with draft state enabled
- ensure that publish icons appear on the discussion index page and
 that clicking them toggles the discussion's publish state
- ensure that publish button appears on the discussion show page
 and that clicking it toggles the discusssion's publish state
- ensure that unpublished topics are not visible to students
- ensure that published topics are visible to students, even if
 the topic is for delayed posting
- ensure that topics for delayed posting show a 'This topic will
 open on' message on the topic show page
- ensure that [un]publishing the root topic of a graded group
 discussion changes the group level discussion and vice versa
- ensure that announcements are published when posted and cannot
 be unpublished

test plan for misc frontend fixes
- as a teacher, create a new discussion
- ensure it is unpublished
- as a student, create a new discussion
- ensure that it is published and that no publish button appears
 on the topic show page or the topic index page

- as a teacher, create a new graded group discussion
- navigate to the group level topic
- publish the topic using the button on the show page
- ensure that the button switches to the 'Published' state

- as a teacher, create an announcement
- ensure that it is published

Change-Id: If0c46d232bc25776770012654af23e5cf10bbb45
Reviewed-on: https://gerrit.instructure.com/26654
QA-Review: Joel Hough <joel@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Clare Strong <clare@instructure.com>
validate the length of sis ids on the rails side

fixes CNVS-9902

test plan
 - set sis id to longer than 255 char
 - should not throw database error

Change-Id: If72466dc91c1ef48ac91b5e9d7a92bea62c88c50
Reviewed-on: https://gerrit.instructure.com/27164
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Add optional parent coenrolment banner on /login page

fixes CNVS-9350

test plan:
1. Enable the parent coenrolment banner through script/console with:
    a = Account.default;
    a.settings[:self_registration] = true;
    a.settings[:self_registration_type] = 'observer'
    a.save;
2. Verify that /login shows "click here for a parent account" banner.
3. Click that banner.
4. Verify that clicking "Start Participating" without filling out the
   form pops up all of the "Required field" error messages.
5. Verify that submitting bad info (e.g. an email address without an @
   sign) pops up appropriate error messages as well.
6. Enter good info (using a student account you previously registered)
   and verify that you get the the /?registration_success=1 page.

Change-Id: I9920f8599beafee584d574f4f6748d8a298a8bd2
Reviewed-on: https://gerrit.instructure.com/26680
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>