Commit Graph

12208 Commits

Author SHA1 Message Date
Brian Palmer fdefc984ae remove the new teacher registration email
This email only went to site admins, and isn't useful.

This commit stops new notifications being created, a subsequent commit
will remove the no longer used code and data.

refs CNVS-15219

Change-Id: Ibd8c88c7310cf3dcfb06cf0c782f2b3cf571d843
Reviewed-on: https://gerrit.instructure.com/40375
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-09-03 22:05:46 +00:00
Brian Palmer d8d747f187 don't enable x-sendfile by default for local file store
This prevents open source installs from seeing file downloads break in
rails3. They can still set up sendfile explicitly by configuring their
web server and uncommenting the appropriate line, I've added
documentation to the production start wiki page:

https://github.com/instructure/canvas-lms/wiki/Production-Start#optimizing-file-downloads

relatedly, remove the unused send_file_or_data method.

Change-Id: I5e856b2ba50b0606330f86360d175c439ee1da50
Reviewed-on: https://gerrit.instructure.com/40357
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2014-09-03 21:26:07 +00:00
Brian Palmer 28d7c936c4 bump switchman version
fixes CNVS-13611

test plan: run with_each_shard tasks, such as
Reporting::CountsReport.process. It should complete without error. To
fully test the fix, you'd need to do this in an environment that has
many shards.

Change-Id: I425e8c8fb352aba15d0e9bc87b74984d4b7b8900
Reviewed-on: https://gerrit.instructure.com/40487
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-03 21:05:34 +00:00
Brian Palmer 1bc5174211 remove Worker#ensure_db_connection
test plan: run a delayed jobs pool, and verify that jobs still complete successfully

Change-Id: I9fbadee51b05f667dafcb9173af2e75bf905c1e0
Reviewed-on: https://gerrit.instructure.com/40453
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-09-03 20:23:33 +00:00
Ethan Vizitei 178f84a8b1 Don't strip the verifier from user-context files
fixes #CNVS-11032

If you were to use a files link that didnt start
with "/files" (like "/users/x/files/y" or a link
with a full host name), it would
still strip the verifier out, which would make the
file not appear to other users.  This fixes
the problem.

TEST PLAN:
 -login as a user
 -go to files and upload an image to *your* folder
    (rather than the folder for a course or something)
 -obtain a link to that file with it's verifier param through
    whatever means you prefer (simplest is to get the download
    link and then use the console to get the UUID from that
    Attachment record and use that as "verifer=[blah]" at
    the end of the url for the file)
 -post a discussion reply using that link to embed an image
    in the reply.
 -login as a different user and look at the discussionr reply;
  you should be able to see the image in the discussion reply.

Change-Id: I2e9123f08cda0e6949e8f9a8d12ba50b98de49e0
Reviewed-on: https://gerrit.instructure.com/40430
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-09-03 20:06:38 +00:00
Chris Hart e23217324a Add Flexbox Grid to Canvas Styleguide
Towards: CNVS-15062

Test plan:
Code test -
- Review implementation of Flexbox Grid in Canvas
- Is the grid stylesheet ok in the /vendor directory, even
  though it is slightly modified by us?
- Should we consider converting the grid classes to silent
  classes that we extend with something more BEM-y? My
  inclination is no, because I like how clear and universally
  known the Bootstrp classes have become; but it is worth
  a debate!

QA test -
- Go to /styleguide on supported browsers and make
  sure there is a new Grid section
- Make sure each example works properly

Change-Id: Ia164297a88d3e2a22ae69422232c2e93889aab7d
Reviewed-on: https://gerrit.instructure.com/40069
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
2014-09-03 19:39:48 +00:00
Clay Diffrient d749695c6d Modifies the footer alt text to match the image
fixes CNVS-14590

Test Plan:
  - Using a screenreader, go to any page in Canvas,
    even the login page.
  - When you navigate to the footer "By Instructure" the
    screenreader should simply read "By Instructure"

