Commit Graph

11412 Commits

Author SHA1 Message Date
Simon Williams 64464bb39f querying enrollments_api#show with invalid account returns 404
we may eventually want to support querying by subaccount, but for now we
want to fix an error where the user got a template error instead of
a 404.

fixes CNVS-26628

test plan:
- create a course in a subaccount
- create an enrollment and note the id
- query /api/v1/accounts/:sub_account_id/enrollments/:id
- you should get a 404

Change-Id: I3c453d32152df6339df020d38025338cd4981039
Reviewed-on: https://gerrit.instructure.com/70635
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-01-21 15:49:54 +00:00
Pam Hiett 0c61fa1cb4 fix gradebook KO hidden warning (make blue for consistency)
Fixes: CNVS-26218

test plan:
- as a teacher/admin using the old or new ui
- navigate to a course
- click on the grades link from the left-hand sub-nav
  (note: enable grid view for this ticket)
- now switch to tabbing... first tab should trigger the
  "skip to content" link - hit enter the warning should
  appear (was red as seen here...
  http://screencast.com/t/QKX94TqKGt
  should now be blue as seen here...
  http://screencast.com/t/TfF4dFPYum6o

Change-Id: I5384a06d17b5e3966f4baffbce5900862f73d00d
Reviewed-on: https://gerrit.instructure.com/70696
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-21 15:00:21 +00:00
Chris Hart 619a8476a2 Convert stylesheets/vendor/jqueryui to rems
Fixes: CNVS-26600

Most jqueryUI plugins we still use (datepicker,
modal, tooltip, tabs) use ems for font-sizing.
However, there were a few cases where we've
overwritten those original font sizes with pixel
values. This commit turns those pixels into rems
for accessibility reasons.

Test plan:

- Make sure the CSS compiles as usual.
- Go to Chrome's preferences, and (under
  Advanced) change Chrome's default font
  size to Very Large
- Open any page with a datepicker on it (the add
  assignment page has plenty)
- Note that the datepicker now scales up its font-sizing
  to respect the browser preferences:
  http://screencast.com/t/WXeA18kjkel
- Return your Chrome font-size preferences to
  Medium.
- Click around a variety of Canvas pages. You should
  see no difference from production.

Change-Id: I5091fc16902f31860c33c810187aeb2fe1e7234d
Reviewed-on: https://gerrit.instructure.com/70650
Tested-by: Jenkins
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-21 14:36:10 +00:00
Chris Hart d0d67e24e6 Convert Bootstrap Sass font-sizes to rems
Fixes: CNVS-26576

Test plan:

Bootstrap isn't used for much in Canvas anymore,
BUT one really important remaining use is as
the foundation for our forms:

- Go to /styleguide#forms in Chrome. Note the
  appearance of text inputs, selects, and
  textareas, etc.
- Go to Chrome's preferences, and (under
  Advanced) change Chrome's default font
  size to Very Large
- Go back to /styleguide#forms, and note
  that the form components' font sizes should
  now be scaling up, respecting the browser
  settings. Here is a comparison of this commit
  vs. production:
  http://screencast.com/t/mz7AnOP1RA
- Return your Chrome font-size preferences to
  Medium.
- Click around a variety of Canvas pages. You should
  see no difference from production.

Change-Id: I0218e59bf5d8d4ba4ba5c5e8f4cec5d53e6c61c6
Reviewed-on: https://gerrit.instructure.com/70600
Tested-by: Jenkins
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-21 14:36:05 +00:00
Cody Cutrer 9e085fa446 prevent duplicate singleton auth providers via API
test plan:
 * using the API, try to create a Facebook auth provider multiple times
 * it should only succeed once

Change-Id: Ib3bfff9a5cd933bca00304d3cecf19abeb653677
Reviewed-on: https://gerrit.instructure.com/63265
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-01-21 01:13:19 +00:00
Nathan Mills f94d1a5d98 handle underscores in tool launch urls and domain field
fixes PLAT-1300

test plan
install a tool that uses and underscore in the domain or subdomain
try and launch the tool
it shouldn't throw a canvas error

Change-Id: I91164574be94e7e10d5e9820d0ecef48a5503005
Reviewed-on: https://gerrit.instructure.com/70044
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-01-20 22:38:15 +00:00
Cody Cutrer 81026ae0ca clarify if a pseudonym can have a password
fixes CNVS-22672

