Commit Graph

22225 Commits

Author SHA1 Message Date
Jared Amen f8cc3c64ed Add a flag to disable toast notification timeouts
test plan:
  * Go to account settings
  * Enable the flag to disable toast notification timeouts
  * Do something that would force a toast notification to pop up
    (remove a user from/add a user to a course, join a course, etc.)
  * Wait *roughly* seven seconds - the toast notification should not
    disappear. It will take a day for this notification to disappear.
  * Disabling the flag and repeating steps 3 and 4 should result
    in the toast notification disappearing after *roughly* seven
    seconds as expected.

closes LS-1138

flag = none

Change-Id: I2cacf0bf48568c9b5e88743c44bfd1faececfc51
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242612
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-07-23 18:24:30 +00:00
Xander Moffatt eab4c350e7 populate root_account_id on new attachments
refs LA-791
flag=none

* previous commit didn't properly set root account id in all situations
* this doesn't calculate it every time, but only when needed
* needs specs

test plan:
* create an attachment and save it
* its root_account_id should match your local root account
* change the attachment's namespace - specifically, change the number
* the root_account_id should match that new number

Change-Id: I8c38b7d0923eb8d046c667ec7e710bfb50bf4a39
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2020-07-23 16:08:16 +00:00
Mark McDermott e0556c55b5 Remove condition RCE could not find target node
refs: QUIZ-7709

flag = assignments_2_student

Test Plan:
- Set up Canvas with Canvas-RCE-API
- Create an assignment with a teacher and enroll a student
-Log in as student and navigate to assignment
-Ensure that no JS errors show up and assignment details
buton is enabled
-Run through jenkins and ensure that no tests throw `cannot
 call .length' on nil`

Change-Id: I7060c83737a0cae5446ee54fdcc6785a7671688f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243121
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Mark McDermott <mmcdermott@instructure.com>
2020-07-23 15:44:16 +00:00
Charley Kline 054742002e Don't paginate in such tiny slices when getting subaccounts
Fixes FOO-728
Refs GH-1673

GitHub issue for canvas-lms #1673 pointed out that if an account
a great deal of subaccounts, when creating a new course the list
of subaccounts becomes ready only very slowly because the page
size on the API call is defaulting to 10. This results in many,
many trips back to the well before the subaccount list is usable.

We set it to 200 here.

Test plan:
* Creating a new course via the modal still works
* Use your network tab to verify that the API call includes a
  page size i.e. /api/v1/accounts/1/sub_accounts?per_page=200

Change-Id: I73d402324116060bc5c6e0edbb3a739610b8e380
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243229
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-07-22 23:43:16 +00:00
Drake Harper 7709fb1d19 Change available pronouns from table to pills
Test plan:
-go to root account settings page /accounts/2/settings
-scroll down to the available pronouns section
-make sure the box is checked
-type in a pronoun and push enter
-click a pronoun to delete it

flag = none

closes VICE-543

Change-Id: I958270441ff318c528cfa8c54f262c53f99abde9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242925
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
Product-Review: Laura Leavitt <lleavitt@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
2020-07-22 22:45:18 +00:00
Jared Amen 7af32f9c1e Remove redundant title attribute from course nav links
test plan:
  * navigate to any course
  * inspect the "section-tabs" element
  * if the course is visible to students, there will be no title
    attribute.

closes LS-1206

flag = none

Change-Id: Ib710eb32f26b7e6e2381c79e883ae935e034a4c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242686
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-07-22 22:01:11 +00:00
Adrian Packel 213510fb50 Disallow wanton access to grading_rubrics action
Require the viewing user to be logged in and have appropriate privileges
to access the grading_rubrics action in GradebooksController. Previously
this endpoint made no attempt to check for access and would happily
return rubric data for the course to any old requester.

flag=none
fixes EVAL-1025

Test plan:
- Have some courses with some rubrics
- As a teacher:
  - Open /courses/<id>/grading_rubrics for a course you have instructor
    access to
  - You should receive a JSON response with...some rubric-related data
  - To ensure the endpoint still works for its intended purpose:
    - Open an assignment with a rubric (or create a new rubric for one)
    - Click the "Edit Rubric" icon in the rubric header
    - Click the "Find a Rubric" button
    - Make sure rubrics from this and other courses show up as expected
