add $Canvas.masqueradingUser.id substitutuion

test plan:
 - add a tool with the custom variable $Canvas.masqueradingUser.id
 - masquerade as a user
 - launch the tool
 - $Canvas.masqueradingUser.id should be your actual canvas id

fixes PLAT-657

Change-Id: I5c6cf1532cac7fa4dcf065652d87500e5d30e474
Reviewed-on: https://gerrit.instructure.com/41750
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Accessibility updates for quiz show page

Corrected any noticed accessibility issues for quiz show control
buttons.

Closes: CNVS-6764

Test-Plan:
  - Test that quiz show buttons are buttons
  - Test that screenreaders read the buttons properly

Change-Id: I860b911e123500401d7925195a652918e56a33a1
Reviewed-on: https://gerrit.instructure.com/42106
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
change link text to be more descriptive

change link text from "Switch gradebooks"
to "Switch to Default Gradebook"

fixes CNVS-15550

test plan:
- Navigate to the gradebook and click on the
  link in the upper right-hand corner titled
  "Switch to Individual View"
- Once switched to the individual view, verify
  that there is a link at the top of the page
  titled "Switch to Default Gradebook"
- Click on the "Switch to Default Gradebook"
  link and verify that it navigates you back
  to the default gradebook view.

Change-Id: Icbe0b12e674a3f4338a025e20bb6909d6b419502
Reviewed-on: https://gerrit.instructure.com/42277
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
don't render a white blank page for unauthorized files users

closes: CNVS-15821

test plan:
* go to courses/x/files as a non logged in user
* it should show login form

* go to courses/x/files as a non logged in user in
  a course that that is public.
* it should show files

* go to courses/x/files as a student in a course
  that has the "files" tab disabled by the teacher.
* it should redirect to courses/x

* go to courses/x/files/folder/a/real/folder in a course
  that doesn't have the better_file_browsing feature
  flag enabled
* it should render a 404 "not found" page

* go to /files as a not logged in user
* it should show login form

Change-Id: If1700e3814c2f7b1f97daecf89577b020eda765a
Reviewed-on: https://gerrit.instructure.com/42251
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
handle going to go a folder that doesn't exist elegantly

fixes: CNVS-16050

test plan:
go to
/courses/x/files/folder/a/folder/that/does/not/exist

it should look like: http://cl.ly/image/2e1S1H2l3f0I

Change-Id: I5aa130689ff292b42ffef945b7911168f5dc9bc9
Reviewed-on: https://gerrit.instructure.com/42256
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
use svgs for file thumbnaill icons

closes: CNVS-16094

test plan:
open newfiles, the icons next to the filenames
should look like: http://cl.ly/image/3V0t3G2C172G

same ones should be used for the drag-n-drop
feedback.

in a future commit, clay will use the same ones
in his preview modal

Change-Id: Ife0d9bde9b6cb063acbd578af9e1e108617e9293
Reviewed-on: https://gerrit.instructure.com/42267
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
DA - more refactoring

- cleans up assignment model
- eliminates unnecessary feature flag checks
- eliminates unnecessary teacher permission checks
- moves duplicated methods from assignment and quiz
  to new module

Change-Id: I8d1e8f99bf5c8f6a63bd670b432aeef7e8f0e86b
Reviewed-on: https://gerrit.instructure.com/41654
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
dont show unauthorized messages for deleted files

fixes CNVS-11962

students who look at files that have
been deleted by the owner shouldn't see an
unauthorized message, it makes them uncomfortable

instead this provides them with a "this file
has been deleted" message.

refs CNVS-15815

TEST PLAN:
-login as a teacher
-add a files to the courses files area
-create a page, publish it, and link to the file
-delete the file
-login as a student to the same course
-go to the created page
-click the link
-you should see a 404 page that says "This
  file has been deleted"

Change-Id: I702c20a27c6ef2425d53298bdb4acd9e4a53435e
Reviewed-on: https://gerrit.instructure.com/41883
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Remove overflow: hidden from #wrapper-container

It looks like the reason it was added is no longer present. This
allows for the side bar to scroll when its too big

Fixes CNVS-15888

Test Plan:

