Commit Graph

11342 Commits

Author SHA1 Message Date
Rob Orton 256c2b68cf create reset_mfa permission
fixes CNVS-23897

test plan
 - reset MFA permission should be available in
   site_admin admin role overrides
 - reset MFA permission should be available in
   regular root_account admin role overrides if
   MFA is enabled in settings
 - user 1 = a user that is an admin for site_admin
   and that has MFA enabled
 - create a site_admin role that only has the
   reset mfa permission
 - user 2 = a user that has the new reset MFA role
 - user 2 should be able to reset MFA for user 1

Change-Id: I030f95600ee1260b4e4a541c2a49bb5d2ccb4afe
Reviewed-on: https://gerrit.instructure.com/69815
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2016-01-12 23:12:18 +00:00
Ryan Shaw f0ba46fd7b focus next input when you select flickr image result tile
fixes: #CNVS-26048

test plan:

when you click / hit "enter" on an image result in 
the flicker search results, it should focus the next 
input  box in the form (the "alt" field), so you don't 
have to tab through the other 500 search results.

this makes things nicer for keyboard-only users.

Change-Id: I453141146a4097bff7e981ac39ac2921a5876530
Reviewed-on: https://gerrit.instructure.com/69245
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Aaron Cannon <acannon@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2016-01-12 23:12:10 +00:00
Derek Bender d972fa924f Add specs for SubmissionComment after_destroy
fixes CNVS-25872

The after_destroy :delete_other_comments_in_this_group callback
previously had no specs. This method had a regression related
to the rails 4 deployment that needed to be hotfixed in
15f65755 (see CNVS-25770). These added specs would have caught
this regression.

Also, a small refactor for rejecting self because we can now
use the ActiveRecord .not API over where("id <> ?", id).

Place skip_destroy_callbacks(?) in private/protected area and
avoid using the instance variable.

Test plan:

  - regression test on group assignment comments and
    subsequently deleting them
  - $ rspec spec/models/submission_comment_spec.rb

Change-Id: I16d366f992cd0d165068ca39f87bec521b76121e
Reviewed-on: https://gerrit.instructure.com/68900
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2016-01-12 23:12:00 +00:00
Strand McCutchen 5478e81a46 [a11y] widen grading box in submission details
fixes CNVS-25605

The select for complete/incomplete assignments in SRGB is
too narrow. This style chnage makes the menu wider and more
accessible.

Test plan:

 0. As a teacher, create an assignment which has "display
    grade as" set to complete/incomplete.
 1. Switch to individual gradebook.
 2. View submission details of a student for the
    assignment.
 3. Verify the dropdown menu is wide enough to display the
    words in it.

Change-Id: I5a47ad24dab2c6e566f704611fab61766d648720
Reviewed-on: https://gerrit.instructure.com/69422
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Dana Danger <dana@instructure.com>
2016-01-12 21:21:54 +00:00
Strand McCutchen 06fe9c9665 [A11y] set focus on cutoff score in message students dialog
fixes CNVS-25741

When an instructor "Messages students who…" and selects an
option for which a cutoff score is appropriate, we set
focus on the new 'cutoff' score field. Additionally, a
label has been added to make the field more accessible.

Test plan:

 0. In gradebook, using keyboard only navigation and
    screenreader software…
 1. Tab to the column of an assignment.
 2. Press [esc] to get out of edit mode.
 3. Press [m] to open the assignment menu.
 4. Select "Message students who…"
 5. Select either "Scored less than" or "Scored more than"
    from the menu.
 6. Verify that focus is set on the cutoff score input.

Change-Id: Ide0663ef21002866e1f683390b07316f316ec42a
Reviewed-on: https://gerrit.instructure.com/68820
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Dana Danger <dana@instructure.com>
2016-01-12 21:21:48 +00:00
John Corrigan 897989be07 update UX for selecting external tool submission type
fixes CNVS-25670

- Use some of our new styles for the form field.
- Update js hooks so that just clicking the text input doesn't open the
  popup.
- Make the `screenreader-only` method for opening the modal visible, and
  make it look nice (ish).