- As a student:
  - Open the same URL
  - You should receive a 401 (unauthorized) response
- While not logged in at all:
  - Open the same URL
  - You should be redirected to the login page

Change-Id: If7047c8b8f7fa3880608a4f3c628bb9d991015b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243141
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-07-22 21:36:53 +00:00
Adrian Packel f589588ee8 Allow verbose "Excused" on gradebook upload review
On the Gradebook CSV upload confirmation page, treat values of "Excused"
as actually representing an excusal, as opposed to only values of "EX".
This was confusing because the latter would appear to be expanded in to
the former.

flag=none
fixes EVAL-53

Test plan:
- Have a course with some students and assignments
- Export a CSV
- Make some changes and re-import your CSV (or change values in the CSV)
- On the upload confirmation page, change at least one value to
  "Excused"
  - Type it out fully--don't simply enter "EX" and let it be expanded
- Save changes
- On returning to the gradebook, check that the relevant item is
  actually marked as excused

Change-Id: If5b65a289cceee72a92fefa9832daca572419031
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242705
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-07-22 21:17:14 +00:00
Spencer Olson 83b6757e7b add text to link in speedgrader
Removes two links from SpeedGrader and adds text for one link. The two
removed links were solely being used to store data; the data they
contained is now injected into the JS environment in the controller.

closes EVAL-1014
flag=none

Test Plan:
1. Create a graded assignment that accepts file uploads, and use a
   rubric to grade. As a student, submit a file to the assignment.
2. As a teacher, go to SpeedGrader.
3. Grade the student using the grade input and verify the AJAX request
   to post the grade succeeds.
4. Grade the student using a rubric, and click to save the rubric.
   Verify the AJAX request to save the rubric succeeds.
5. Using a screenreader, navigate to the "download file" icon (arrow
   pointing down). Verify the screenreader reads, "Download this file".

Change-Id: Id42c409098513c9b81cc0fd1c65f0e8a95edff12
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242998
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-07-22 21:13:12 +00:00
Ahmad Amireh 7d9abef396 remove "responsive_admin_settings" flag
fixes FOO-284
flag  = none

Since this flag is now enabled for everybody, we can remove a lot of the
branching that was happening in CSS/JS.

| TEST PLAN /
| ---- ----

Verify that each of the following sites looks OK in responsive mode:

- Editing a discussion topic
- Feature flags
- Permissions
- Theme editor
  - "Login page" preview inside of theme preview (very bottom)
- Account terms (viewing & adding a new one)
- Account settings
- Account settings -> Announcements
  - Details for a single announcement
- Course settings -> Apps / External Apps

Change-Id: Ia016f2c7bbe08200ca9b6816cc0495ef22a68286
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243109
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-07-22 21:08:43 +00:00
Michael Brewer-Davis cd9eb4fab7 add outcome calculation method model
closes OUT-3759
flag=account_level_mastery_scales

Test plan:
- run migrations
- in the canvas ui or rails console, create subaccounts
- in the rails console, add outcome calculation
  methods to the root account and some of the subaccounts:
  > ap Account.all.pluck(:id, :name)
  > OutcomeCalculationMethod.create! context: Account.find(id),
      calculation_method: :latest, calculation_int: nil
- verify that calculation methods are found through
  `account.resolved_outcome_calculation_method`

Change-Id: Iba4b8db2e1c78b7f7c5964eec270ed75c4f94d66
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242745
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
2020-07-22 17:53:42 +00:00
Pat Renner 49b9636f7f add context_type/id to outcome proficiency
flag=none
refs OUT-3758

DO NOT MERGE (migration freeze)

test-plan:
- ensure you have at least one outcome proficiency
created for an account
- run migrations
- ensure that for your existing outcome proficiencies,
context_type and context_id are set
- create an outcome proficiency (using
outcome_proficiency_factory provides a nice template) and
ensure context_id, context_type is set on save

Change-Id: Iabd21ce00386959f12498f7fa0c1f5bd58d57127
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242140
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-07-22 15:09:08 +00:00
Pat Renner acfe899732 add locking of mastery scales/proficiency editing
closes OUT-3764
flag=account_level_mastery_scales