test plan:
 * have both canvas and non canvas auth configured on an account
 * add a pseudonym not linked to an auth config
 * you should still be able to change the password both as an admin
   and on the /profile/settings page
 * add an SIS id to the login
 * you should be able to change the password as an admin, but not on
   the /profile/settings page
 * create a login explicitly linked to the non canvas auth
 * you should not be able to change that password on either page
 * create a login explicitly linked to canvas auth, with an SIS ID
 * you should be able to change the password on either page

Change-Id: I68ee27d36dc5eb20ca81a145dd097f3f8f37b155
Reviewed-on: https://gerrit.instructure.com/63817
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
2016-01-20 21:43:21 +00:00
Brian Palmer 8d723a7c61 api doc request parameter formatting
refs CNVS-26515

Request params are now formatted in an HTML table, with separate fields
for name, type, required/optional, valid enum values, and description.
This is at the same time more compact and more readable.

To parse this information out of what is actually free-form text
comments, I'm re-using the OpenAPI (swagger) parsing code, which I
tweaked and simplified slightly. Eventually I'd like to see the whole
API documentation generated from the OpenAPI spec, and then we can
slowly move away from using free-form code comments to more declarative
code constructs, but still generate an OpenAPI spec and get the same API
docs.

test plan: Generate the api documentation, and view request parameter
information. you should see the new formatting.

Change-Id: Ida00869d96a9b2d9fa84c29079ddf2511a2d5917
Reviewed-on: https://gerrit.instructure.com/70485
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-01-20 21:09:48 +00:00
Ryan Shaw abd2df3e7a load custom css/js for high contrast in newUI
In new UI, load custom CSS / JS even for users
that have High Contrast turned on.

closes: CNVS-22656

Originally, we tried to just say that to ensure schools
could not mess up their own high contrast compliance,
we would not load custom css or js for high contrast
users in NewUI.

This was problematic for things like the school using
js to add a custom help menu or something that the rest
of their classmates would see but the high contrast
user would not see. or using some "display: none"s in
css to hide things that they didn't want people to see,
but the high contrast users would still see.

This change makes it so custom css and js overrides
are loaded for high contrast users too. that means that
there is a possibility that the school could mess up
high contrast ratios with their css but I think given
the problems above this is the best we can do.

Product reviewers: (colleen, dana, aaron) please
review this description and + or - 1 if you agree.