test plan:
- Go to the create an assignment form.
- In the `Submission Type` dropdown select `External Tool`.
- Observe that the `find` button is visible, and that the label text is
  updated to (try to) make more clear what needs to be done.
- Observe that clicking in the text field doesn't open the External Tool
  modal.
- Observe that clicking the `Find` button does open the External Tool
  modal.
- Observe that focusing on the text input with the keyboard does not
  open the External Tool modal.
- Observre that the External Tool selection flow is keyboard accessible.

Change-Id: I0a74362cc0d8ac21af40aca32503bde3b0698383
Reviewed-on: https://gerrit.instructure.com/69715
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2016-01-12 20:55:54 +00:00
Andrew Butterfield c01b834729 Reactify discussion keyboard shortcut modal
fixes CNVS-23755, CNVS-14541

@nathan said that the disclaimer about screenreader/keyboard shortcut
conflicts was sufficient to resolve CNVS-14541

Test plan:
* Navigate to a discussion topic page
  /courses/:course_id/discussion_topics/:discussion_topic_id
* Ensure that when pressing the comma key or shift+? that a Keyboard
  Shortcut modal appears displaying a list of keyboard shortcuts
* Ensure that the modal can be navigated with VO, NVDA, and JAWS
* Ensure that before navigating through the list of keyboard shortcuts
  a SR warning explains that the shortcuts may conflict with SR
  shortcuts
* Ensure that after navigating the list a SR warning explains that the
  modal can be closed by pressing the ESC key

Change-Id: Ib3ae1924f2b811b8c8b0d3cbef17e2e17dcad814
Reviewed-on: https://gerrit.instructure.com/68821
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2016-01-12 17:41:26 +00:00
Michael Nomitch 757d9202d8 remove unused constants from canvas models
fixes CNVS-26220

test plan:
  - none

Change-Id: I40e675550e25a8c88795a4ddcd0d05e8470ada69
Reviewed-on: https://gerrit.instructure.com/69752
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Mike Nomitch <mnomitch@instructure.com>
2016-01-12 17:39:22 +00:00
James Williams 6215ae20f2 show restricted future enrollments in course list
test plan:
* create a course with a future term/start date
* check the box "Restrict students from viewing before start date"
 in the course settings
* invite a student

* the course should be shown in the list of future enrollments
 (but not with a link, since the course is not accessible)

closes #CNVS-26313

Change-Id: Ica49536a09c65f3df9d4e0f62e885e8455bced40
Reviewed-on: https://gerrit.instructure.com/70045
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2016-01-12 16:21:41 +00:00
Ethan Vizitei e1b5e65743 allow SR/KO users into media recording dialog
closes CNVS-25690

Also add SR-only message to let users know that
to avoid flash they can upload pre-recorded media.

TEST PLAN:
  1) go to RCE in any context with Kaltura/Notorious configured
  2) use keyboard or SR navigation to open record media dialog
  3) make sure you see the SR-ONLY message with the screenreader
     letting you know to prefer uploading media to recording
     in browser.

Change-Id: I3862a854ef800833519b18b47ad906b007494574
Reviewed-on: https://gerrit.instructure.com/69716
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-12 15:49:19 +00:00
Jacob Fugal 371ec30967 refactor CSRF handling for clarity and rails3+
closes CNVS-18870

CNVS-18870 as described in the ticket description is not a bug. see
comments on the ticket for more details. but while investigating and
confirming that, it became obvious that the odd structure and scattered
implementation of the CSRF protection was both making it hard to reason
about and easy to introduce new bugs. after the refactor, we still:

* don't perform CSRF validation on GET requests
* don't perform it on token-authenticated API requests
* do perform it on session-authenticated API requests
* do perform it on non-API requests regardless of authentication method

additionally, we now:

* don't perform CSRF validation on HEAD requests

finally, we _don't_ support a csrf_token in the session anymore. that's
been deprecated forever; we can remove the code now.

