a few helper methods for region-ness

closes CNVS-15955

Change-Id: Idc155f75e2ed04c39c43f8e095a76848283a6af1
Reviewed-on: https://gerrit.instructure.com/42088
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
tweak region scope

refs CNVS-15955

add a scope for specifying the region

Change-Id: I9709e2d47c241115ed9a868ba1660d34e92f126b
Reviewed-on: https://gerrit.instructure.com/42101
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
more region helper method tweaks

refs CNVS-15956

Change-Id: I216bc3e200e7b75741dd424b8f5a0fdfaa467a6c
Reviewed-on: https://gerrit.instructure.com/42339
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Updated ar translation

Change-Id: I1ddfa8964ce93800b841090b783d766a7ef610c3
Updated es translation

Change-Id: I1bb9ea0dd0503109c4586ade2627da815137a478
Updated tr translation

Change-Id: I148cfa3a0188a1b15de8d3970c91e8176a3a5577
add region helper method stubs on DefaultShard

Change-Id: I6f4c255daba0d8eac688c399a62a2cb5362b034d
Reviewed-on: https://gerrit.instructure.com/42859
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
personal space for touching

Change-Id: I8ab20b64684c6c973b9f9ce1ae17fd7567096c1c
Reviewed-on: https://gerrit.instructure.com/43050
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fix new admin e-mail notification

fixes CNVS-16348

test plan:
 * add a new admin to an account
 * that person should receive an e-mail notification

Change-Id: I95b90e476f909c425b5585684c87d41ace15380d
Reviewed-on: https://gerrit.instructure.com/43070
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
add auto resize back in if no post message to resize is received

fixes: PLAT-688

test-plan:
*install the test tool
*the test tool frame size should be the full length of the screen

*put in the value you want to resize the tool to.
*it should resize

Change-Id: Ifb04ce49272d83d3f0c58ec40d896d7b443b9ad7
Reviewed-on: https://gerrit.instructure.com/43077
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
Quiz icon in Gradebook doesn't break everything

When the quiz icon shows up and is clicked on to edit, it stalls the JS
on the page, making everything uneditable.  It also doesn't allow for
editing quizzes.

Closes CNVS-16332

Test-plan:
  - Confirm quiz icon edit is functional
  - Confirm other edit fields on the page are still functional

Change-Id: If2d9e5322472ba4bd3474371e5c27b726242ba12
Reviewed-on: https://gerrit.instructure.com/43127
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
add dummy Scribd::Document

fixes CNVS-16347

this fixes version deserialization when a version references a scribd
doc

Change-Id: Id29b6ed9080935b35aa1c5905ddea93e330a43a1
Reviewed-on: https://gerrit.instructure.com/43115
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
log out specific cas ticket

fixes: CNVS-15843

Changes how we associate a CAS ticket with the Canvas session.  When we
recieve a logout request from the CAS server we mark the ticket as
expired and each time the user performes a request we check their
session cas ticket to the ticket we stored to see if its expired or not.

Test Plan:

 - Setup CAS Server
 - Log in to Canvas with a user
 - Log in to Canvas with the same user in a different browser.
 - Have the CAS server send a SLO request for one of the tickets.
 - First session should be logged out on the next request.
 - Second session should not be logged out.

For additional details see:

https://github.com/instructure/canvas-lms/pull/516#issuecomment-57340629

Change-Id: I189f70e58db6444b1747a686a6a50f46c53f3697
Reviewed-on: https://gerrit.instructure.com/42312
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>
limit home menu to in region data

fixes CNVS-16198

test plan:
 * smoke test home menu isn't busted

Change-Id: I3b410dd7d813efca6c89cb400f4d2aa2ed973b93
Reviewed-on: https://gerrit.instructure.com/42544
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Paul Hinze <paulh@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
hide rubric icons in speedgrader

When viewing a rubric in speedgrader, the "+", "X" and pencil icons
will no longer be visible.
These same icons were also showing up and non-functional at the
courses/:course_id/rubrics/:rubric_id page BEFORE clicking
the 'Edit Rubric' button. Those should not be visible anymore.

closes CNVS-16334