Change-Id: Ie61711610ab93f17792c0d288c1069fc0283a4e6
Reviewed-on: https://gerrit.instructure.com/40456
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-09-03 19:01:50 +00:00
Clay Diffrient 0b7d92b0b4 Adds an aria-describedby for the forgot email input box
Associates the instructions with the input so that screenreaders
can read it to users.  NVDA will read the text immediately when
the input has focus.  VoiceOver will not, but it will read it
as help text if you leave focus on the box long enough.

fixes CNVS-14597

Test Plan:
  - Using a screenreader go to the login page.
  - Click the forgot password link
  - Navigate to the email input box.
  - The additional text should be read as indicated in the
    commit summary above.

Change-Id: I605ce8d1e922f6674ed6d2cd73dbe223e742c6bf
Reviewed-on: https://gerrit.instructure.com/40459
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-09-03 19:01:40 +00:00
Cody Cutrer b28378e1d0 don't do a query just to convert an id to an object with just an id
Change-Id: Iba0c38881fc37a44391ed7e4882a0ba0e147236c
Reviewed-on: https://gerrit.instructure.com/40480
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-03 19:00:46 +00:00
Ahmad Amireh 40f3695184 CQS: FITB and friends
Adds question statistics for Fill in The Blank, Multiple-Answers, and
Numerical questions.

Closes CNVS-15213

TEST PLAN
---- ----

  - create a quiz with the questions above
  - take the quiz by at least two students
  - visit statistics_cqs page
  - verify the question types above render and show the correct-answer
    donut chart, as well as the answer distribution chart (like
    MChoice)

Change-Id: I4d1b2653fe8806e51ec784a507fe6dc99d2cb51b
Reviewed-on: https://gerrit.instructure.com/40361
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-09-03 18:35:47 +00:00
Zach Wily 18fba9db35 optimize progress updating on content imports progress bar
Previously, we were adding a new listener to the completion change value
on every render, which meant that our # of listeners was growing
exponentially.

test plan:
 * Do a course copy.
 * On the progress screen, make sure the progress bar still works.

Change-Id: I4af568f66123dd053beb76626645f07d908cfdb3
Reviewed-on: https://gerrit.instructure.com/40346
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-09-03 14:23:29 +00:00
Ryan Taylor 2860d53d8a Numerical input fields now handle commas properly
Numerical input commas were replaced by a period on parsing
automatically. This change prevents the improper parsing of these
values.

Fixes CNVS-1607

Test Plan:
  - Generate a quiz
  - Generate quiz questions with numerical input fields (numerical and
    formula question types)
  - Confirm valid input for numbers which include comma separators
  - Regression test for negative values, multiple commas, decimal inputs
  - Take quiz
  - Confirm same behaviors on the take_quiz side.

Change-Id: I642c21f23df8f90a5aaee859a65811041b4644ee
Reviewed-on: https://gerrit.instructure.com/40382
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2014-09-02 22:01:44 +00:00
Clay Diffrient 2d2d889e49 Makes course navigation item have focus after move
fixes CNVS-15187