test-plan:
 - should not perform CSRF validation for:
   - GET requests
   - token-authenticated POST requests to API endpoints (path prefixed
     by /api/) without an authenticity_token parameter or X-CSRF-Token
     header
   - token-authenticated POST requests to API endpoints even with an
     authenticity_token parameter
   - token-authenticated POST requests to API endpoints even with an
     X-CSRF-Token header

 - should perform CSRF validation for:
   - POST requests to non-API endpoints
   - session-authenticated POST requests to API endpoints

 - when CSRF validation should occur, but the user has cookies off:
   - POST requests to non-API endpoints should redirect to a "need
     cookies" page
   - XHR POST requests to non-API endpoints should not redirect
   - POST requests to API endpoints should not redirect

Change-Id: I3dbb3a68623bc9d03a3e744a9d4e1f038a32709c
Reviewed-on: https://gerrit.instructure.com/65103
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2016-01-11 23:31:47 +00:00
Pam Hiett 61eecb3b8e increase font size of assignment "needs grading" text
Fixes: CNVS-25369

test plan:
- as a teacher using the new UI
- navigate to your dashboard where assignments that need grading
  will be displayed on the right-side
- "needs grading" italicized text that displays under assignment
  title should now be font-size: 0.75rem (inspect code view)

- as a teacher using the old UI
- navigate to a course
- from the course home page the right-side should display what
  assignments still need grading - this should be 12px

Change-Id: Ib1a6475365d4ae0551117dd8c505fb835665273c
Reviewed-on: https://gerrit.instructure.com/69452
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-11 23:22:12 +00:00
Ryan Shaw 1d34103f80 fix bug where people would not see branding on dashboard
fixes: #CNVS-26358

test plan:

* log into canvas (so @current_user exists)

* go to the dashboard on a domain where you are
  not enrolled in anything (if you use pow this 
  could be something like blankaccount.canvas-lms.dev)

* you should see blankaccount's branding 

Change-Id: Ieef00e50eb6cc5c3d09d90441bd257ecf316af99
Reviewed-on: https://gerrit.instructure.com/70055
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-01-11 22:58:29 +00:00
Alex Boyd a3eaf1a5da Add API to bulk fetch and reset communication channels
Fixes CNVS-24295

Test plan:
 - Create at least three users and give each of them a few email
   addresses
 - Add 'foo@example.com', 'bar@example.com', and 'foobar@example.com'
   as addresses to the first of those three users
 - Run the following, with U1 and U2 replaced with the ids of the
   first and second users you created, respectively (do not
   include the id of the third user in this list):
     CommunicationChannel
       .where(user_id: U1)
       .update_all(bounce_count: 1, last_bounce_at: Time.now)
     CommunicationChannel
       .where(user_id: U2)
       .update_all(bounce_count: 1, last_bounce_at: Time.now - 1.day)
 - As a site admin and on the account's domain, navigate to
   /api/v1/accounts/self/bouncing_communication_channels.csv
 - Ensure that you're given a CSV file that mentions all of the
   first and second user's channels but none of the third user's
   channels
 - Ensure that the second user's channels come before the first
   user's channels, and that the first user's channels mention
   today's date as the last date at which they bounced while
   the second user's channels mention yesterday instead
 - Navigate to /api/v1/accounts/.../bouncing_communication_channels.csv,
   where ... is the id of the account, and verify that you get
   the same result
 - Navigate to
   /api/v1/accounts/self/bouncing_communication_channels.csv?pattern=foo*
 - Ensure that the resulting CSV mentions foo@example.com and
   foobar@example.com but not bar@example.com
 - Navigate to
   /api/v1/accounts/self/bouncing_communication_channels.csv?before=TODAY
   where TODAY is today's date in ISO 8601 format
 - Ensure that the resulting CSV mentions only the second user's
   channels and not the first user's
 - Navigate to
   /api/v1/accounts/self/bouncing_communication_channels.csv?after=TODAY
 - Ensure that the resulting CSV mentions only the first user's
   channels and not the second user's
 - Make a POST request to
   /api/v1/accounts/self/boucing_communication_channels/reset with parameters
   pattern=foo*
 - View the first user's profile
 - Ensure that foo@example.com and foobar@example.com are no longer
   marked as bouncing, but all the other addresses are
 - Make a POST request to
   /api/v1/accounts/self/bouncing_communication_channels/reset with parameters
   before=TODAY where TODAY is today's date in ISO 8601 format
 - View the second user's profile
 - Ensure that all of the second user's communication channels are
   no longer marked as bouncing
 - View the first user's profile
 - Ensure that the user's channels are still marked as bouncing
 - Make a POST request to
   /api/v1/accounts/self/bouncing_communication_channels/reset
 - View the first user's profile
 - Ensure that their channels are now no longer marked as bouncing