test plan:
* turn on high contrast in New UI
* any custom css/js file you have set for your account
  (or any of your account's parents) should be loaded

Change-Id: I72ed06688f0b7b131ec00c2ea6031597277e7445
Reviewed-on: https://gerrit.instructure.com/69941
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Dana Danger <dana@instructure.com>
2016-01-20 20:56:39 +00:00
Simon Williams 727b3098d8 render bad_request on saml logout when aac cannot be found
fixes CNVS-26484

test plan:
- set up a saml idp
- sign logout requests with an invalid issuer (idp_entity_id)
- you should get a 400 response.

Change-Id: I45b912f41c15777d82fa09aed3e067fd2f47155c
Reviewed-on: https://gerrit.instructure.com/70295
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-01-20 20:56:09 +00:00
Derek Bender 37ea2c4e9b Add missing submission comments in speedgrader
Previously, speedgrader would omit comments from the submitting student
for group assignments when the submitter unchecked "Send Comment to the
Whole Group"

This will look across all submissions within group and collect all unique
comments for display.

fixes: CNVS-20346

Test Plan:
 - create and publish a course with at least 2 students
 - add the students to a group
 - create a group assignment and publish it
 - as the first student, submit and leave a comment, do not check
     the box that says "Send Comment to the Whole Group"
 - go to the submission and leave another comment without checking the box
 - masquerade as the non-submitting student and repeat the above step
 - stop masquerading and go to speedgrader
 - both comments should be present
 - this should be the same as the submission details page and in gradebook

Change-Id: I9955804202f4381d8afc0fbe3e5dc23b3ca94747
Reviewed-on: https://gerrit.instructure.com/69547
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2016-01-20 20:01:14 +00:00
Brian Palmer d75fe4153b change float to number in api parameter definition
This got merged in at the same time as my change that adds an error if
you specify an invalid type.

Change-Id: Iec37f2dc967d38752eb643dbdbbf5584e0ba08fb
Reviewed-on: https://gerrit.instructure.com/70688
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2016-01-20 19:38:40 +00:00
Brian Palmer 933a052061 fix typing of api doc @model definitions
refs CNVS-26515

Pretty much anything that wasn't a number was being rendered as a
string, including sub-arrays and sub-objects. Worse, a lot of our api
docs were defining them using ruby syntax rather than json syntax.

This change fixes types so that booleans, arrays, and objects all render
correctly in the @model docs (the "A ModuleItem object looks like:"
sections of the docs). It also adds some basic error checking to help
avoid future mistakes.

This doesn't fully support the "$ref" OpenAPI (swagger) syntax yet, but
still renders examples for "$ref" fields when an example is provided.
Eventually it'd be nice to auto-generate an example for "$ref" fields,
since we can look at the linked documentation and just embed it.

test plan: generate the api documentation and look through the @model
definitions at the top of each Resources page. the new rendering should
show more accurate type information.

Change-Id: Id5af514cd235e66af2ce868bce95eb49d71062ab
Reviewed-on: https://gerrit.instructure.com/70484
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-01-20 19:07:41 +00:00
Amber Taniuchi 05c104c745 add validation for crocodocable document in firefox
crocodoc/canvadoc annotations have some issues in firefox
so we display a warning for those using firefox. Previously
we were only checking for Canvadoc annotations settings,
but adding further check for crocodocable document so
that the warning shows up anytime a document is
annotatable via crocodoc since Canvadocs are not
available to everyon yet.

fixes CNVS-23286

Test Plan:
1. In /plugins/crocodoc, enable crocodoc
2. In /plugins/canvadocs, enable both canvadocs and annotations
3. Create an assignment that accepts file uploads
4. Create a submission with a pdf
5. Open speedgrader for this assignment in FF
Verify: You see a green flash message at the top that says,
"Warning: Crocodoc has limitations when used in Firefox.
Comments will not always be saved."
6. Do the same thing in Chrome
Verify: You don't see a flash warning about FF
7. Also repeat steps above except with an assignment that accepts
url submissions only.
Verify: In FF, that you don't see a flash warning about FF and
annotations since url submissions are not previewable with
crocodoc.
8. Disable Canvadoc annotations (remove checkbox and apply in plugins)
9. Repeat step 5 and verify warning still shows up in FF
10. Create an assignment that has turnitin enabled
11. Submit to the assignment with text entry (make sure text is long)
12. Repeat step 6 and verify warning still shows up in FF

Change-Id: I7fef65bf78117bbd983f89f5774b792e8c68aa9c
Reviewed-on: https://gerrit.instructure.com/68846
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
2016-01-20 18:03:22 +00:00
Pam Hiett 3038eb520a Convert remaining px to rem within the /jst stylesheet folder
fixes: CNVS-26348

this is a straight 1-to-1 conversion for replacing existing
px font-sizes to allow a user to easily increase/decrease
their font-sizes within the browser

ui dev test plan:
- all css should compile successfully

test plan:
- easiest way to make sure it's working is to create or have an outcome
ready
- go to Grades > Learning Mastery (you might have to enable this in
settings)
- on the tab that matched your outcome you should hover and see a
popup, this should look/feel the same as the screenshot below:

http://cl.ly/3w2Y0f421H16

Change-Id: I282059fbcecc2b0278c893a8ce548b919b5ce7d5
Reviewed-on: https://gerrit.instructure.com/70118
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
Reviewed-by: Colleen Palmer <colleen@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-20 15:47:59 +00:00
Pam Hiett afb8f05cc6 convert px to rems on calendar app
Refs: CNVS-26348

test plan:
- as a user navigate to the calendar app from the left-hand nav
- your view should look like this: http://screencast.com/t/ZTfeKcIr1vg
- now increase the font size of your browser (zoom in chrome)
  the fonts should increase as well and look like this:
  http://screencast.com/t/i7nztNBnvP

Change-Id: If35bd5192bab77e7dc76bba97be6e336f7e33782
Reviewed-on: https://gerrit.instructure.com/70101
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-20 15:47:54 +00:00
Ethan Vizitei 4d944663f8 change require to define
refs CNVS-25916

this declaration works, but is more correct as a define statement
because it's building a module for the bundle to require and use

Change-Id: I466fe500c5791bf076d5b80b0bb7b85890239923
Reviewed-on: https://gerrit.instructure.com/70569
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2016-01-19 23:32:10 +00:00
Brad Horrocks e4cdb33b94 Disabling a plugin for an account no longer errors
Fixes PLAT-1307

Test Plan:
Enable a plugin at the root account (I recommend github with garbage data)
Try to disable the plugin for an account
  - once when there is no existing settings saved
  - once with existing settings

Change-Id: Ib59981fb8b3f222cf7fe9ff7d356d6e37aec8229
Reviewed-on: https://gerrit.instructure.com/70499
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-01-19 21:20:31 +00:00
Cody Cutrer a76d029902 don't try to create a communication channel with an empty e-mail
fixes CNVS-13389

test plan:
 * enable CAS on an account
 * go to create a user from the account settings page
 * fill in a username, but not an e-mail address
 * it should succeed; double verify that the user was created
   (as opposed to silently failing)

Change-Id: Ibe1e4e53ef94cfb2c369436428a5668f79a706d0
Reviewed-on: https://gerrit.instructure.com/70542
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-01-19 20:43:12 +00:00
James Williams ba88661af9 rails 4.2: fix calls to Filters module
refs #CNVS-26056

Change-Id: Iccb8c2943927817c27a3e82106ab1844e683de98
Reviewed-on: https://gerrit.instructure.com/70558
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-19 20:24:02 +00:00
James Williams 57f962d4aa enforce term date restrictions on course admin users
test plan:
* add a teacher to a course
* in the account enrollment term, set access dates for teacher
 to start in the future
* the course should show up in the list of "Future Enrollments"
 but should not be accessible

closes #CNVS-25707

Change-Id: I869baaad67c88854cbc0585c7043ae80d0b40d32
Reviewed-on: https://gerrit.instructure.com/70261
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-01-19 20:00:13 +00:00
Alex Boyd 07bc4a53ef Make minical highlights high contrast friendly
Fixes CNVS-25360

Test plan:
 - Test in all browsers Canvas supports - I'm not confident at all
   that the styles I've used will work across all browsers
 - Also test with both the old UI and the new UI
 - View the calendar
 - Make sure the mini calendar on the right sidebar shows a black
   highlight with white text for the current day and black outlines
   around days with events

Change-Id: Ibadc69ef3b04f7c6cc38bf38c6da5960190ca082
Reviewed-on: https://gerrit.instructure.com/70449
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2016-01-19 19:52:27 +00:00
Alex Boyd 1bc9e9a334 Fix tab order of faculty journal create/cancel buttons
Fixes CNVS-26270

Test plan:
 - Enable Faculty Journal on an account
 - Open the faculty journal for a user in that account
 - Click the button to create an entry
 - Ensure that the cancel button comes before the create button in
   the tab order

Change-Id: I46aae8b389c03f8cb0b55fb8bdad8482d1adc335
Reviewed-on: https://gerrit.instructure.com/70208
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2016-01-19 19:52:23 +00:00
Alex Boyd f65319febd Require dynamic_form in app/controllers/user_notes_controller.rb
Fixes CNVS-26447

Test plan:
 - Enable Faculty Journal on an account's settings page
 - Go to /users/<id>/user_notes, where <id> is the id of any user
   in that account
 - Make sure it loads without saying that there was a problem
   loading the page

Change-Id: Ia964c18e3c79fda98006013f28a48d4827fd2e9d
Reviewed-on: https://gerrit.instructure.com/70192
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2016-01-19 19:52:20 +00:00
Alex Boyd 7799495aa3 Redesign the To-Do, Coming Up, and Recent Feedback lists
Fixes CNVS-25877

Test plan:
 - Create a user with:
   - an assignment that needs to be submitted
   - an assignment that needs to be graded
   - an assignment whose grades the user needs to moderate
   - an assignment that they need to peer review
   - a calendar event that they can see
 - Go to the user's home page
 - Ensure all of the assignments show up in the to-do list
 - Ensure they show up in Coming Up as well
 - Ensure that the calendar event shows up under Coming Up
 - Go to the courses where you created the assignments
 - Ensure that each assignment shows up on its respective course to-do
   list
 - Submit an assignment
 - As a teacher, ensure that the assignment shows up as needing
   grading, and that the number in the badge to the left is 1
 - Ensure that screenreaders read the badge as "1 submission
   needs grading"
 - Make another submission as a different user
 - Clear the cache by running `Rails.cache.clear` at a Rails console
 - As the teacher, ensure that the badge is now 2
 - Ensure that screenreaders read the badge as "2 submissions
   need grading"
 - Repeat 8 more times as different users, so that there are now
   10 submissions
 - Clear the cache again
 - Ensure that the badge now says "9+"
 - Ensure that screenreaders read the badge as "More than 9
   submissions need grading"
 - As the user who submitted the assignment, ensure that the grade
   shows up on the To-Do list, Coming Up, and Recent Feedback
 - As a teacher, leave a submission comment
 - As the user who submitted the assignment, ensure that the comment
   shows up under Recent Feedback
 - Create a public course
   - You can make a course public by going to its settings page
     and checking "Make this course publicly visible"
 - Log out
 - Visit /courses/<id>, where <id> is the id of the course
 - Ensure that the course shows as expected, and that nothing
   shows up on the to-do list
 - Automated tests should cover everything else

Change-Id: I18673995db94d896bf2c39515258e61065b48319
Reviewed-on: https://gerrit.instructure.com/69474
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Tested-by: Jenkins
Product-Review: Allison Weiss <allison@instructure.com>
2016-01-19 19:52:16 +00:00
Cody Cutrer ac7980cac9 fix backtrace for dynamic method
Change-Id: I3a37b5dbd063f3f92e12e3483ee08378da1c1e12
Reviewed-on: https://gerrit.instructure.com/70573
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-19 19:32:52 +00:00
Ethan Vizitei 51baba3eeb move content_migration work into support bundle
refs CNVS-25916

the migration_tool plugin uses the secondary
bundle override technique of having an extension
bundle loaded in parallel.  I don't think we
want to support both that and the glue-module
extension approach since only one plugin makes
use of the former.  In order to migrate that
work to extend a core module, the work
needs to be moved to a non-entry-point
module (because overriding require names doesn't
work if you're talking about the bundles
rails knows how to load). All this patchset does
is move the core work done in the content_migration
bundle into it's own module to make a valid
override target for the plugin refactor.

Also adds this new module as a non-entry-point
exception in the bundles.js, just like it's sibling
file.

TEST PLAN:
 1) nothing should change on /courses/x/content_migrations