test plan:
- Have a course with at least 1 student
- Create an assignment that has a rubric attached
  (does not matter if the rubric is being used for grading or not)
- Have a student submit to the assignment
- In Speedgrader, view the rubric and verify the "+", "X"
  and pencil icons are no longer present when hovering over the table.
- View the individual page for the rubric (for example,
  /courses/1/rubrics/1)
- Verify the "+", "X" and pencil icons are no longer present
  when hovering over the table, before clicking the 'Edit Rubric'
  button.
- Click the 'Edit Rubric' button. Verify the icons show up when
  hovering over the table.

Change-Id: Ifbc8a57bd133fe5fe2bd3f3ee07b9b350d6fb487
Reviewed-on: https://gerrit.instructure.com/43104
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
don't load all contexts for section recipient lookup

fixes CNVS-15797

test plan
tl;dr - regression test recipient finder, it should be faster for
 sections

- as a teacher with many courses in many accounts (10ish? as long
 as it usually causes a delay in the address book), begin composing
 a message in the conversations inbox
- select a course from the context dropdown
- using the recipient finder, select 'Course Sections'
- select a section
- ensure that the delay between selecting the section and seeing
 the section users is less than before this commit
- ensure that the section user list has the same contents as
 before this commit

Change-Id: I5ede3d05c25580d9cb354dfd5a4bd03ed6a2e440
Reviewed-on: https://gerrit.instructure.com/41755
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
Respect course soft conclusion date for quiz subs

Submissions will no longer be creatable if the course has been deemed
concluded (softly; in the sense that its `end_at` overrides the term's
`end_at`, or its term has ended).

In this scenario, we now display a message to students (and teachers):

  "This quiz is no longer available as the course had been concluded."

Closes CNVS-15934

TEST PLAN
---- ----

  - create a course and open its settings page
  - set an end date to sometime in the past
    + do NOT check the option "Users can only participate in the course
      between these dates" yet
  - create a quiz in that course, with like a single question and
    unlimited attempts, and then publish it
  - in another tab as a student, go to the quiz take page, and take it
    once, hand it in, then stay on that page where you can see "Take
    this Quiz Again"
  - now in the teacher tab, edit the course settings and turn that
    option on, save
  - go back to the student tab, do not refrehs, just click that button
    for taking the quiz... and:
    + verify you are redirected back to the same page (e.g, not taken to
      the take quiz page)
    + verify no new attempts have been registered
    + verify you now see the alert message in a red box
  - turn that option back off, refresh the page:
    + you should be able to re-take the quiz
  - try on and off, see if you can get anything funny going on

Change-Id: I83a373258cc7e615c98e416ef7d630fa9ccb7331
Reviewed-on: https://gerrit.instructure.com/43204
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
Hides Quiz icons in gradebook/grade summary until DB is ready

The quiz icons are hidden away until the appropriate features are out to
allow for monitoring of gradebook/speedgrader edits to quiz scores which
are pending review because of their question types.

Closes CNVS-16399

Change-Id: I689f1dcc94a647a32fe619b215f6b641a8376f84
Reviewed-on: https://gerrit.instructure.com/43180
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
add region to cache keys that depend on region

it shouldn't matter, but protects against server misconfiguration

Change-Id: Ic8da4caa9b99e82fa73c4a6e18b1599998da29cd
Reviewed-on: https://gerrit.instructure.com/43224
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Don't include soft deleted groups in search filter

Fixes CNVS-16369

Test Plan:

1) Create a large dataset locally. One way from a rails console:

```
c = Course.last

(1..6).each do |n|
	gc = GroupCategory.create!(context: c, name: "Name#{n}")
	(1..200).each do |m|
	  Group.create!(name: "Name#{m}", group_category: gc, context: c)
	end
end

GroupCategory.last(4).map(&:destroy)
```

2) On Master, see that the load time for the course users page (everyone tab) is long. 14 seconds in my case.
3) On this branch, see that the load time is much much shorter, 6 seconds in my case.

Change-Id: Ic68ef085e56a69b972cdb8069bc15cda4bd2c112
Reviewed-on: https://gerrit.instructure.com/43163
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>