Commit Graph

12188 Commits

Author SHA1 Message Date
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
Clay Diffrient 2d2bbcf251 Adds scope to th tags on course roster
Adds screenreader-only text to the empty table headings

closes CNVS-15088, CNVS-15161

test plan:
  - Go to the people page (/courses/##/users)
  - Viewing the source should show scope attributes on the th's
  - Presumably a screenreader or other assistive technology will
    work better with this.

Change-Id: I802c7650a5bf409bd431b21da0d970252941cdae
Reviewed-on: https://gerrit.instructure.com/40192
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-08-28 21:19:33 +00:00
Jacob Fugal 954e77d645 rework error handling in event stream
fixes CNVS-15153

 * don't raise if the configured cassandra database can't be connected
   to; instead, return nil (uncached, so it can be retried next time)
   and treat it as connected but unavailable
 * allow configuring whether an error is re-raised (configured true for
   test only in canvas), rather than peeking into rails directly from
   event stream.
 * allow registering callbacks to run on insert/update error via
   on_error
 * on insert/update error, before (maybe) reraising the error, call any
   registered callbacks
 * configure canvas to log to Rails.logger and statsd (removed from
   EventStream::Failure) on insert/update error

EventStream::Failure is now unused, but not yet removed from the code.
it should be considered deprecated and remain unused; it will be removed
in the near future.

test-plan:
 - start canvas in non-test mode (e.g. development mode) with cassandra
   and statsd configured and running
 - turn off cassandra, so even stream inserts should fail
 - change a grade (to trigger a GradeChange event)
 - with cassandra off, event insert should fail, but should *not*
   impede the remainder of the grade change action
 - EventStream::Failure record should *not* be created in the database
 - an error line should appear in the Rails log for the failed insert
 - the appropriate 'event_stream_failure.*' statsd counters should be
   incremented

Change-Id: I5c6d29c2a08276ccc06ebc8c1a59e0d33ce2cc4e
Reviewed-on: https://gerrit.instructure.com/40088
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-08-28 21:19:24 +00:00
Paul Hinze 9e3739e553 bugfix: don't strip hyphens from media thumbnail URLs
some media ids have dashes in them, but sanitization in the canvas
kaltura client was stripping them, causing video thumbnails to not work
in some cases.

this fixes the sanitization so those ids are handled properly.

Change-Id: I23b4c392dfc79eff4d57bea84c3509a1e6bf3137
Reviewed-on: https://gerrit.instructure.com/39694
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Paul Hinze <paulh@instructure.com>
QA-Review: Paul Hinze <paulh@instructure.com>
2014-08-28 21:11:02 +00:00
Ian Hoerner b21d59f220 fix bad link in enrollment acceptance notification
fixes CNVS-14983

Test plan
- As a student
 - Accept enrollment to receive notification
- As a teacher
 - verify that the link in the notification takes you to the user's page

Change-Id: Ic3a7dc90e974a324666b51b81e767d0efe85a7dc
Reviewed-on: https://gerrit.instructure.com/39815
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Ian Hoerner <ian@instructure.com>
2014-08-28 21:07:07 +00:00
Brad Humphrey ed624a1eaf fix sharding issues for lti variable substitions
test plan:
 - lti launch with all custom variable substitutions should work
 - lti launch where the user and context are in different shards should return the correct roles

fixes PLAT-612

Change-Id: Ie2735106fb46b99d8c96f52dade701af5cbb06df
Reviewed-on: https://gerrit.instructure.com/40133
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-08-28 21:00:10 +00:00
Duane Johnson fef74e2059 add processing_errors to SIS imports API docs
SIS imports have a processing_errors key that is not included
in the current API docs.

Test Plan:
- visit /doc/api/sis_imports.html
- the SisImport object should include processing_errors

Refs SIS-432

Change-Id: Ifd930a513f3f802a0a6354e84716562aab2f0d35
Reviewed-on: https://gerrit.instructure.com/39704
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ken Romney <kromney@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-08-28 18:58:18 +00:00
Derek DeVries 622d811c64 fix issue when restoring a deleted quiz with student submissions
fixes CNVS-15098, CNVS-15079

test plan:
  - as a teacher
    - create a quiz
    - publish the quiz

  - as a student
    - take the quiz

  - as a teacher
    - delete the quiz
    - attempt to restore the quiz
    - the quiz should restore successfully

Change-Id: I5111e5beeb6debbb43a587689251e2fb62a8d3bc
Reviewed-on: https://gerrit.instructure.com/40159
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-08-28 18:51:26 +00:00
Ryan Shaw 57f8aad679 react files polish cleanup
closes: CNVS-12727

clean up ItemCog code
better handling of kylemenu popup
I18n'ed some stuff

Change-Id: I0c5401e4f24288e3ba8a724e319774cce2cb7571
Reviewed-on: https://gerrit.instructure.com/40049
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-08-28 18:26:48 +00:00
Brian Palmer d6c9d87f76 add the canvas version to delayed_jobs_pool proc name
test plan: with a VERSION file in your rails root, run delayed jobs, the
process name will include the contents of the VERSION file. with no
VERSION file, it won't.

Change-Id: I773ff4ace5facdb48d415ad7528daaf761aeab1d
Reviewed-on: https://gerrit.instructure.com/40162
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-08-28 18:25:49 +00:00
Simon Williams 122c7393c7 allow deleting grade for pass/fail assignments
fixes CNVS-14805

test plan:
- create a pass/fail assignment, with >0 points possible
- go to the gradebook
- update a student to have a checkmark for the assignment (pass)
- keep clicking until you get back to a non-graded state
- it shouldn't show an error banner

Change-Id: Ia19190d55083056a28583d87f6e41ed42f976347
Reviewed-on: https://gerrit.instructure.com/39961
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-28 17:47:40 +00:00
Jeremy Stanley 2fc50baa52 corrected rounding error when creating custom grade scheme
floating point math error caused errors with certain percentages

fixes CNVS-1850

test plan:
- create/edit an assignment and go to manage grading schemes
- enter various percentages for grades (93.5, 87.6, 69.5, 69.6) and save
- grades should reflect the percentage entered after saving and not mutate

Change-Id: Ieaae9d5ea5f6436890794a029cf0a54749ccad18
Reviewed-on: https://gerrit.instructure.com/39662
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
2014-08-28 17:40:41 +00:00
Aaron Cannon f1bdc8f7e4 Accessibility: Enclose discussion titles in h3s
Fixes CNVS-14659

Test plan:
- Visit the list of discussion topics for a course.
- Verify that the discussion titles are recognized as level three headings by
  screen readers.
- Verify that the visual appearance of the page has not been effected.

Change-Id: Ideddc504730cd0e8cdc91a8f34174922acafed76
Reviewed-on: https://gerrit.instructure.com/38886
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matthew Wheeler <mwheeler@instructure.com>
2014-08-28 17:33:07 +00:00
Ahmad Amireh ba50a1c112 CQS - Expand/collapse question answers
Adds buttons to expand and collapse the question answer drilldown.

Closes CNVS-15054

TEST PLAN
---- ----

  - create a quiz with a bunch of MC/TF questions
  - take it
  - go to cqs page (/courses/:id/quizzes/:id/statistics_cqs)
  - under the Question Breakdown section:
    - verify each question box contains an "expand" button
    - click it
      + verify you see the answer drilldown below that matches the Ember
        one
      + click the button again (which should now show a Collapse icon)
        - verify the drilldown is now hidden
  - click the toggle button right next to the "Question Breakdown"
    heading
    + verify it expands/collapses all questions
      - play around by expanding/collapsing individual questions and
        then use the master one, it should always get them *all*
        expanded or *all* collapsed

Change-Id: Icf7fe571356c02c2d85b1dc2b6396c71f5281515
Reviewed-on: https://gerrit.instructure.com/39858
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-08-28 16:42:48 +00:00
Ahmad Amireh 772853e2f4 CQS: multiple-choice & true/false
Closes CNVS-15053, CNVS-13442

TEST PLAN
---- ----

  - create a quiz with multiple choice and T/F questions
    - take it by a number of students (tip: you can use Quizard to do
      this)
  - go to /courses/:id/quizzes/:id/statistics_cqs (CQS)
  - in another tab, open /courses/:id/quizzes#/:id/statistics (ember)
  - compare the functionality between the original Ember page and the
    new one regarding the question boxes for the questions, as described
    in the ticket
    + pay special attention to tooltips and dialog functionality
  - this patch also fixes the translation issue we had described here:
    https://instructure.atlassian.net/browse/CNVS-13442

what not to test:

  - toggling of answer drilldown/details, coming later in CNVS-15054

Change-Id: I468ed8f79354b58d79a12be221a6ab3bff51bd1f
Reviewed-on: https://gerrit.instructure.com/39856
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-08-28 16:42:30 +00:00
Ryan Taylor ebc19f7409 Quizzes and Assignments pass #destroy calls back and forth
While we can't reproduce locally, this code change will cause an
exception in the future which should provide additional information
about what is happening.

Closes CNVS-14864

Change-Id: I80fb1297a1d76c7fdc51715b09dde345e4ab47fc
Reviewed-on: https://gerrit.instructure.com/40117
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 16:32:59 +00:00
Ethan Vizitei f8b4c9d780 give good messaging when a quiz question is big
fixes CNVS-6983

When submitting a quiz question that's too long,
the response that is "unknown error" which isn't
helpful.  This provides a useful error message.

test plan:
 - Login as a teacher
 - EDIT AN EXISTING quiz question
 - make the question text more than 16384 characters
 - save the question
 - you should get an error that tells you why it can't save
 - CREATE A NEW quiz question
 - make the question text more than 16384 characters
 - save the question
 - you should get an error that tells you why it can't save

Change-Id: Ida3438a9648c6b8c61f9e4a19c9414f3595a67e8
Reviewed-on: https://gerrit.instructure.com/39748
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-08-28 16:19:16 +00:00
Benjamin Porter 3510c2652a Accept updated ungraded assignments
In our array of allowed submission types, we were missing the option for
"not_graded", which was causing the API call to fail.

Fixes CNVS-14935

Test Plan:
    - as a teacher
    - create a new assignment using the 'more options' link
    - set grading type to 'Not graded'
    - verify that the assignment saves

Change-Id: I382b669f6064d925d70a6533c4e3b2b938dec76d
Reviewed-on: https://gerrit.instructure.com/40033
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-08-28 16:11:46 +00:00
Jeremy Stanley 8b679c7417 support selective file exports with select[files] param
this is a friendly alias for select[attachments], done to be
more consistent with existing API names, and following the
example of select[modules], select[pages], etc.

test plan:
 - do selective content exports with the content export API,
   using select[files][]=(id), and ensure the correct file(s)
   are exported
 - test both common cartridge and zip exports

fixes CNVS-15129

Change-Id: I004ae1e8ba28ea8b7cf480c8fee5bd9633375781
Reviewed-on: https://gerrit.instructure.com/40115
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-08-28 15:36:55 +00:00
Jeremy Stanley 1c471bb890 copy assignment rubric outcomes in selective export
fixes CNVS-14822

test plan:
 - have an assignment with a rubric that references an outcome
 - copy the course containing the assignment, selecting only the
   assignment
 - the destination course should contain copies of the assignment,
   rubric, and outcome, linked as in the source course

Change-Id: I425dc2bb241ec8996c2195bf9365750e50e42e85
Reviewed-on: https://gerrit.instructure.com/40105
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-08-28 15:33:34 +00:00
James Williams 10146e8175 fix wiki_page_importer only_when_blank setting overwriting
also protect the class level variables set by acts_as_url
from being overwritten in the future

test plan:
* running spec/apis/v1/content_exports_api_spec.rb and
 spec/apis/v1/pages_api_spec.rb together in that order
 should not cause spec failures

Change-Id: I7c6cde252b2780365ae05438ef4f56135c6edd2f
Reviewed-on: https://gerrit.instructure.com/40080
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-08-28 15:02:08 +00:00