Change-Id: I2dfa0d1b1d11657bb5931e8caae6ef9d4b3c9aec
Reviewed-on: https://gerrit.instructure.com/70510
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-19 18:25:12 +00:00
Nathan Mills 9d4deccbf4 remove skip to question text accessiblity link
fixes CNVS-25795

test plan

create a quiz with a multiple fill in the blank question
set jaws focus to the pts possible header
push the down arrow key
you shouldn't get a hidden link for "skip to question test"

Change-Id: Ie11597ac36dd23ec727e187a74028129184b6093
Reviewed-on: https://gerrit.instructure.com/70278
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-01-19 18:22:05 +00:00
James Williams b76917cc9f fix context module progression relocking race condition
test plan:
* relocking should work as before

closes #CNVS-26389

Change-Id: I5bc9d532860445131e43a04b8296e01d107bff79
Reviewed-on: https://gerrit.instructure.com/70272
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-01-19 17:48:51 +00:00
Keith Garner 1a3a166b08 display download submissions button on screenreader gradebook
Screenreader gradebook now displays the "Download All Submissions"
button if any of the allowed submission types on an assignment is
downloadable. An empty zip file is now created if an assignment allows
both downloadable and non-downloadable submissions and all submissions
are of the non-downloadable variety.

fixes CNVS-26135