test-plan:
- As an account admin, go to an account's settings
- Enable the following:
  - "Restrict instructors from changing mastery scales"
  - "Restrict instructors from changing
     proficiency calculation method"
- Leave "locked" unchecked
- Visit a sub account's settings
- The above settings should be enabled and should be toggleable
- Go back and lock the account settings
- Ensure the sub account's settings cannot be changed

Change-Id: I652835f29afd6afc0fd105acd7407efc470b28e2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242927
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Jody Sailor
2020-07-22 14:52:34 +00:00
August Thornton d2f4dc98b5 update permission check on account users restore endpoint
current specs found in the file below cover our use case:
  spec/controllers/accounts_controller_spec.rb:131

fixes FOO-626
flag = none

Test plan
- Have a user set up
- Delete them using the "delete from this account"
  button on their user page
- Restore them with /api/v1/accounts/:account_id/users/
  :user_id/restore
  and ensure their pseudonym shows back up and things
  look mostly correct on their account page
- (Enrollments etc will not be restored right now,
  maybe in the future)
- Do this again, but delete the user from the console
  and ensure they come back (but their workflow state
  will be registered instead of whatever it was
  before deletion)
- Should return 404 if there are no account pseudonyms
  for the user
- Should return 400 if the user is not deleted

Change-Id: Ia9ea0cfc17bce330bfdbb090e6bc99a31863d37b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240998
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
2020-07-21 23:00:32 +00:00
Jacob Fugal fef9c5ddc9 fix nil NoMethodError in image_thumbnail
test-plan:
* GET /images/thumbnail/any-id/bad-uuid
* should get 302 redirected to a default image instead of a 500 error

Change-Id: I03a2fc0f0af4f92d63508bc637963ac5731fce9a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243136
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2020-07-21 22:14:51 +00:00
Augusto Callejas db4f923d19 Translate non-imported outcomes
fixes OUT-3804

flag=outcome_alignments_course_migration

test plan:
  - start up canvas, quiz_api and outcomes service
  - provision a root account (see g/235665)
  - enable "Outcome alignment to non-scoring content" FF
  - enable "Outcomes Service Alignment Migration"
  - create a course with a wiki page
  - in the root account, sync some global
    outcomes (see "Academic Benchmark Importing")
  - import some global outcomes into an account
  - import those same global outcomes into the course
  - create account outcomes
  - import those account outcomes into the course
  - create a second course under the same account
  - sync canvas data for the root account (see g/235665)
  - return to the first course
  - on wiki page show page, add the outcomes to the page
  - export a copy of the course
  - import the copy into the second course
  - confirm that the wiki page in the second course has
    the same aligned outcomes

Change-Id: Ic8cf66ca502fcec3f2b20ecc815118efe3a03499
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242667
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
2020-07-21 21:37:20 +00:00
Ed Schiebel a4694fe553 Add info messages for user if media takes a long time to upload
Once the bits have been uploaded, it can take a while for notorious
to transcode the video and make it available. After a while (time TBD)
show the user an alert telling them we're working on it. If we
eventually give up, tell the user that too. If we get an error, tell
the user that too.

closes LS-565
flag=rce_enhancements