Change-Id: Ic937777a03481dc0b442ff6cf766175cc987fd80
Reviewed-on: https://gerrit.instructure.com/68328
Reviewed-by: Alex Boyd <aboyd@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
Tested-by: Jenkins
2016-01-11 21:19:42 +00:00
Cody Cutrer 8a53495af9 pv4 doesn't return http method sometimes
Change-Id: I092024292f0434922f4ceef864364879d213d2dd
Reviewed-on: https://gerrit.instructure.com/69901
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
2016-01-11 20:09:50 +00:00
Jeremy Stanley 70856fc7ab fix keyboard focus issues on modules page
test plan:
 on the modules page, use keyboard navigation to:
  1. edit a module. after the dialog closes, the
     module's cog should regain focus.
  2. cancel editing a module. the module's cog
     should regain focus.
  3. delete a module. the previous module's cog
     should gain focus, or the Add Module button
     should gain focus if there isn't a previous
     module.
  4. cancel deleting a module. the module's cog
     should regain focus
  5. move a module via the "Move To" menu. the
     moved module's cog should be focused afterward

 in the edit-module dialog, ensure:
  6. when a prerequisite is deleted via keyboard
     navigation, the previous prerequisite should
     gain focus (or "Add Prerequisite" if the
     first prerequisite is deleted)
  7. when a requirement is deleted via keyboard
     navigation, the previous requirement should
     gain focus (or "Add Requirement" if the first
     requirement is deleted)

fixes CNVS-25730
fixes CNVS-26204

Change-Id: I84e21b9b882216a698908902975f6ba885bb2980
Reviewed-on: https://gerrit.instructure.com/69754
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-01-11 19:45:49 +00:00
Cody Cutrer 37e55fa51e simplify a no-longer-needed polymorphic shim query
Change-Id: I7af4bbfbd6cd312c99d004b6b3ba8b0df9effa9e
Reviewed-on: https://gerrit.instructure.com/70026
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-11 19:32:34 +00:00
Alex Boyd 8880139e5e Allow replies to announcements to be liked
Fixes CNVS-21996

Test plan:
 - Create an announcement with the "Allow liking" option checked
 - Reply to the announcement
 - Ensure a thumbs up icon shows up
 - Click it and ensure "(1 like)" shows up next to it

Change-Id: I659748564fbd1913b24f9c430a03454ae47e2469
Reviewed-on: https://gerrit.instructure.com/67856
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2016-01-11 18:19:27 +00:00
Cameron Sutter 2527f6b812 only most recent submission
fixes MBL-5281

test plan:
- use the calendar events index api to request assignments
- request submissions (with `include[]=submission`)
- the most recent submission should be returned within the
  calendar event assignment object (for assignments that have
  a submission for that student)

Change-Id: Ib060fb8557dd5f3315f058f0c4dcb989bb52aec7
Reviewed-on: https://gerrit.instructure.com/69040
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Ben Kirato <benk@instructure.com>
Product-Review: Brady Larson <brady@instructure.com>
2016-01-11 18:00:37 +00:00
Cody Cutrer 35643a30e6 pass form through to additional account settings partial
refs CNVS-26290

Change-Id: Ib1fdaa8b4359cdae5c62fe09cc105bd46207d5a3
Reviewed-on: https://gerrit.instructure.com/69874
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-11 17:52:50 +00:00
Cody Cutrer 43c561d2d3 rip out more polymorphic shims
Change-Id: Ie93eb06d746aa2f6968b0e29e1d22dfb2242c12f
Reviewed-on: https://gerrit.instructure.com/69683
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-11 17:40:03 +00:00
Jeremy Stanley 2008fadabd fix page error viewing external tool assignment with blank URL
test plan:
- on the assignments page, click + to add an assignment,
  set the type to External Tool, enter a name, and click Save.