test plan:
 - As a teacher create an assignment with text and media type
   submissions selected
 - As a student submit the assignment
 - As a teacher go to the individual view gradebook
 - Select the assignment under Content Selection
 - Look for Download All Submissions button
 - Click "download all submissions"
 - If the student submitted a text type, expect to see it in the zip
   file.
 - If the student submitted a media type, expect an zip file with no
   entries.

Change-Id: I84913d6950ce8a8db28460c0ea26a2469dec86d9
Reviewed-on: https://gerrit.instructure.com/70437
Reviewed-by: Strand McCutchen <smccutchen@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2016-01-19 17:45:08 +00:00
Cody Cutrer c042228a5c make it easy to enumerate special accounts
refs CNVS-26525

Change-Id: I7de46889af472c3184e86ae5f8f19b7c8bf54db1
Reviewed-on: https://gerrit.instructure.com/70424
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-19 17:36:16 +00:00
Jeremy Stanley 0b1f399126 don't send new file notifications for concluded courses
test plan:
 - ensure students do not receive "new file" notifications
   for unpublished or concluded courses
   (note that new file notifications can be delayed several
    minutes due to batching)

fixes CNVS-26214

Change-Id: I791f6917e15938c825962e1b21ddf5e59d4fe6c9
Reviewed-on: https://gerrit.instructure.com/70110
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2016-01-18 23:55:20 +00:00
Steven Burnett e7b4a339b3 fix error handling with notifications sqs queue
fixes CNVS-25481

