remove default_wiki_wiki_pages relations fixes #10993

it was a has_many :through that is broken for auto-created wikis

existing specs cover all changes except /undelete page, which
is unsupported

test plan:
 * ensure user's rss feed can be opened correctly
 * ensure wiki sidebar loads and has wiki pages in it

Change-Id: I7c3f0f68641b67f602e6b412ab5a386140bb68b2
Reviewed-on: https://gerrit.instructure.com/14023
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
allow access to gradebook2 with :manage_grades permissions.

fixes #10556

users with :manage_grades permissions that don't have
:view_all_grades permissions should be able to view and
use the gradebook without receiving permissions errors.

test plan:
  * create a custom role that has :manage_grades permissions
    but not :view_all_grades permissions;
  * as that user, attempt to load gradebook2 and verify that
    it loads as expected.
  * smoke test other roles to ensure that they continue to
    work as expected.

Change-Id: Ifbf2c2d9352fe6429497b5c54c269c4973ba7a26
Reviewed-on: https://gerrit.instructure.com/13781
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
change delayed_jobs.handler to text

test plan:
 * make sure delayed jobs still run

Change-Id: Idf2ed293d80124176161b7de801c9b0ae1d80465
Reviewed-on: https://gerrit.instructure.com/13994
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
don't force cache of xhr and api requests

we threw some code in a long time ago to prevent
getting stale pages when you hit the browser's back
button. but we don't need the same behavior for
xhr and api requests (in fact, we WANT to send a
304 when we can)

Change-Id: I3e06034d8e74da7497cf66aaf47b46f6e35964ac
Reviewed-on: https://gerrit.instructure.com/13935
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
limit the submit_to_turnitin job max attempts

now that it's on a strand, it's important we don't retry 15 times
because that'll hold up the rest of the jobs on the strand.

test plan: no user-visible changes, though admins can see the new max
attempts in the /jobs ui

Change-Id: I4b032b88c62e053528096337eecc6caaaa3337cb
Reviewed-on: https://gerrit.instructure.com/14047
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
spec: people_spec validation intermittent failure

Change-Id: I1137fe3c16829e35f92a28c67f86d485f1226e21
Reviewed-on: https://gerrit.instructure.com/14028
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
fix google previews in speedgrader

Test plan:
  * disable scribd/crocodoc
  * submit an assignment that can be previewed in google
  * open the submission in speedgrader
  * make sure it previews inline rather than showing the submission
    details page

Change-Id: I0b71d7f80b3b5cc48f09d8a81298a9aafb62f90f
Reviewed-on: https://gerrit.instructure.com/14039
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
spec: fix intermittent selenium failures

* mark profile selenium spec as pending
* make alphabetic file sorting spec more robust

Change-Id: I4a173948c260b0cb043fce2662de6d49d830f5eb
Reviewed-on: https://gerrit.instructure.com/14056
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
speedgrader: warn when not previewing in crocodoc

fixes #10955

Test plan:
  * submit a document that cannot be previewed in crocodoc
  * verify that a warning is displayed in speedgrader when grading that
    submission
  * disable crocodoc
  * the warning should no longer be displayed

Change-Id: I2f51b9df5db3ea4b64f73dbfa2eca15f22fc850a
Reviewed-on: https://gerrit.instructure.com/14007
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
support :conditions option for create_index

postgres only

Change-Id: Idd69c0d43ec845461b10a44364c85c22e3595dc5
Reviewed-on: https://gerrit.instructure.com/14063
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
fix kaltura previews in full_files (fixes #11047)

Test plan:
  preview a media object in course or user files and make sure it plays

Change-Id: I44f0ae788f4b02cb5399945336ff0656fa428f56
Reviewed-on: https://gerrit.instructure.com/14076
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
spec: be more tolerant of plugins using cache

Change-Id: I24fa386546791b34d790034517118cbdde3e60e2
Reviewed-on: https://gerrit.instructure.com/14058
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
disable cross-shard conversations for the interim

to reduce confusion

test plan:
 * go to conversations on a shard other than your own
 * it should redirect back to the dashboard with a helpful message

Change-Id: I083a7fcb88bb3abdc40ad0bbf45c24ac6f237886
Reviewed-on: https://gerrit.instructure.com/14080
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
consistently display assignment mute icon. fixes #8385

previously, mute icon was not displaying inside of the gradebook
for assignments with titles wider than the assignment column. this
commit makes the mute icon visible by left-aligning it with the
assignment title (instead of right-aligning it).

test plan:
  * inside a course, create an assignment with a long name that
    overflows the assignment column in gradebook/gradebook2;
  * from either gradebook, mute the assignment;
  * in both gradebooks, verify that the mute icon is visible and
    is now left-aligned to the assignment title.

Change-Id: I0a12fdd05ab2bdd570f018d4fbf2ecdef913cb43
Reviewed-on: https://gerrit.instructure.com/14065
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
load tinychat over https. fixes #10470

use our own tinychat embed script to ensure it is loaded
over https instead of http. this allows it to load properly
in chrome and other browsers that restrict non-https content
during an https request.

test plan:
  * load canvas over https;
  * in chrome, navigate to a course chat page and verify that
    tinychat loads without any errors.

Change-Id: I119b218ad03d91c39405529cf1604068514b07ee
Reviewed-on: https://gerrit.instructure.com/13899
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
plugins initializing before initializers strikes again!

fixes #11033

Change-Id: I43a594249a6d22ed50e1c11c2b01d18b8afc80c3
Reviewed-on: https://gerrit.instructure.com/14059
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
spec: role recontexting and file naming refactor

  test:
   1. refactored attribute(class) with have_class
   2. contexted no context specs
   3. split out teachers and student specific specs
   4. refactored have_attribute
   5. refactored eql => ==

Change-Id: I592a063eece8097d5672c164f82a7b1a0c3c8928
Reviewed-on: https://gerrit.instructure.com/13880
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Email replies to locked topics should be ignored.

fixes #9594

test plan:
 - Configure Canvas to send emails to you.
 - Create a student account and set notifications for annoucements and discussions to "ASAP."
 - Create an annoucement and a discussion and make sure you get the notification emails.
 - Reply to the notification emails and see that the replies get posted as normal.
 - Lock the announcement and discussion.
 - Reply to the emails again and see the replies don't get posted.
 - See that you get an appropriate bounce message.

Change-Id: I4436c61a202d3285ee35a9f9002cefa0f18954fd
Reviewed-on: https://gerrit.instructure.com/13912
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
remove unused twitter tables and no-op jobs

test plan:
 * edit course settings, there should not be an error
 * copy a course, there should not be an error

Change-Id: I733bef83b69d9c513be801d3e4b25422bcd10ebd
Reviewed-on: https://gerrit.instructure.com/13832
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
correctly conclude observer enrollment

if an SIS update tried to conclude an observer of a student
who was already concluded, that observer enrollment ended up
duplicated with one concluded enrollment and one active.

Test Plan:
 * Create a student with an observer
 * In an sis update conclude the enrollments with the student's row first
   (you can look at the example in the added spec)
 * Both users should be concluded and only have one enrollment

closes #11050

Change-Id: Iaf63f005397f7b93403e0fd032335bf0a1f364d2
Reviewed-on: https://gerrit.instructure.com/14094
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>