- copy to another course
- try to view the assignment in the destination course.
  you should not see a 500 page error. (you may see "Couldn't find
  valid settings for this link." pop up instead.)

fixes CNVS-18051

Change-Id: I89873e6b91814013206166b7a43d61c41cb2ae6f
Reviewed-on: https://gerrit.instructure.com/69950
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-01-11 17:33:11 +00:00
Cody Cutrer f0d736eb61 fix saving plugins with no settings
refs CNVS-25993

test plan:
 * have a plugin with no settings
 * make sure the PluginSetting object for it doesn not exist in the db
 * enable it in the UI
 * in the db, the settings should be {}, not nil, and it should
   return true for enabled?

Change-Id: Ibf69dcdeef684a7407265df4cd0dd31b83ef92ec
Reviewed-on: https://gerrit.instructure.com/69953
Tested-by: Jenkins
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-01-11 17:09:46 +00:00
James Williams 0c6c7d87b1 use role_id instead of role in roster editing dialogs
test plan:
* through the course roster, the "Edit Sections" dialog
 for someone with a custom course role should work as before
* the "Link to Students" dialog should work as well for
 observers with custom observer roles

closes #CNVS-26032

Change-Id: I9709db9a0266366223fb0500f111f159a54765e1
Reviewed-on: https://gerrit.instructure.com/69929
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-01-09 23:07:46 +00:00
James Williams 728414d022 preserve module item links to hidden files in course copy
test plan:
* add a file to a course
* set it to hidden ("restricted access, available with a link")
* add the file as a module item
* copy the course
* the module item should be copied

closes #CNVS-26193

Change-Id: Iede093dc9f5451d69847d48089fd002d40946c28
Reviewed-on: https://gerrit.instructure.com/69852
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-01-09 23:07:36 +00:00
Ethan Vizitei 2a78a61561 webpack via file config
closes CNVS-26213

Allow using a config file rather than an env var
for turning on web pack.

TEST PLAN:
 1) set USE_WEBPACK env var to nothing
 2) touch config/WEBPACK
 3) web pack should still be enabled
 4) rm config/WEBPACK
 5) restart server
 6) canvas should use require-js bundles again

Change-Id: Ie733b66326482341c2371fddefe17c1cfa3006b3
Reviewed-on: https://gerrit.instructure.com/69739
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-09 18:09:48 +00:00
Joel Hough b58d10c966 make "Calendar Feed" link into a button
fixes CNVS-25890

test plan
- ensure that the "Calendar Feed" link on the right sidebar of the
 calendar can be activated via spacebar in all supported browsers

Change-Id: I79d952cf5b3af4f4da3143ec48fd3d531ebf630a
Reviewed-on: https://gerrit.instructure.com/69159
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2016-01-09 17:58:37 +00:00
Cameron Matheson 3449a7aabd force crocodoc previews for moderated grading assignments
Moderated Grading only works with Crocodoc for now.

closes CNVS-26062

Test plan:
  * enable crocodoc and canvadocs (w/ annotations)
  * make two assignments (one with moderated grading, one without)
  * submit crocodocable homework to both assignments
  * the moderated grading assignment should preview in crocodoc
  * the other assignment should preview through canvadocs

Change-Id: I886a276168dc2214cf5126a838a06f6867a6babc
Reviewed-on: https://gerrit.instructure.com/69564
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2016-01-08 22:01:20 +00:00
Sterling Cobb 26eb3f17fc add links to avatar and groups management
fixes CNVS-25177

Add a dropdown button that links to managing user avatars and groups

Test Plan

Given you have enabled avatars for the account
And you are on the new admin/account search page
When you navigate to the people tab
You should see a button with "..." text to the add people button
And when you press that button
It should show a dropdown with two menu items "Manage profile pictures"
and "View user groups"
Clicking on "Manage profile pictures" should take you to that page
Clicking on "View user groups" shoudl take you to that page

Change-Id: I8cda3efa7265f74fa621bb8e7bebca7699d35104
Reviewed-on: https://gerrit.instructure.com/69848
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2016-01-08 21:00:38 +00:00
Dan Minkevitch 7356bb7c40 Add screen reader message for file upload progress
Fixes CNVS-26121