- Create 15+ assignments in a course with impending due dates (within a week)
- Publish these assignments
- As a student, view the to do list on the dashboard.
- Click 'view more' link is clicked
- you should now be able to see all of them

Change-Id: If6be938a29723c875114188c1178fa96bf59a96c
Reviewed-on: https://gerrit.instructure.com/42216
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
fix /files/preflight route

test plan: you should be able to upload files to the files page
with Better File Browsing disabled, and Flash enabled in the
browser.

fixes CNVS-16126

Change-Id: Ieafb0030d9228eee846ff0cf326dcf83ceb5b8b2
Reviewed-on: https://gerrit.instructure.com/42347
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fix encoding issue in spec for ruby 2.1.3

Change-Id: If2c4b22451272111577f03b891ac91e5a9c01d6b
Reviewed-on: https://gerrit.instructure.com/42283
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
honor time zone in date_shift_options

previously, date_shift_options were treated as local times even
if they had an explicit time zone. this caused start and end
times to shift since the UI provided UTC timestamps that were
interpreted as local times by the backend.

fixes CNVS-15808

test plan:
 0. set up a course with start and end times
 1. create a new empty course
 2. copy the course from step 0 into the new course from step 1
    via the "Import Content Into This Course" button, shifting
    dates
 3. confirm that the course start and end dates are correct
    (not shifted backward by the course's time zone's UTC offset)

Change-Id: Ie478966ed4a044890d3cbd4ce94957dbcbe58654
Reviewed-on: https://gerrit.instructure.com/42328
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
handle trying to delete folders with content gracefully

fixes: CNVS-15820

test plan:
in newfiles,
try to delete a folder that is not empty.
it should confirm that everything in the folder will
be deleted too.  and then it should work.

Change-Id: I112217486643ca0e73734b417b8648f8e1f4ed0f
Reviewed-on: https://gerrit.instructure.com/42143
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Updated tr translation

Change-Id: Id159e6816ba26334b9b3c94646f160b44158a306
fix day boundary in overridden time display

fixes CNVS-13541

write specs to identify the issue
 (and to confirm that it's not present
  in the javascript layer that does similar
  formatting work)

start breaking apart text helper
because we need some object that
can persist a zone override through
all the helpers

pull out a set of utils classes for dealing
with date and time presentation

fix the zone override when doing a date time
presentation across multiple zones

TEST PLAN:
 - Create a new course shell and go to the 
    courses settings page and set the courses 
    time zone as Eastern and save the change.
 - Create a new assignment and put a due date of 
    whatever day you want, but have the time be 
    11pm and save it.
 - When the page reloads, hover your mouse over 
    the due date.
 - The due date should be correct
    (on the day after).


Change-Id: I3274a502545bdbbb482bc7e529446e2fa422740c
Reviewed-on: https://gerrit.instructure.com/42064
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
ensure locals are defined before using them in partials

refs CNVS-15835

Change-Id: I00fe45309eec3cc81a8c3aadab839c3b412f355e
Reviewed-on: https://gerrit.instructure.com/41811
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fix eportfolio export cleanup if export has been re-uploaded to canvas

fixes CNVS-15885

test plan:
- create an eportfolio
- export it
- uploade the exported zip back to your user file space
- add more entries to the eportfolio
- export it again
- it should work

Change-Id: Icfc540e8e2ccffdb8c7ebafe0f6db43320138260
Reviewed-on: https://gerrit.instructure.com/42188
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Simon Williams <simon@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>
handle locales-gone-missing

refs CNVS-15736

test plan:
 * set the locale for an account, course, and user to something explicit
 * remove that locale (see g/41630)
 * restart your server, and your language for each of the above should
   have reverted back to the default. also, editing the preferred
   locale for any of them should show system default again

Change-Id: Ic25290a4374a596610ffa97ad21aecd3a86f1bed
Reviewed-on: https://gerrit.instructure.com/41775
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Refactor FilePreview Component

Fixes a bug with closing the modal when
multiple files are selected; cleans up
the FilePreview component for New Files;
breaks up FilePreview into multiple
components.

Change-Id: I9d4796c57f224a30e601588a2e366781c58c8449
Reviewed-on: https://gerrit.instructure.com/42439
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Ryan Shaw <ryan@instructure.com>