Test-Plan:
- change the sqs queue in a way to cause a failure.  Notice
  message object reports as such and error is logged

Change-Id: I5ac0b9ac720b41546aa605e835b3badcfbbd17fa
Reviewed-on: https://gerrit.instructure.com/70262
Reviewed-by: Alex Boyd <aboyd@instructure.com>
Tested-by: Jenkins
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
2016-01-18 23:41:01 +00:00
James Williams b1f3daf044 rails 4.2: misc spec fixes
refs #CNVS-26056

Change-Id: Ia94ee2fcfded1ec66cb77a19085b005c81304800
Reviewed-on: https://gerrit.instructure.com/70251
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-18 21:45:39 +00:00
Spencer Olson 2658d2c05c mobile: add grading period scores to endpoints
adds support for a 'current_grading_period_scores'
argument that can be passed to api/v1/courses,
api/v1/courses/:id, api/v1/users/:user_id/courses,
and api/v1/users/self/favorites/courses. if this
argument is passed to these endpoints, scores for
the current grading period will be returned.

closes CNVS-26203

test plan:
 - run
     $ bundle exec rake doc:api
   to generate API documentation.
 - view the documentation at
   public/doc/api/index.html and navigate to the
   documentation for the Courses controller.
 - verify there is documentation explaining how
   to pass the 'current_grading_period_scores'
   argument, and explaining what will be returned.
 - hit the api/v1/courses, api/v1/courses/:id,
   api/v1/users/:user_id/courses, and
   api/v1/users/self/favorites/courses endpoints
   and pass in 'current_grading_period_scores'
   as an include[] argument. verify you get the
   expected responses back, as outlined in the
   API documentation for 'current_grading_period
   _scores'.
 - ping me with any questions :)

Change-Id: Ic8985c6a85af120b9d07ef2cd4e8e049e0c327fc
Reviewed-on: https://gerrit.instructure.com/69836
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2016-01-18 21:19:18 +00:00
Joel Hough 5e8215b249 make Context.get_account work with CourseSections
fixes CNVS-26336

test plan
- make a calendar event with a course section context (an event
 with 'Use a different date for each section' checked will do)
- view the calendar feed
- ensure the calendar feed renders

Change-Id: I391d5b43463a20ef34d85925021c51821e9fc5ba
Reviewed-on: https://gerrit.instructure.com/70070
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
2016-01-18 21:08:51 +00:00
Ethan Vizitei 0a5cd6797d identifiable error on cache miss
refs CNVS-26368

make sure we can find instances where we're unable to find accounts
by throwing a specific error (rather than counting on
ActiveRecord::RecordNotFound) for that case.

TEST PLAN:
 1) we should start seeing AccountCacheErrors showing up in Sentry

Change-Id: I9ae05df6a7ac2ca921ace70f10eeae32f11b2e70
Reviewed-on: https://gerrit.instructure.com/70468
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-18 18:20:11 +00:00
John Corrigan b131e30f0d reference assignment name in arialabels in list view
fixes CNVS-22932

- Update the PublishIconView instantiated by AssignmentListItemView to
  provide cusom publishText & unpublishText that includes the
  assignment's name.
- Update edit, delete & move links in the AssignmentListItem view to
  reference assignment's name.

test plan:
- Using NVDA, navigate the publish, edit, delete & move controls from
  the assignment list view and validate that the assignment name is
  included along with other text.

Change-Id: I782363602b0cc4d7c176862103e1ded2b6314d6b
Reviewed-on: https://gerrit.instructure.com/70229
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2016-01-18 18:03:05 +00:00
Cody Cutrer e1529eb1ae switch a few things to use account_chain
instead of assuming [self, Account.site_admin]

refs CNVS-26291, CNVS-26292

Change-Id: I8c20a3e29f5af91d04e380794f21705706fd96a8
Reviewed-on: https://gerrit.instructure.com/69841
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-01-18 17:51:42 +00:00
Alex Boyd d4be983a9f Fix focus indicator on discussions remove attachment button
Fixes CNVS-26399

Test plan:
 - Test in all browsers Canvas supports - this originally occurred just
   in Firefox, but make sure none of the others have regressed.
 - Create a new discussion topic
 - On the edit page, upload an attachment
 - Tab to the "X" button next to the attachment
 - Ensure a border shows up