Test Plan:
* Go to any course's files page as a teacher
* Upload a file to the course
* The screen reader should tell you the progress of the upload
  by reading the percent of it completed

Change-Id: I068709badfb87dfba08da938c2e3a318a2b75de4
Reviewed-on: https://gerrit.instructure.com/69491
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2016-01-08 20:33:44 +00:00
James Williams 2ce41da7dd remove write_attribute serialization shim
we removed the need for this with g/69498

Change-Id: Ieb1a22cfb61ffeaa244741f1c506db6df5fa5203
Reviewed-on: https://gerrit.instructure.com/69641
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-08 20:00:12 +00:00
Sterling Cobb 6f4891930a remove old sort code
fixes CNVS-26294

Removes old sorting code.

Test Plan

Given you have enabled the new Admin people/course search feature
When you got to the new people/course search page
And you click on the "Courses" tab
Then the columns should NOT be sortable
And when you click on the "People" tab
Then the columns should NOT be sortable

Change-Id: I6950269d7c73ca391f10599c243e3af10dc570db
Reviewed-on: https://gerrit.instructure.com/69849
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2016-01-08 19:01:29 +00:00
Clay Diffrient 3ad44cc4ba Fix file preview a11y issues
Makes it so that the info panel button indicates to
screenreader users that the info panel is displayed
so that they can then navigate to it.

It also hides the next/previous arrow icons from
screenreaders that way they don't get some wrong
indication that a picture is there.  I mean, there
is a picture there... but it's only for visual
presentation and doesn't need to be read because
there is other text there for screenreader users.

fixes CNVS-25696
fixes CNVS-25824

Test Plan:
  - Go to Files
  - Open a file preview
  - Enable a screenreader
  - Navigate to the "Info" button
  - Pressing it should indicate 'Info panel displayed'
  - Pressing it again should indicate 'Info panel hidden'
  - The arrows to navigate through the available files
    should indicate next and previous file as appropriate
    to the screenreader.
  - The arrows should not indicate the presence of an
    image.

Change-Id: I115172f69b117e349598d74016e96040d2e837c6
Reviewed-on: https://gerrit.instructure.com/68854
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-01-08 17:15:44 +00:00
Colleen Palmer 64c4d4a930 Add rem units instead of px units to /stylesheets/base
fixes CNVS-25991

This converts our px unit font-sizing in the all the stylesheets in
/base/ 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; the global navigation in Canvas should now respect that
change
Screenshot of things that are changing sizes:
http://cl.ly/3H2P1g1i3z33

Note:
- This is a direct conversion from px to rem, so nothing in the
interface visually changes, just the unit type we're 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
- The Primary nav is the easiest example to see these changes in affect.
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: Ie71ad22a495516e21317e302a0a488c31f4ae6a7
Reviewed-on: https://gerrit.instructure.com/69141
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2016-01-07 23:52:30 +00:00
Matthew Berns d458b6dc08 address accessibility issues with quiz regrading options
fixes CNVS-15134

test plan:
- go to a quiz that some students have already taken
- change the correct answer on one of the questions, a dialog with
  regrading options should be presented
- you should not be able to change the correct answer until an option is
  selected and hitting 'update' on the dialog
- update the question, but do not save the quiz
- refresh the page and go back to that question, the option you selected
  should show text for its regrade option on the answer and reflect that
  it's the correct answer
- save the quiz and return to the question
- the regrade text should not appear on the newly updated correct answer
- create a new question
- you should not be prompted to choose a regrade method when changing
  the correct answer on the new question
- when closing the dialog box, via either cancel or update, focus should
  return to the triggering element and not get lost on the page

Change-Id: I355f246d55f23468b1cb22337140407d08e2b3b2
Reviewed-on: https://gerrit.instructure.com/69149
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
2016-01-07 23:27:14 +00:00
Pam Hiett 4625ecaaa3 increase keyboard focus for settings toggle
Fixes: CNVS-25754

test plan:
- as a user navigate to the account user settings
- using your keyboard navigate down to the feature flag settings
- the toggle should now have a bigger focus indicator