test plan:
  - Go to the course settings page (/courses/##/settings)
  - Using keyboard navigation use the Move menu option
    to move a module.
  - After the move, the module you just moved should have keyboard
    focus.

Change-Id: I04926129af3b75f54d6f1a9ec196cc5a539256de
Reviewed-on: https://gerrit.instructure.com/40351
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-09-02 21:47:58 +00:00
Brian Palmer 99fec1f1ea set x-canvas-meta response header
Include relevant request information, for easy storing in web access
logs

closes CNVS-11044

test plan: Make web requests, use your browser's web inspector to verify
the x-canvas-meta response header.

Change-Id: I07e31b571bd9a946c9bc753c60eb8872ff456ff7
Reviewed-on: https://gerrit.instructure.com/37276
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2014-09-02 21:00:10 +00:00
Dave Donahue 25923e4ef9 fix canvas_update script sass compilation
We compile sass using npm run compile-sass now, but the
script was still referencing the old (now deprecated) rake
task, which was causing updates to fail.

Change-Id: Idbedcf61ccccbdb0f1deb5907afb25d5d6650000
Reviewed-on: https://gerrit.instructure.com/40392
Reviewed-by: Nick Houle <nhoule@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Dave Donahue <ddonahue@instructure.com>
QA-Review: Dave Donahue <ddonahue@instructure.com>
2014-09-02 19:54:03 +00:00
Jeff Belser d7503ce64c locale query params for session_locale
fixes CAT-330

NOTE: *the locale for a page is inferred in a weighted order.
       session_locale is checked just before a provided context's
       account locale preference and just after the user's

Test Plan
  1. Fire up canvas with full i18n support configured
     (i.e. $ RAILS_LOAD_ALL_LOCALES=true rails server)
  2. Navigate to a page that supports localization while logged out
     such as the login screen
  3. Append the following query params to the URL in the browser
     '?session_locale=zh'
  4. Navigate to that URL and ensure the page is localized in the provided
     locale

Change-Id: I9e94d6ecfd41e77683940272aa0988c67064b602
Reviewed-on: https://gerrit.instructure.com/39844
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Gunderson <egunderson@instructure.com>
Reviewed-by: Nick Houle <nhoule@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2014-09-02 19:53:32 +00:00
Jacob Fugal c25fbb14ac fix 'Become' link for admins on profile page
test-plan:
 - have profiles enabled on the account
 - log in as an admin
 - flag some other target user was "public"
 - try and view that user's profile
 - should not get a 404

Change-Id: Ibcae7f577b5824d42996c830030d5dd87094685f
Reviewed-on: https://gerrit.instructure.com/40250
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-09-02 19:37:33 +00:00
Clay Diffrient 4619201b7d Adds a role to sidebar buttons on account settings
fixes CNVS-13905

Test Plan:
  - Using NVDA in Firefox go to the account settings page
    (/accounts/##/settings)
  - Using the "B" key the "Add a New Course" and "Add a New
    User" buttons should be recognized.
  - Using the "F" key the same should occur

Change-Id: Ief88cec1f0c12a48ba55ac50614ca83877358a20
Reviewed-on: https://gerrit.instructure.com/40369
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-09-02 18:55:20 +00:00
Clay Diffrient 6520c40dc3 Removes the selected item from modules and module item move dialogs
fixes CNVS-15186

Test Plan:
  - Go to the modules page (/courses/##/modules)
  - Use the Move To... option in the settings cog menu to move
    a module.
  - In the dialog the module you selected to do this with should not
    be an option.
  - Repeat the same with a module item.
  - If you attempt to move the item within the save module, the item
    should not be displayed as an option.

Change-Id: If2649406570ae11fba0bca5b4910ed8fbcc6d84b
Reviewed-on: https://gerrit.instructure.com/40362
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-09-02 18:54:55 +00:00
Brian Palmer 217d75a206 remove ActionDispatch::RequestId middleware
Our custom RequestContextGenerator middleware also sets a request id
header, which is heavily used throughout our infrastructure, so there's
no point in setting a second, unused request id header.

test plan: inspect response headers, there should be an
X-Request-Context-Id header but no X-Request-Id header.

Change-Id: If6964a6aaf20968299cb9e3762343be92822efa2
Reviewed-on: https://gerrit.instructure.com/40355
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-09-02 18:47:40 +00:00
Cody Cutrer cf127c3273 use github helper for dress_code gem in gemfile
Change-Id: I36af600183c33c47aac4547651db49362c52a91d
Reviewed-on: https://gerrit.instructure.com/40183
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-02 17:21:02 +00:00
Brad Humphrey 6b93299aef allow lti content to enter full screen mode
Test Plan
- lti content should be able to enter full screen mode

fixes PLAT-614

Change-Id: Icffa991ca618cc6aeab2ac5ba0743746ab8bac41
Reviewed-on: https://gerrit.instructure.com/40320
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-09-02 16:37:43 +00:00
Brian Palmer 29b12ad2fa add job source to the "Processing" log line json
test plan: run jobs, the "Processing" log line when the job starts
should include the source field among the other json fields. This source
field has the marginalia information about the web request or other job
that created this job.

Change-Id: If58da146b241b12093fd31822b93924481434143
Reviewed-on: https://gerrit.instructure.com/40352
Reviewed-by: Hubert depesz Lubaczewski <hlubaczewski@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-09-02 15:49:31 +00:00
Brad Humphrey 93538324cd add specs for variable substitutions
Test Plan:
 - specs should pass

Change-Id: I4267d457f2f58c9913e36ff9f59cf8e9dbc96db6
Reviewed-on: https://gerrit.instructure.com/40315
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-09-02 15:32:38 +00:00
James Williams 96685b33aa don't set badge counts and crumbs in get_context on api requests
Change-Id: I0ca8a9813ada2d4965577778cff822396764cf5d
Reviewed-on: https://gerrit.instructure.com/40356
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-09-02 14:57:14 +00:00
Transifreq 9ac8bc6434 Updated fa-IR translation
Change-Id: Ie05337c4530703b32eb34ec1790780068b7d91b5
2014-09-02 05:42:54 -06:00
Transifreq 5ee25b00cf Updated tr translation
Change-Id: I83b93ef3c75fe70af526a022922931766891296c
2014-09-01 05:41:59 -06:00
Jason Madsen 6d96ee054a display upload progress for new file uploads
closes CNVS-15120

test plan:
  - enable new files
  - upload a file
    - ui should display upload progress
    - screen reader should announce upload progress

Change-Id: I01d644cfbe528dfcfa2e2161a87aefd3e8d9903c
Reviewed-on: https://gerrit.instructure.com/40148
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
QA-Review: Jason Madsen <jmadsen@instructure.com>
2014-08-29 23:52:05 +00:00
Ryan Shaw e2cd51cbdf fix new files in Safari
fixes: CNVS-15200

freaking Safari doesn't implement the URLUtils
interface so we can't use `new URL`
see: https://developer.mozilla.org/en-US/docs/Web/API/URL

test plan:
* open new files in safari
  (and FF, IE, & chrome to be thorough)
* it should load.

Change-Id: Ieb219bd019e029020a572580987c98d2c93c1014
Reviewed-on: https://gerrit.instructure.com/40319
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-29 23:02:24 +00:00
Cody Cutrer 43489b9e4c reduce size of all_site_admin_account_users cache key
store the bare minimum of ruby objects, instead of the full AR objects

on a large site admin test object, this cache went from ~64K to ~9K

Change-Id: I102127f9344dc801be9875b7e26092857061c1f4
Reviewed-on: https://gerrit.instructure.com/40182
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-08-29 22:37:53 +00:00
Ryan Shaw d8ca9753dc add multi-select to files
closes: CNVS-12656
closes: CNVS-12724, CNVS-11664

this adds both the ability to multi-select
items (CNVS-12656), and the actions
(like move, delete, download as a zip: CNVS-12724)

test plan:
in new files, click around on the folders/files
in the list.  if you click anywhere other than
a link, button, or input it should toggle whether
that thing is selected (things that are selected
get a blue background). you should be able to
control/shift click, press control+a, control+shift+a
it should work just the mac finder's multi-select

using a screenreader, you should be able to use
the <input type="checkbox"> to toggle selected

be thorough, it should handle all the edge cases ;)

* now that you have some things selected:
* there should be some buttons that appear on the top of the page
* try each:
* download as zip
* move
* delete
* they should all work

Change-Id: I51c2df7d8437d918c2875c293f38e3c60b0122c6
Reviewed-on: https://gerrit.instructure.com/40203
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-29 22:19:01 +00:00
Derek DeVries ed6acb3e83 fix issue editing questions in question banks
fixes CNVS-11006

test plan:
  - as a teacher
    - create a question bank with more than 50 questions
    - edit a question
    - it should successfully edit the question without adding a new question
      to the bank
  - do a regression test around creating and editing questions both in and
    outside of question banks

Change-Id: Iba765cf3b5c5b2687a012e44592e47d8e3ec6716
Reviewed-on: https://gerrit.instructure.com/40260
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-08-29 21:06:57 +00:00
Sterling Cobb 26e7d708b7 fix a bugs in new files
fixes CNVS-15182

The restricted access dialog window wasn't closing after making its
requests. Also, restricted access wasn't seting the 'locked' params
which was needed in order to ensure restricted access/hidden states
were properly set.

Test Plan
As a user that can access new files
Go to the new files page
When you click on the admin gear
And open the restricted access menu
And click update
Then the dialog should load
And then it should close

As a user that can access new files
Given you have an unpublished file or folder
Go to the new files page
When you click on the admin gear on an unpublished file or folder
And open the restricted access menu
And click update
Then the dialog should load
And then it should close
And the file or folders published icon should have correctly changed

Change-Id: I6921bc812ba7be7b79fa90c82971b4c7ebc24d3c
Reviewed-on: https://gerrit.instructure.com/40266
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Sterling Cobb <sterling@instructure.com>
2014-08-29 20:21:44 +00:00
Ryan Shaw b8a4d5d240 allow downloading everything in a folder as a zip
closes: CNVS-14728
closes: CNVS-12658
refs: DES-213

test plan:
* in new files interface:
* click the "cloud download" button on an item
  (it's next to the publish and cog buttons)
* if it is a file, it should download immediately
* if it is a folder, it should show a progress
  indicator while it is preparing the download
  (delayed jobs need to be running)
* when the progress reaches 100%, the browser should
  download it just like any other file.

Change-Id: Icc4712b5b421e26343bcfbc6458459cfeedf471e
Reviewed-on: https://gerrit.instructure.com/40137
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-29 20:17:39 +00:00
Jason Madsen af431f3d24 make add files work with S3
closes CNVS-14823

test plan:
  - add <AllowedHeader>content-type</AllowedHeader>S3 CORs config
  - enable S3 uploads in config/file_store.yml and config/amazon_s3.yml
  - add a file using the ui
    - file should upload successfully

Change-Id: I9fb3061def386a4827bee04c7727b336f9a311ba
Reviewed-on: https://gerrit.instructure.com/39935
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
QA-Review: Jason Madsen <jmadsen@instructure.com>
2014-08-29 20:06:37 +00:00
Ryan Shaw 48209057f7 fix searching in new files
test plan:
in new files,
type something in the search box
hit enter
it should work

Change-Id: Ib47fd0fbfb415d242585f1a08c41985b04b8c363
Reviewed-on: https://gerrit.instructure.com/40289
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-29 20:04:51 +00:00
Clay Diffrient f42da26308 Adds "Move To" dialog to the course settings navigation tab
Modifies the screenreader instructions group to be much simpler
just warning users to use the new dialog.  Makes the warning
appear for keyboard-only users.

closes CNVS-12799, CNVS-14733

test plan:
    1. Load up the course settings page (/courses/##/settings)
    2. Click on the gear icon in the enabled list.
    3. Click 'disable'
    4. It should now appear in the disabled list, the gear icon link
       should have changed to 'enable'
    5. Use the gear and click on move.
    6. A dialog should appear allowing you to move things within
       a list.
    7. Clicking the save button should persist changes beyond the
       current session.
    8. Repeat the above steps using a screenreader.
      a. When you tab off of the navigation tab, a warning should
         appear (and be read by the screenreader)
      b. The message should disappear when tabbing off of it.

Change-Id: Ie3d2cae23a47535d5a3995174794e0f0d853e629
Reviewed-on: https://gerrit.instructure.com/40169
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-08-29 19:52:26 +00:00
Jeremy Stanley d518b6f131 exclude grading schemes/assignment groups in selective assignment export
test plan:
 0. have a course containing an assignment with a custom grading scheme
    and named assignment group. also a graded discussion topic in a
    different assignment group with a different grading scheme, and
    a published quiz in a third assignment group.
 1. copy the course. the destination course should copy the assignment
    groups and grading schemes and associate them with the copied objects
    correctly.
 2. repeat step 1, but do a selective course copy, and select the
    assignment, quiz, and topic specifically. you should get the
    same result as in step 1.
 3. use the content exports API to selectively export the three objects
    e.g.,
      select[assignments][]=X&select[quizzes][]=Y&select[discussion_topics][]=Z
    import this package into a new course. the three objects should be
    there, but should not have custom assignment groups or grading
    schemes.

fixes CNVS-14820

Change-Id: I871771284b4a3bbd3695a99a6f2af613d76a8ebf
Reviewed-on: https://gerrit.instructure.com/39914
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-08-29 19:48:13 +00:00
Chris Hart 4792a97aff Move primary and user navigations into partial files
Addresses: DES-167

For the upcoming K-12 header, we will be using the K-12
feature flag to split up the markup for the header and
its navigations. This would make the application.html.erb
file a big mess of logic; so to make it more readable, we
will start by putting the primary and user navigations
into partial files.

Code review test plan:
- Make sure the partials are correctly called into the
  application.html.erb file.
- Do the QA test plan.

QA test plan:
- Click on the links in the primary and user
  navigations, and make sure they're all going to
  the right places.

Change-Id: I666d515793b4dcd18838219094f2457f326e6e75
Reviewed-on: https://gerrit.instructure.com/40167
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Chris Hart <chart@instructure.com>
2014-08-29 19:16:31 +00:00
Ryan Florence f98219f795 reorder content and sidebar
headers in the content should come before headers
in the sidebar

fixes CNVS-15105

Change-Id: I6ae02bd784ecf893acae6574f93685f9216f035a
Reviewed-on: https://gerrit.instructure.com/40101
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
2014-08-29 19:14:04 +00:00
Cameron Sutter 39a2b71f7f DA - assignments api index/show
fixes CNVS-14074

test plan:
 * setup DA
 * DA feature flag on
 - use the API for the following requests
   - index
     > should only show assignments that the student can see
   - show
     > should return as assignment that the student can see
     > should return an error for assignments that the student
       cannot see

Change-Id: I921ffbab639d96c3bfbf16d0b1df9ef79515f44e
Reviewed-on: https://gerrit.instructure.com/39520
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-29 18:33:48 +00:00
James Williams 9e06181005 add tool links to gear menus on assignments, quizzes and pages
test plan:
* as with g/39874, add an external tool to a course
with 'assignment_menu', 'quiz_menu' and 'wiki_page_menu'
configured
* enabled lor feature flag for account or user

* confirm that menu items for the tool are added to the
 gear menus on the index and individual show pages for
 assignments, quizzes and page

closes #CNVS-14555 #CNVS-14556 #CNVS-14557 #CNVS-14558 #CNVS-14559 #CNVS-14560

Change-Id: Ib5fcda93b51567bc3e64229014822382918113ac
Reviewed-on: https://gerrit.instructure.com/40168
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-08-29 18:30:09 +00:00
Cody Cutrer dc535d3249 include job shard in process name for worker
test plan:
 * run delayed jobs
 * using `ps aux | grep delay` confirm that the worker's
   shard id is included in the wait (likely 1)
 * in console, do `Kernel.send_later(:sleep, 60)`
 * using `ps aux | grep delay` confirm that the job's
   shard id is included (likely 1)

Change-Id: I4ef23c5fba72ae72441ba40e5890d5678a8223c3
Reviewed-on: https://gerrit.instructure.com/40210
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-08-29 18:11:09 +00:00
Brian Palmer 833124e8ce handle redis "command errors" that are transient
Some command errors aren't application logic errors, but things such as
"max number of clients reached", and so should be treated like a
connection failure. Since it's the same exception class, the best we can
do is match by error message.

fixes CNVS-14979

test plan: to really test the failure case, you'll have to limit max
clients. i did this locally by:

* start up canvas
* edit the redis config to set maxclients to 1
* restart redis
* open a redis-cli and execute 'get x' or something to grab the 1 conn
* use the canvas web ui or console and verify that you don't get an
  error, rather the cache is blacklisted

Change-Id: I64360d165575ab0ef54c9c6d08dec8aa1afebad4
Reviewed-on: https://gerrit.instructure.com/40051
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-08-29 17:41:28 +00:00
Ethan Vizitei 094ffc2504 Give good error message when user doesn't exist
fixes #CNVS-15119

This is for the workflow when you're adding
a user to a course as a teacher.  Currently
it makes it sound like the error is an email
formatting problem.

This also sets up a reusable way to push
account settings info over in the environment
and check it in a handlebars template.

TEST PLAN:
 - Login as an instructor
 - Make sure the root account has 
    "open_registration" turned off
 - Try to add a student to your course by email
     who isn't currently a canvas account holder
 - The error message should tell you that if the
     formatting is ok, you need to ask your admin
     if they have a canvas account


Change-Id: I0cfc07c4612ff4db7ef759cc146e612f94c1075b
Reviewed-on: https://gerrit.instructure.com/40230
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-08-29 16:35:26 +00:00
Michael Nomitch 9d96406e32 designers can see unpublished assignments
fixes CNVS-15059

test plan:
  - enroll a designer in a course.
  - create two assignments, but only publish one.
  - masquerade as the designer
  - navigate to the assignments index page
    - both assignments should be showing

Change-Id: I361bc3bda4bd85539f25e94b188506c8d4ca0f54
Reviewed-on: https://gerrit.instructure.com/40125
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-29 16:21:58 +00:00
Sterling Cobb 115245e8f5 add broccoli cloud to files
fixes CNVS-14981

This adds a broccoli cloud to the files section. It listens to updates
on the model and will update accordingly. It only toggles two states.
Published and unpublished. If the previous state was 'restricted'
meaning there is a calendar event associated with it, it will unpublish
the file or folder.

Test Plan
Given you are using the new files
And you go to the files section
And you have files and folders with published, unpublished and
restricted states
Then published filesystem objects should have a green cloud
And unpublished filesystem objects should have a gray cloud
And restricted fliesystem objects should have a caledar icon
And hidden fliesystem objects should have a paperclip icon

Given you are using the new files
And you go to the files section
And you have files and folders with published, unpublished and
restricted states
When you click on a restricted calendar icon
Then it should unpublish the filesystem object
When you click an unpublish icon
The it should publish that filesystem object
When you have an unpublished filesystem object
Then it should publish it

Given you are using the new files
And you go to the files section
And you have files and folders with published, unpublished and
restricted states
And your server isn't running (you have no connection)
When you try to publish or unpublish a filesystem object
Then it should revert back to its original state
And a flash error message should appear

Change-Id: I5cdb15998da1c4628fdc537b67ef22b1ac998782
Reviewed-on: https://gerrit.instructure.com/40158
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Sterling Cobb <sterling@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2014-08-29 00:42:31 +00:00
Ryan Taylor df4c41a48d Regrade events do not show up in the Gradebook History
Regrade events are not shown in the gradebook history.  Adding this
feature will provide a simple and convenient way to see ALL grading
events in one place.

Fixes CNVS-8590

Test Plan:
  - Create a quiz event
  - Take the quiz with a student
  - Regrade the quiz as an instructor
  - Confirm that regrades are shown in the gradebook history

Change-Id: I3925f0fefaf80f0426427c774b0fc63835d1f317
Reviewed-on: https://gerrit.instructure.com/39977
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>
2014-08-28 22:36:34 +00:00
Michael Nomitch 58c30e2078 DA - discussions
fixes CNVS-14093

test plan:
  - turn on DA, create a graded discussion only assigned
    to one group
  - as a teacher or a student with visibility
    - you can access the dicussion through the app or the api
    - students without visibility arent included in participants
  - as a student without visibility
    - the discussion index doesn't show the discussion
    - a direct link to the discussion will send you to the
      discussion index with a flash error
    - the API doesn't show the discussion
      (show page, entries page, or replies page)
    - cannot subscribe to the topic via the api
  - with DA off, the discussion shows up normally
  - a student in both sections has visibility

Change-Id: Icefef62695f73d38787d9af08ec26c595c2e4514
Reviewed-on: https://gerrit.instructure.com/39383
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-28 22:18:26 +00:00
Cody Cutrer 061d60899e configurize possible postgres extensions
Change-Id: I57bf7eebf4a9f5a828dffb3d4b689b6cac9aa0f0
Reviewed-on: https://gerrit.instructure.com/40197
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-08-28 22:02:22 +00:00