Ensures that all folders will be listed in wikiSidebar file upload
folder list regardless of the order in which files are processed.

Fixes #363

Before testing commit:
 * Create a folder in a course which comes before "course files" alphabetically.
 * Edit a page. Open the "Files" tab in the sidebar.
 * Click "Upload a new file."
 * Note that the folder you created (for example "class lectures") is not present in the list of folders to which you can upload.

Test plan:
 * Create a folder in a course which comes before "course files" alphabetically.
 * Edit a page. Open the "Files" tab in the sidebar.
 * Click "Upload a new file."
 * Note that the folder you create (for example "class lectures") IS present in the list of folders to which you can upload.
Solving Email URL and Recipient
Solved URL bug in other email templates
assessor_name should be the 'displayed user name (short_name)' in rubric assessments instead of 'private user name'
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>