- as a user navigate to the account user settings and make sure
  to enable high contrast
- now refresh and then keyboard navigate down to the feature
  flag settings to see the hc version of keyboard focus

Change-Id: I999bc46b5d6f27a5b86507336f1f47e65136d5b3
Reviewed-on: https://gerrit.instructure.com/69516
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-07 23:17:30 +00:00
Ryan Shaw 608c34bcc2 fix "fix KO navigation for equation editor"
2 things:

1. by not reusing the same element for every instance
   of this view, a few bugs were introduced because
   the code was expecting it to reuse the same element

2. by not allowing the 'compiled/views/EquationEditorView'
   module to be lazy-loaded it really does make the
   common js bundle that gets loaded on every page
   a lot bigger to download & parse (even though only
   a tiny fraction of people will actually edit RCE
   content and open this equation editor)

test plan:
* make sure basic view does not look wacky like:
  https://www.dropbox.com/s/l65gd6g74vzb32i/Screenshot%202016-01-07%2011.07.27.png?dl=0
* make sure you can toggle between basic & advanced

Change-Id: Ie0e757cbbf1def79b0925c63d86dd9e5f492c548
Reviewed-on: https://gerrit.instructure.com/69870
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2016-01-07 20:16:02 +00:00
Jacob Fugal 14c8e6a250 add and use tz.useMeridian (vs tz.hasMeridian)
fixes CNVS-25847

distinguish predicate for "locale _supports_ 12-hour time" from
predicate for "locale _prefers_ 12-hour time". it's possible for a
locale to support 12-hour time while still preferring 24-hour time.

checking support for 12-hour time is what tz.hasMeridian implements, and
is still useful, e.g. for when automatically switching 12-hour format
strings to 24-hour format strings if hasMeridian is false. but checking
preference for 12-hour time is now implemented by tz.useMeridian, and is
what's really wanted when making 12-hour vs 24-hour choices around the
timepicker.

the locale _prefers_ 12-hour time -- or alternately, tz.useMeridian is
true -- if the locale uses %l in its localized time format strings AND
supports 12-hour time (otherwise, they'd later be translated to %k).

test-plan:
 * en-AU is an example of a locale that supports 12-hour time but
   prefers 24-hour time
 * create a user with en-AU as their selected locale
 * go to a datepicker field with a time component (e.g. assignment due
   date) as that user
 * the timepicker portion of the datepicker should not include an am/pm
   dropdown
 * entering times both before and after noon using the timepicker should
   format correctly into the attached input

Change-Id: Idd06c5222aceb3df37576cebe4c3c165fe3f8245
Reviewed-on: https://gerrit.instructure.com/69534
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2016-01-07 19:04:02 +00:00
James Williams 3e1481aa6e rails 4.2: s/destroy!/destroy_permanently!
destroy! is now a method in rails

refs #CNVS-26056

Change-Id: I66e512265ff5cda6a12d7820e3cf69c77ef9e746
Reviewed-on: https://gerrit.instructure.com/69721
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-07 14:00:13 +00:00
Cody Cutrer 4ea1a795e6 allow processing external integration keys with a specified account
Change-Id: I0a9fdbf913b7576435f122fdafb4d8c46346a95b
Reviewed-on: https://gerrit.instructure.com/69838
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-07 05:34:05 +00:00
Ethan Vizitei 479be5283a fix KO navigation for equation editor
closes CNVS-25693

Removes the span element (bad element to nest
block elements within).  This makes jQueryUI
dialog tabbing work as expected for the equation
editor.

Also remove an extraneous require statement.

TEST PLAN:
  1) Go to an RCE instance
  2) try to enter an equation
  3) in the dialog box, tab through all buttons and
     the text editor to the "Insert Equation" button
  4) you should be able to shift-tab back into
     the text area and back into the button list.
  5) make sure you can tab back to the "Basic" tab
     and use arrow keys to change which tab we're focused
     on