Change-Id: Iccf7930a6ee7cf2bf4add2b3776d3ed737efc10b
Reviewed-on: https://gerrit.instructure.com/70346
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2016-01-18 17:17:37 +00:00
August Thornton 777b735452 handle exceptions for protect from forgery
refs CNVS-18870

test plan:
  - navigate to $(yourcanvasdomain)/canvas/login
  - paste the following in the javascript console
    in the browser of your choosing:
      document.cookie = "_csrf_token=1"
  - attempt a login with valid credentials
  - expect a flash error with:
      "Invalid Authenticity Token"

Change-Id: I1349026227e8e733a3199c8c000323fffc32127e
Reviewed-on: https://gerrit.instructure.com/70321
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-01-18 16:53:59 +00:00
Andrew Butterfield 53b1e3a1c8 Calendar control now behaves like tabs
fixes CNVS-25666

Test plan:
* Visually the appearance of the calendar button control should be the
  same as it always has been
* For KO and SR users when the calendar button control is tabbed to, the
  active button should receive focus
* The following constraints should be true no matter which button in the
  calendar button control has focus
  * When tab is pressed and a button in the calendar button control
    already has focus, focus should transition to the next focusable
    element in the DOM outside of the calendar button control
  * Similarly, when shift+tab is pressed focus should transition to the
    previous focusable element in the DOM outside of the calendar button
    control
* When using the calendar button control with a SR it should announce
  itself as a tab list and state which tab is currently selected
* As new tabs are activated using the arrow keys the SR should announce
  which is currently selected
* Pressing the left and up arrow keys should change the active button to
  the previous button in the calendar button control and the calendar
  view should be updated to the newly activate button's view.
* This behavior should wrap around when the beginning of the list is
  reached
* Pressing the right and down arrow keys should change the active button
  to the next button in the calendar button control and the calendar
  view should be updated to the newly activate button's view.
* This behavior should wrap around when the end of the list is
  reached

Change-Id: I308b6cd121d71a7c24bbb7c235aa99b1d5250d44
Reviewed-on: https://gerrit.instructure.com/70237
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
2016-01-18 16:14:15 +00:00
Ethan Vizitei 7e527b7e1f error on unfound account in cache miss block
refs CNVS-26368

if for some reason the server checking during a cache miss
can't see the account (can't see shards, etc) then don't allow
nil to get into the cache, as this causes many problems down the line
in the context loading sequence for each request that finds "nil" in the
cache

TEST PLAN:
 1) hmmm....one way you _could_ test this is to setup an account and an
   account domain, then write a "find" method on account that returns
   nil only if you are looking for the ID for that new account, and calls
   super otherwise, and prove that when you hit your app with that domain
   it errors from the LoadAccount area.
 2) then, to prove we haven't polluted the cache (so without restarting
  redis), remove that method from account and hit it again and you should
  get through (if the cache were polluted, then you would get nil from
  the cache and get 403-type events).

Change-Id: I8a59c781da3b85c56c046d6d3637fce72cd07856
Reviewed-on: https://gerrit.instructure.com/70423
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-18 16:09:39 +00:00
Chris Hart 5b671d2691 Add rem units instead of px units to /stylesheets/pages
Fixes: CNVS-26372

This converts our px unit font-sizing in the all the stylesheets in
/pages to use our mixin that converts them to rem units.

Test Plan:
- CSS should compile without errors

- Go to a course's Gradebook

- In Chrome, change the default size of your font from Medium to
  Large or Very Large. You will see that the Gradebook table
  content now respects the user preferences in terms of font-size:
  http://screencast.com/t/zGcU8ajA3H

- However, at Chrome's default font-size (Medium), you should see
  your Gradebook's table content appearing exactly as it currently
  does on production.

Notes:

- This is a direct conversion from px to rem, so nothing in the
  interface visually changes, just the unit type were are using.

- We did start using the global variables set aside for consistent font
  sizing where they were matching, ie 12px = $ic-font-size--xsmall, etc.

- Looking at the Gradebook is the easiest example to see these
  changes in effect. There are other similar tweaks that happen
  globally, but if Gradebook is working and the Canvas CSS is
  compiling we're good, since this is a 1 to 1 conversion.