test plan:
  - you have 2 choices:
    1. record a very long video so it takes notorious a very
       long time to process, or
    2. cheat
       i) add a video to the RCE
       ii) in devtools, open media_player_iframe_contents.js
       iii) set a conditional breakpoint at or before line 59 where
            the CanvasMediaPlayer is rendered. Something like:
    ENV.SHOW_MEDIA_SOURCE_BE_PATIENT_MSG_AFTER_ATTEMPTS=2, ENV.MAX_MEDIA_SOURCE_RETRY_ATTEMPTS=4, 0
            this will make the transitions happen much faster.

  - record a video in the RCE (if you went with #1, loooong, #2, 30sec will do)
  > expect to see a spinner
  > expect a SR to say "loading"
  > after a little while,, expect an info alert telling
    you your media has been uploaded but is still being processed, be patient.
  > expect a SR to say that too
  > after a while longer (#1 == an hour, #2 == ~15sec), expect an alert saying we're giving up"
  > expect the SR to say that too
  - save your page
  - If you wait long enough, the video will eventually appear, or go get
    some lunch, come back and refresh the page

  - go back to the RCE and record another video
  - save
  - while the spinner is spinning, but before you see the video, disconnect your network
  > expect a failure message in an error alert

  the point is, the media player tries for a long while. notorious will eventually
  finish its work and the video will be viewable.

Change-Id: Iacc8e5dc877ebecd330b60c8a42a6f717e5cfcea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242076
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-07-21 21:12:20 +00:00
Jackson Howe ca6097071a Remove link from header type module items
Context module subheader item types were rendered as links with invalid
hrefs. SR-users could click these and get taken to a broken link. This
commit stops the rendering of the links for header items.

Fixes LS-1217
flag = none

Test plan:
 - Open modules index
 - Create a module, add an item of type "Text Header"
 - Add other items of different types
 - Turn on VO, scroll through modules
 - Expect that header item is not read as link
 - Clicking on header item with VO should not be interactive

Change-Id: I10bb2dd4548ff8934bf209c6903054bcac37c0f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243008
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2020-07-21 19:52:16 +00:00
Pat Renner 70b271ec95 require read permission for outcome_proficiency#show
closes OUT-3763
flag=none

test-plan:
- Log in as a student
- Capture a network request via chrome console
(right click to copy -> copy as CURL)
  - an example would be the /tabs endpoint when clicking the
    account icon on the left nav
- Change the end of the URL to `/accounts/3/outcome_proficiency`
- Ensure the request returns unauthorized with a status of 401

Change-Id: Ie85b950c796f7de2acfee984ceaef06677199b96
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242804
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
2020-07-21 19:05:54 +00:00
Michael Brewer-Davis 2b4d8d9565 remove import_outcomes_permissions_fix FF
closes OUT-3828
flag=none

Test plan:
Verify that adding/removing import_outcomes permission
continues to toggle the "Import Outcomes" button in
the outcomes management ui

Change-Id: I3fdcf9085838cec50fb5effa886c33efd9458fcd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242748
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
2020-07-21 18:32:06 +00:00
Matthew Lemon 89b787b69e handle null notifications on notification policies
refs VICE-622
fixes VICE-633
flag=none

/ ---- ---- \
| Test Plan |
\ ---- ---- /

- specs pass

- In the rails console grab a user and create a notification policy with
  a null notification
  - u = User.find(<user_id>)
  - cc = u.communication_channels.first
  - policy = cc.notification_policies.create!(frequency: 'daily')
- Navigate to a courses notification preferences page that the user is
  enrolled in
- The page should load correctly

Change-Id: Id91b20c2e61926b37ce81e6fd23bf6879ca8b723
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243090
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-07-21 18:02:36 +00:00
Michael Brewer-Davis d19d6745f4 remove decouple rubrics FF
refs OUT-3828
flag=none

Test  plan:
verify that :manage_rubrics admin permission
still controls whether rubrics tab appears on
the  account navigation

Change-Id: I11e3c3cca7aa389a08b562edd1bee374e86221db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242746
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
2020-07-21 17:59:49 +00:00
Jeremy Stanley 5fb82817b4 don't overwrite assignment group settings on initial bp sync
test plan:
 - create assignment groups with group weights / drop rules in
   Course B, a blueprint course
 - add some assignments to the groups
 - create assignment groups with the same names but different
   properties in Course C, a new course
 - put some different assignments there
 - associate Course C with Course B and wait for the initial
   sync to run
 - Course C should keep its original assignment group weights
   and drop rules, and the assignments in both groups
   should be merged
 - repeat with a new course but _don't_ set any assignment group
   rules in the target course. it should inherit the blueprint
   course's assignment group rules

flag = none

fixes LS-1109

Change-Id: I0e290e2a85d83031d3c44437df5a6fe5d46c6b7d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242828
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-07-20 21:34:01 +00:00
Matthew Lemon d42bbfb155 Add np overrides reminder to preferences page
Adds a alert at the top of the notification preferences page for
accounts and courses to remind user of how notification overrides work.

fixes VICE-488
flag=notification_update_account_ui

/ ---- ---- \
| Test Plan |
\ ---- ---- /

- Enable the `notification_update_account_ui` ff on site admin
- Navigate to /profile/communication
- Note the alert at the top of the page and its content being specific
  to the current account notifications
- Navigate to a course notification preferences page
- Note the alert at the top of the page and its content being specific
  to the current course notifications page

Change-Id: I835c73d2d9db5679be2d1c8d59fd14914c8bb7f6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242192
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2020-07-20 20:39:01 +00:00
Cody Cutrer cbeff00bd2 reduce error surface area in access tokens
don't bother fetching a developer key just to see if an access token is manually
generated

Change-Id: Ied428ae753756b5f29961b8db340ddc1f8f5ab7c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242684
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-07-20 19:15:13 +00:00
August Thornton abab1d680a report user_role when submitting error form
We have a shared error form partial that we use for various
response codes that we handle in the Canvas app. Support wanted
to mimic our already existing behavior found in our Help Dialog.
This change includes the user's current roles in the POST
to generate an ErrorReport; if there is a current user session.
We give the opportunity to submit comments for things like 404
or 500 errors that the app handles and that's where this change
comes into play.

closes FOO-490
flag = none

test plan:
 * The easiest way to test this commit out is to trigger a handled
   500 error. I twiddled with some account settings code to make it
   happen.
 * You should get a spiffy image of a spacecraft and something along
   the lines of "Page Error", "Something broke unexpectedly"
 * There will be a "Click here to tell us what happened link"
 * Open up DevTools and head on over to the Network tab
 * Fill out the input and click the "Send Comments" button to submit
   the form
 * Inspect your network traffic and find the request to error_reports
 * Verify the Form Data includes the param "error[user_roles]"
   and it includes a comma seperated list of user roles
 * Find the associated ErrorReport for that submission /error_reports
 * Ensure it includes an optional data key for `user_roles:`
   below `type`, with the same comma seperated values that you
   inspected above

Change-Id: I5e014b599e481e27e9a66683d038e6270fa50b1d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242809
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2020-07-20 18:23:40 +00:00
Simon Williams 86580e3f5e include InstFS in allowed CSP files domains if enabled
closes FOO-160
flag = none

test plan:
- enable CSP and InstFS
- try to download an InstFS file from assignment submissions
- it should work

Change-Id: Ia967cc235363e9df9fb462ab78ff5bec67c68d42
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242839
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-07-20 17:58:12 +00:00
Drake Harper 079860ea4d Drop gender and birthdate columns from User
Test Plan:
-specs should pass

flag=none

fixes VICE-591

Change-Id: I20595e1f7aefe8e4c6237db60b3eac9139780fef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242087
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2020-07-20 17:49:46 +00:00
James Williams 0e96dbad90 stop course touch on enrollment creation
test plan:
* specs

closes #LS-1221

Change-Id: I9ec8d166730681ce648c30c5e8fb0d29d25ae343
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242819
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-07-20 17:22:16 +00:00
Jeffrey Johnson 698a8cecce Updating discussions styling to support 400% zoom fixes VICE-384
Test Plan
1. Open a discussion
2. Resize down to smallest width, should not scroll horizontally
3. Mobile testing within Chrome is also easy to validate

Notes:
1. RCE feature flags need to be enabled so that TinyMCE 5+ is used for our RCE
2. There is a bug with initializing the RCE in a small viewport making the width too wide. This will be reported to latte

Change-Id: I7292171bb3458c14631aa99e829f581fe5752143
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242823
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2020-07-20 16:56:54 +00:00
Matthew Lemon 01aa697cd7 allow special characters in external feeds
When creating an announcement external feed in the UI with the 'Only add
posts with a specific phrase in the title' option enabled, the # and &
characters would remove parts of the string. This was due to us trying
to add the parameters as url parameters in the post rather than just
passing them in to the axios.post method as parameters.

fixes VICE-548
flag=none

/ ---- ---- \
| Test Plan |
\ ---- ---- /

- From the announcements page of a course create an external feed
- Enable the 'Only add posts with a specific phrase in the title' option
  and use the # or & characters as part of the string (e.g. #howdy)
- Navigate to `/api/v1/courses/<course_id>/external_feeds`
- Note that the feed should contain the full header match including the
  special characters

Change-Id: I476d6afcf7dcbd61bfd57b31d539aec5f88a2d21
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242795
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2020-07-20 16:11:33 +00:00
James Williams b94fa0aba3 sync "complete all items" setting on modules
test plan:
* create a module in a blueprint course with
 "complete one requirement" set
* sync
* change the module to "complete all"
* re-sync
* the associated module should match

closes #LS-1220

Change-Id: I78152b6abdbf79c412cc5322f1e76074d6610f24
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242919
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2020-07-20 13:42:54 +00:00
Simon Williams 44ae3b479f limit user profile bio length to 65536 bytes
fixes FOO-656
flag=none

test plan:
- normal user bios should save/update as normal
- trying to create an extremely long bio should fail

Change-Id: I0222742e9c86de3cdfb35e43e1109f45f70342d4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242781
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2020-07-17 19:47:43 +00:00
Charley Kline 54b544c54f Don't send error object, just string, to mobile login page
Fixes FOO-572
flag=none

During the Covid Strikeforce effort, we altered the error message
sent back for a failed login so that the flash would persist for
more than the default few seconds. Unfortunately this did not take
into account the mobile login screen which was still expecting a
string to display, and thus was displaying the JSON instead. So
let's not render the more complex JSON if the user is using a
mobile browser.

Test plan:
* Try to reproduce mobile login error message problem as specified
  in the ticket
* Mobile login error should be plain text with a URL, not a JSON

Change-Id: I1426d6f63dcc17c487b7f5133928786fbe4daa52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242750
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-07-17 15:09:03 +00:00
Adrian Packel e7775d432d Set submission stream item hidden based on posted
When we generate stream items for submissions, show or hide the
student's instance of the stream item based on whether their submission
is posted/hidden, instead of checking the now-defunct value of muted on
the assignment. This ensures that objects associated with the stream
item (such as submission comments) are shown appropriately.

flag=none
fixes EVAL-287

Test plan:
- Have a course with a student
- Set up an automatically-posted assignment (A1) and a manually-posted
  assignment (A2)
- As a teacher, leave a comment for the student on each assignment
- As the student, log in, go to your inbox, and select "Submission
  Comments" from the dropdown at the top
  - The list of items should show the comment for your submission on A1,
    but not on A2
- As the teacher, post grades for A2
- As the student, re-open your Inbox
  - The comment from A2 should now be visible

Change-Id: I3c1cb72ebba3c858cc55e6fc5805d66c1b5230a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242724
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-07-16 20:08:20 +00:00
Alex Anderson 9c0586c472 Add label to Pages RCE
The RCE depends on a textarea element on the Wiki edit page to
contain the raw HTML output of the RCE.

That textarea didn't have a label on it, so it failed A11y tests.
This adds the label, but keeps it hidden except when the raw HTML
textarea is shown. Then it shows the label to screen readers.

This also updates the RCE wrapper to handle hiding and showing
the textarea's label along with the textarea.

Test Plan:
Navigate to a page with the RCE Enhancements flag on
Verify that the label doesn't appear to screen readers when the RCE
is showing
Show the HTML editor
The screenreader should announce "Raw HTML Editor" immediately
because the textarea receives focus when you show it.

flag = rce_enhancements

Fixes LS-1155

Change-Id: Id1b9cbe169e095f02e665318e3637657fb0cb098
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242639
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Alex Anderson <raanderson@instructure.com>
2020-07-16 17:57:52 +00:00
Jacob Burroughs 98fcf011f2 Revert "Fix root_account_id for assignment_override"
This reverts commit 39251781d4.

Reason for revert: assignment root_account_id is already backfilled since 2019, so it won't be nil.  Real issue was not warmfixing a hotfix

Change-Id: I94a49e2179b65ed63846b35d2e3709d089c6c547
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242512
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2020-07-16 17:01:30 +00:00
Spencer Olson 73b4fe2c88 remove eportfolio moderation release flag
closes EVAL-646
flag=none

Test Plan:
- Specs pass

Change-Id: I9fde9ff4e3a331f0767fb0ae020651ee6b70f476
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242704
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-07-16 16:28:48 +00:00
Jacob Burroughs 39251781d4 Fix root_account_id for assignment_override
Makes assignment override root_account_id work even if the assignment doesn't have it yet

fixes DEMO-15

Change-Id: I8a37a74251aedac28dcb11db1bda82d1420ccc87
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242771
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-07-16 15:58:20 +00:00
Pat Renner 321238cfb3 move proficiency tab to account outcomes page
closes OUT-3757
closes OUT-3756
flag=account_level_mastery_scales

test-plan:
- Open up account level rubrics page and ensure you can
see the rubrics tab and learning mastery tab
- Open up the account level outcomes tab and
ensure you only see the outcomes picker ui
- Enable the account_level_mastery_scales FF
- Ensure the account level outcomes page now has two tabs,
one for outcomes and one for mastery scales
- Ensure course outcomes/rubrics ui did not change
- Ensure opening account level rubrics only brings up the rubrics ui

Change-Id: I46e4e01f07e77b61eb7ea63a2baae8f1b4d869be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242081
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Adam Lenning <adam.lenning@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
2020-07-15 20:37:48 +00:00
Augusto Callejas 01904ad9ed Disable delete button after enabling a front page
fixes OUT-3824

flag=bulk_delete_pages

test plan:
  - enable bulk delete feature flag
  - in a course, create multiple canvas pages
  - on the pages index, enable the checkbox on
    one page
  - confirm that the delete button is enabled
  - make that page a front page
  - confirm that the delete button is disabled

Change-Id: I103e0bc9b97a4d39ed73e8fca344352ea92fe19e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242701
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Jody Sailor
2020-07-15 20:34:46 +00:00
Evan Battaglia 34738480a3 Revert "set root_account on communication_channels"
This reverts commit 2d5c43101c.

Reason for revert: we need multiple root_account_ids instead

flag=none
refs INTEROP-6003

Change-Id: I0708d48c013afd5bbee720d7bb37aad91b17e560
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242502
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
2020-07-15 19:20:24 +00:00
Jeremy Stanley e877f56930 fix now-line placement in weekly calendar
test plan:
 - the yellow "now" line should be positioned according to the
   current time in the weekly calendar, and not
   (a) shifted down a lot with a really big browser window, or
   (b) shifted up a bit when the current time is close to the
       end of the hour

fixes LS-1177

Change-Id: I38b95b069f55bee5c384231f02de4ae2271eca77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242570
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-07-15 13:36:20 +00:00
James Williams 46f2855db3 stop syncing quiz only_visible_to_overrides by default
should behave similarly to assignment importer,
only setting it when an mastery paths override is copied

test plan:
* create a quiz and sync it
* edit the copied quiz and give it a due date for everybody
* edit the original quiz and set it so it's no longer
 available for eveybody but just one section
* syncing the quiz should not erase the assigned
 due date on the copy

closes #LS-1203

Change-Id: I9e59b12ffe866b93bcb06d97cfa418babaec7d9d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242478
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-07-14 20:39:56 +00:00
Gary Mei 5a8af37e8b fix comment text not appearing
closes EVAL-979
flag=none

Test Plan

The Easy Way
- Write a text (no media) comment from SpeedGrader.
- In a console, update the comment to have a media comment id.
  `the_comment.update!(media_comment_id: 1)`
- Verify that in the Submission Details page, the comment includes
  the text comment, a blurb about being a media comment, and a
  placeholder for where the media thumbnail would have been.

The Hard Way
- Enable Kaltura/Notorious.
- Create a comment from SpeedGrader that includes a video upload and a
  text comment.
- Verify the same from The Easy Way.

Change-Id: I0be07b63860e8108d52bec8b5d2a751e62e98b01
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241991
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
2020-07-14 19:46:19 +00:00
Ahmad Amireh cff62fd8ea allow site admins to disable GA & FullStory
fixes FOO-692
flag  = none

note that we don't support controlling these settings through the API
since it's not part of the requirements

\ test plan \
 \ --------- \

- as a site admin, verify you can toggle Google Analytics and FullStory
  for a root account other than the siteadmin account (details below)
- as an account admin, verify you do NOT see the privacy controls

=======================================================================

If you want to fully QA this, I'll walk you through enabling the two
offenders first and then checking that they're running.

== Google Analytics

To enable GA, configure the `google_analytics_key` in the console and
restart your Rails server:

    Setting.set('google_analytics_key', 'asdfasdf')

To confirm that GA is disabled, its snippet should not be included in
the DOM. You can use this query to get at that element:

    [].filter.call(
      document.head.querySelectorAll('script'),
      x => x.innerHTML.match(/window\.ga/)
    )

== FullStory

To enable FS in the first place, you must first enable the feature flag
"enable_fullstory" at the site_admin level and then configure your
dynamic_settings.yml as shown in g/230591. Be sure to restart Rails.

To confirm that FS is disabled, its snippet should not be included in
the DOM. You can use this query to get at that element:

    [].filter.call(
      document.head.querySelectorAll('script'),
      x => x.innerHTML.match(/FS\.identify/)
    )

Change-Id: Ib7493f6dc342f4d96cb0c6fa944b7e56e8a45d29
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242531
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2020-07-14 19:45:11 +00:00
August Thornton 75f7970346 make quiz IP address filter removing/adding more accessible
refs FOO-564
flag = none

test plan:
 * navigate to root account settings page
 * find the "Quiz IP Address Filters" section
 * using keyboard nav + clicks, please ensure the following:
   * hover over still displays
   * you're still able to remove a filter item like before
   * adding a filter is now a button, should function the same
     as it did before
 * turn on VO and ensure "Remove Quiz IP Filter" and
   "Add Quiz IP Filter" labels are read off for the new add
   and remove filter buttons

Change-Id: If135c220e4dbe62d0ddac8ec943629585ed8a137
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242302
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-07-14 18:19:22 +00:00
Spencer Olson 4a51c289f5 set root_account_id on grading_periods
When a grading period is created or updated, its root_account_id will
now be set if it is nil.

closes EVAL-703
flag=none

Test Plan:
1. Create a grading period. In a rails console, verify the grading
   period's root_account_id is present and is equal to the ID of the
   owning Root Account.

2. Switch to the `master` git branch locally so that this code is not
   present. Then, create a grading period. Verify in a rails console
   that the grading period's root_account_id is nil. Then, switch back
   to this branch of code. Update any value on the grading period, such
   as its title. Then, verify in a rails console that the grading
   period's root_account_id is present and is equal to the ID of the
   owning Root Account.

Change-Id: I42dfc0be3b7a5e6688d845953fa9535ea3e060fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242386
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
2020-07-14 18:12:06 +00:00
August Thornton c91c8555a2 fix eportfolio moderation overflow for responsive view
This change adds the ability to break within a word to prevent
overflow for long author column names

fixes FOO-273
flag = none

Test plan:
- re-compile your css after pulling this down i.e. `rails css:compile`
- Enable the "ePortfolio Moderation" root account release flag
- Create a batch of ePortfolios
  - The created ePortfolios don't actually need to have any content
  - In the console, set their spam_status values to one of the
    following:
    - flagged_as_possible_spam
    - marked_as_spam
    - marked_as_safe

- As an admin, log in to Canvas and open the Admin view for your account
- With the feature flag on, the left-hand links should include an
  "ePortfolio Moderation" link
- Clicking the link should bring you to a table showing all the
  ePortfolios
- Edit one of the Author names to a really long word i.e.
  a long email address or similar
- Toggle device toolbar and use the Responsive view with 320px width
- verify the long name not only word breaks, but breaks in the middle
  if it gets unruly
- everything should behave as it did before, but this time responsive
  view is happy at 320 px width

Change-Id: I9e94ee263e2614ace49347ec46c2b604f27a1edc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2020-07-14 17:53:07 +00:00
Matthew Lemon a2619c650d update account np UI to match course np
This commit adds in the graphql query and mutation needed to view and
update the current accounts notification preferences as well as hooking
that data up to the new notification preferences components created
previously.

fixes VICE-588
fixes VICE-589
flag=notification_update_account_ui

/ ---- ---- \
| Test Plan |
\ ---- ---- /

- Enable the `notification_update_account_ui` ff on site admin
- Navigate to /profile/communication
- You should now see the updated Notification Preferences UI
- Make some updates to your preferences and refresh the page
- Those updates you made should still be represented on the page

NOTE
- You can update these preferences but they won't be respected yet. Work
  still needs to be done to respect account notification preference
  overrides.

Change-Id: I39a360940ae51fd8da701a153e502e7a00bf5dd4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241730
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
2020-07-14 17:29:34 +00:00