Change-Id: I92c149cf04281324c3ce3838c9fcbb16c25626da
Reviewed-on: https://gerrit.instructure.com/69707
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-06 23:00:28 +00:00
Ryan Shaw 551929e43e remove a semi-colon. this is coffeescript
Change-Id: I6912578a378387813df68bd9055c655e5f204c7a
Reviewed-on: https://gerrit.instructure.com/69729
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
2016-01-06 22:58:08 +00:00
John Corrigan 33c1f48e77 ePub export progress bar shows real progress
fixes CNVS-25978

test plan:
- Generate an ePub export.
- Observe that the progress bar shows greater variation than it used to.
- Generate a normal content export without an ePub export.
- Observe that it generates as usual.

Change-Id: I46debe8280e8a227fde1933334923ed011b624fa
Reviewed-on: https://gerrit.instructure.com/69085
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
2016-01-06 21:21:57 +00:00
Joel Hough bffab4b61b link to specific discussion entries in notification links
fixes CNVS-22766

test plan
- cause a discussion reply notification to be sent (by replying to
 a discussion)
- follow the link in the notification
- ensure that the specific reply is scrolled into view
- do the same for announcements

Change-Id: I6a6f9fee7c9acd1e637486d607f71471f4664d6b
Reviewed-on: https://gerrit.instructure.com/69166
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2016-01-06 20:21:48 +00:00
Dan Minkevitch 9e3fe87f6b Fix ItemCog dropdown cutoff for Files legacy UI
Fixes CNVS-26081

Test Plan:
* In the files tab create/add 4 folders/files.
* Click on the cog option of the bottom item.
* You should see 5 options when clicking the cog button
  for all browsers in both new and legacy UI.

Change-Id: I0ae7e13695bfa6f4034898afa55203328cd505d4
Reviewed-on: https://gerrit.instructure.com/69483
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2016-01-06 19:14:46 +00:00
James Williams 337b934f56 set completed_at on enrollments during hard conclude
also fixes completed? when restrict_past_view is on

test plan:
* enroll a user in a course
* from the course settings, select "Conclude this course"
* view the user's page in the course
 /courses/X/users/Y

* it should list the current date after "Completed:"

closes #CNVS-25849

Change-Id: I54ac006bf94cb63021e331a01ff06d2d3f1966fd
Reviewed-on: https://gerrit.instructure.com/68869
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-01-06 17:20:00 +00:00
James Williams 4a0607e9f5 don't treat text/html files like text/plain
test plan:
* enable canvadocs
* in the console, add "text/plain" as a valid mime type by running
 the following

Setting.set('canvadoc_mime_types',
 JSON.dump(Canvadoc.mime_types + ["text/plain"]))

* visiting html files should preview inline instead of going
 through canvadocs

closes #CNVS-26184

Change-Id: I0762cc772f6bdaa859d14c054cfd243c57421a34
Reviewed-on: https://gerrit.instructure.com/69659
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-01-06 16:18:22 +00:00
James Williams 75d6692b37 rails 4.2: fix serialized update_all in importers
it casts the values to yaml automatically now

refs #CNVS-26056

Change-Id: I93727a1027de5421994e74d309debd36ad3d706e
Reviewed-on: https://gerrit.instructure.com/69741
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-06 16:04:17 +00:00
Cameron Matheson 948269e3e0 don't create useless canvadoc jobs
fixes CNVS-26116

Test plan:
  * stop your delayed_jobs worker
  * enable canvadocs
  * submit a canvadocable document
  * you should have one canvadocs job in your job db
  * submit a non-canvadocable document
  * you should still just have one canvadocs job in your job db

Change-Id: I976584abe36c452497abc4f1295dd8e137b172a8
Reviewed-on: https://gerrit.instructure.com/69380
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2016-01-06 10:58:07 +00:00
Pam Hiett 4d813d3656 fix due date input spacing for legcay ui
Fixes: CNVS-26114

test plan:
- as an admin or teacher using legacy UI
- create a new assignment
- the "available from" dates should now be aligned as such:
  (new) http://screencast.com/t/QgcGKyMUa vs
  (old) http://screencast.com/t/Vj2NseOp
- ensure the area remains unchanged in new UI

Change-Id: Ic249b999f061d66cf2baed34db6885785708927e
Reviewed-on: https://gerrit.instructure.com/69692
Tested-by: Jenkins
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-05 22:45:26 +00:00