Change-Id: I9ae9bbc447c9ca83d8d8a57bbec98c8a96fd4d03
Reviewed-on: https://gerrit.instructure.com/70134
Tested-by: Jenkins
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-18 15:15:24 +00:00
James Williams 992349ee0e fix reflection merges
options[:conditions] is nil

also fixes for rails 4.2

refs #CNVS-26056

Change-Id: Iae3b456c8b535f41f4e61528bf0d2f4233a4a2b4
Reviewed-on: https://gerrit.instructure.com/70381
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-18 15:05:43 +00:00
Pam Hiett 61ea6d8532 fix FF ellipses fade on assignment points
Fixes: CNVS-24909

The Firefox white-space bug strikes again. This
commit removes our Firefox workaround mixin to the
.ellipses class when it is contained by the .ig-list
> .ig-row elements by adding a min-width: 1px.

test plan:
- create an assignment with a long name and lots of
  options (multiple due dates).
- add the assignment to a module
- return to the assignments index page, and make sure
  the layout now looks like this:
  as a teacher: http://screencast.com/t/VLq8r9pFu
  (the publish and cog icons should not be pushed out of view)
  as a student: http://screencast.com/t/ayuDw77e
  (the points should not be faded out)
- click on the conferences link from the left-hand sub-nav
  the items should ellipses when the brwoser is reduced

Change-Id: I928636be18112e6ea2654100fe7afcc93a768afe
Reviewed-on: https://gerrit.instructure.com/69856
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-16 06:11:17 +00:00
Pam Hiett 7ac7f7b3d4 convert font-size within feature-flags from px to rem
Fixes: CNVS-26383

test plan:
- as a user navigate to the account settings
- scroll to the bottom where the "Feature Options" appear
- in chrome preferences "advanced settings" select
  font size large or very large
- the details should now enlarge respectively

Change-Id: Ia7dcf46a04d3e1eac75cae5e81ba145182084628
notes: http://screencast.com/t/wWkeVsC90y
Reviewed-on: https://gerrit.instructure.com/70120
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-15 23:53:25 +00:00
Clay Diffrient 0a4e16282d Make MSF work properly in test instance environments
closes CNVS-26367

Test Plan:
  - In an environment that causes the Canvas Test Installation
    warning banner at the bottom, create a few module items.
  - Make sure New UI is turned on
  - The module sequence footer should not cover the normal
    footer when you are scrolled to the bottom of the page

Change-Id: I8ea7b56cfb4626eab67a7c8941446a2d55de4f1a
Reviewed-on: https://gerrit.instructure.com/70165
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-01-15 23:24:50 +00:00
Chris Hart 4d520a6b9a Add rem units instead of px units to /stylesheets/components
fixes CNVS-25278

This converts our px unit font-sizing in the all the stylesheets in
/components/ to use our mixin that converts them to rem units.

Test Plan:
- CSS should compile without errors
- In Chrome, change the default size of your font from Medium to
  Large or Very Large. You will see that all Canvas buttons now
  respect the user preferences in terms of font-size:
  http://screencast.com/t/jIZr6CrT
- However, at Chrome's default font-size (Medium), you should see
  buttons appearing exactly as they currently do on production.

Notes:

- This is a direct conversion from px to rem, so nothing in the
  interface visually changes, just the unit type were are using

- We did start using the global variables set aside for consistent font
  sizing where they were matching, ie 12px = $ic-font-size--xsmall, etc.

- Looking at the Canvas buttons is the easiest example to see these
  changes in effect. There are other similar tweaks that happen
  globally, but if one is working and css is compiling we're good,
  since this is a 1 to 1 conversion.

Change-Id: I41054430509bc3b04377bc3b9da3c25bca625209
Reviewed-on: https://gerrit.instructure.com/70033
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-15 22:46:54 +00:00
Chris Hart 02b5caef5a Remove 16px font size from document root
Fixes: CNVS-26469

Putting a pixel value in the document root was
stopping our newly converted rem font-sizes from
scaling up when the changes his or her browser
font sizing preferences. This change removes the
pixel value, so the document root font-size is
100% again.

Test plan:

- In Chrome's advanced Settings/Preferences, set your
  default text size to Very Large.
- When you return to your Canvas tab, the primary
  nav's font and icon size should have scaled up,
  respecting the browser's font preferences:
  http://screencast.com/t/TNQNNvgsBv0

Change-Id: Ib7e410d582219670dcc4b43fe48355edc85a43dd
Reviewed-on: https://gerrit.instructure.com/70252
Tested-by: Jenkins
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-15 16:56:50 +00:00