Commit Graph

41100 Commits

Author SHA1 Message Date
Cody Cutrer de5707686d cache feature_flag_account_ids in MultiCache for root accounts
Change-Id: I70792d730178f948efd3031c4dad82120a88a7c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246119
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-08-27 15:37:01 +00:00
Cody Cutrer d805bba4d3 target the correct partition(s) for messages queries with ranges
test plan:
 * current specs exercise both queries

Change-Id: I61d9f3bb6e6758fcc895332ccd9687a13b40b894
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245975
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-08-27 15:34:16 +00:00
Robin Kuss 428c279bee add selenium test for error CR error UI
flag = conditional_release
Closes LS-1310

Test Plan: passes jenkins

Change-Id: I931210a72db755a2e59f65dc554ae867c7ee1a1a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246112
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: Robin Kuss <rkuss@instructure.com>
2020-08-27 15:22:59 +00:00
Ed Schiebel 1beb3b7d9b Fix pagination in the media_object api
In the call to API.paginate we were always passing in the
user media url, so it was generating the wrong Links header
for subsequent pages.

closes LS-1397
flag=none

test plan:
  - test the canvas api
    - GET /api/v1/media_objects?per_page=n
    > expect the first n user media objects back
    - GET /api/v1/media_objects?per_page=n&page=2
    > expect the next n user media objects
    - repeat for /api/vi/courses/:course_id/media_objects

 - test the RCS
   - you can either have > 50 course and user media object in your
     canvas database, or change
     const DEFAULT_CANVAS_PER_PAGE_ARG = 50;
     to a small number in canvas-rce-api/app/api/wrapCanvas.js
   - go for Course Media
   > expect the first n listed in the tray
   > expect a Load More button
   - click Load More
   > expect the next n
   - repeat until you got them all
   > expect no Load More button

   - repeat for User Media

Change-Id: I85ba8406de5a0fa6ae4a91dcf873bf6674c01b80
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246124
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-08-27 14:48:37 +00:00
Aaron Ogata e14dd469a7 harden local_storage cross-test pollution prevention
refs DE-226

move_to will move to the center of the body, which may not always be visible. This would previously prevent the local storage from being cleared after a test has run. Fix this by always moving to (0, 0) instead, and harden the clear_local_storage call against future errors that might occur in the other clean-up steps.

Test Plan
docker-compose run --rm web bundle exec rspec './spec/selenium/assignments/assignments_spec.rb[1:1:5,1:1:10]' --seed 12782 --format documentation

Change-Id: Ia78c1e8867b32ca6b8303abd01467e14d39daf6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246106
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-08-27 14:17:43 +00:00
Simon Williams e829bae0b9 fix user merge cross shard favorite de-duping
closes FOO-899
flag=none

test plan: (specs should cover)
- have two users on two different shards
- have both users "favorite" the same course on one of the shards
- merge them
- it should work

Change-Id: I444b89467dd12933f480a9fface3497914220c9b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-08-27 13:23:20 +00:00
Jenkins c8eeb70fa1 update fa translation
Change-Id: Idad70e011bd580126c9892997b4e25be8ed0c67c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246161
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-08-27 05:56:01 +00:00
Jeremy Stanley b5fd51e3f8 make edit calendar event page responsive
and fix style inconsistencies and get rid of layout tables

test plan:
 - the "More Options" page when creating or editing
   a calendar event should:
  * scale gracefully down to 320px in width
    (test with Chrome devtools device toolbox)
  * not look like crap
  * still work (smoke test stuff, because some of the code
    depended on the table markup specifically)
  * be sure to test:
   + course events with per-section dates (PLEASE NOTE that the
     dates no longer move to the bottom of the dialog when that
     box is checked, because this didn't make sense to me)
   + event duplication (the implementation of this is kind
     of hokey so before deciding it's broken, see how it works
     in production right now)
   + enable the site admin feature to create conferences on the
     calendar page and ensure that still works too

fixes LS-1125

Change-Id: If5e298ecdd4fdf2c20531780192ff6a3aa67ead4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245022
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
2020-08-26 22:24:36 +00:00
Jared Crystal cc226760b8 prevent updating quiz scores for unassigned students
fixes QO-660
flag = none

test plan:
 - create a quiz and take it as 2 students
 - edit the quiz to be assigned to only one of the students
 - go to "Moderate this quiz"
 - attempt to "Update Scores" for both students
 - you should be able to for the student still assigned
 - you should not be able to for the unassigned student

Change-Id: I846b1473a21b2f6da5642834e5c45a157f132e66
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245929
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Matthew Goodwin <mattg@instructure.com>
2020-08-26 21:50:05 +00:00
Pat Renner 8d5dea8e21 fix bulk delete when sorting
closes OUT-3844
flag=bulk_delete_pages

Test-plan:
- Ensure bulk delete FF is enabled
- Within a course, create many pages:
    > c = Course.find() # course to find
    - import wiki_page_factory code
    > 50.times do wiki_page_model({course: c}) end
- Open the course's page tab
- ensure checking a box for deletion and sorting the page
maintains the checkbox and allows you to delete the
previously selected page
- ensure the behavior works as expected in these scenarios:
  - clicking a single page for deletion then
deleting it via the dropdown
  - marking a page as a front page should remove the checkbox
(and disable the bulk delete button)

Change-Id: I7c3830e33efc3c43d1131b1f4e6da5a5f9f0e28f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245602
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Jody Sailor
2020-08-26 21:08:35 +00:00
Alex Anderson e44649eaf2 Add the course code to the direct share search
This makes it easier to tell which course is which
and recognize when a course has been added to
the list because the search text matches the
course code.

Test Plan:
Make sure you have the Direct Share flag on
Create a page or something
Click the kebab on the page listing
Choose "Copy To..."
Click the 'Select a Course' dropdown. Some
options should appear. Underneath the course
name, the course code should be listed in smaller
text.

Fixes LS-1272

flag=direct_share

Change-Id: I2792046cae4f33fb9cbab27fcee45df4b002189f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245721
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-08-26 20:55:46 +00:00
Nick Pitrak f1173a5b58 fix overflow on 320px for individual gradebook
fixes EVAL-538
flag = none

test plan:
- have a course with one student and one assignment
- go to the individual gradebook
- select the student and assignment
- set the screen size to 320px
- ensure the screen does not zoom out and elements don't overflow
- ensure the table in the student information section scrolls
    horizontally (or doesn't need to)
- ensure the table in the assignment information section scrolls
    horizontally (or doesn't need to)
- check these things for 767px, 768px, and 1200px

Change-Id: Iaef94ebbea8cef462f64417b68ddf3858a4c9360
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244972
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
2020-08-26 20:47:17 +00:00
Cody Cutrer 1c7dea984c don't load the full Gemfile for consul HACache events
Change-Id: Ie0ca4922a5a1cf90975aa5f1c670d1c761e244d4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246087
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2020-08-26 19:48:24 +00:00
Jackson Howe dc7fb86e17 Fix issue where rce strips fonts
The fallback font sans-serif was included in the rce config with a
space, i.e. 'sans- serif', which caused issues with the Architect's
Daughter and Balsamiq Sans fonts. If these fonts were used in the
rce, the styling was stipped from the element on save.

Fixes LS-1383
flag = rce_enhancements

Test plan:
 - In RCE, write some text and change font to Architect's Daughter
 - Save the page
 - Font should appear correctly in rendered text
 - Repeat for Balsamiq Sans

Change-Id: Id39415c5744247cb4153c549f941c7fefe4c3aa7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245990
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: Jackson Howe <jackson.howe@instructure.com>
2020-08-26 19:36:01 +00:00
Adrian Packel abe50c3b3c Add grading_period_id to Cassandra
flag=none
closes EVAL-1128

Test plan:
- Migrations on Cassandra run successfully
- Grade changes save the grading_period_id of the associated submission
  in both Cassandra and AR

Change-Id: I7ae0ff54093b9bf1eaea43106d4788f22c6c920e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245734
Reviewed-by: Ethan Vizitei <evizitei@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: Jody Sailor
2020-08-26 19:21:32 +00:00
Aaron Ogata 96f11d4d57 skip more flakey specs
refs LS-1394

Change-Id: Id2cd16541d9d452bbe876313302865278b6e9536
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246096
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Tested-by: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2020-08-26 18:18:10 +00:00
Jacob Burroughs 2fb72b72c9 Make canvas_rails_switcher use stale for consul reads
Change-Id: Ifbfcfc1cfa6f624460a9e9b9f75a0bb34fc80b9e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246065
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-08-26 17:24:53 +00:00
Rob Orton 196949740b stop generating messages in report specs
Change-Id: Ib880a3bd3f80d8e0ac60051e05be5834b6c6254c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245988
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-08-26 17:16:34 +00:00
Charley Kline 64971ea1f6 Fix explosion when updating a role (and false positive test)
Fixes FOO-896
flag=granular_permissions_wiki_pages

There was a bug involving updating roles in which the updated
role did not get the group roles added to it. This caused an
explosion in the UI when the expected group role no longer
existed in the newly-updated role. This was made worse because
the selenium test for the permissions page did not enable the
feature flag and so was blind to this error.

This fixes the bug and also makes the selenium test with the FF
on (it's soon to be removed anyway) sensitive to this case.

Test plan:
* Have a custom role
* Go into the permissions page and edit the role by updating
  its name
* That should work and not explode once the name change happens

Change-Id: Ic601772a9decf2cb1431afd90923b0ad66f72ffb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246077
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-08-26 16:48:40 +00:00
Ben Nelson f165153249 add ability to auto create groups by member count
This adds the ability for course groups to be auto created based on
number of members. If the total number of users don't divide cleanly
into the given group size, the users will be distributed evenly across
all groups.

Test Plan:
 In a course with multiple students
 - Navigate to the People page
 - Click '+ Group Set'
 - Enter a group set name
 - Select the radio option for 'Split students into groups with __
     students per group'
 - Enter a number
 - Save
 - Verify that the groups are automatically created and students are
     assigned
 - Some example expected inputs and outputs:
 -- 15 students, groups of 5 -> 3 groups of 5 students
 -- 11 students, groups of 3 -> 3 groups of 3, 1 group of 2
 -- 11 students, groups of 5 -> 2 groups of 4, 1 group of 3

closes VICE-696
closes VICE-697

Change-Id: I56af7c2ca9f06a0eb5829d63c39f672251126375
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245447
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ben Nelson <bnelson@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2020-08-26 16:44:34 +00:00
Michael Ziwisky 14682d6b1b tweaks to dynamodb docker-compose setup
- gets rid of container_name, as this explicit name breaks from the
   pattern used in the rest of the codebase.
 - gets rid of env vars for AWS creds as they're unnecessary, and could
   potentially interfere with other aws libs besides dynammodb.
 - removes `links` as its deprecated and redundant with `depends_on`
 - adds "VIRTUAL_{HOST,PORT}" for dinghy

also fixes a typo in an old data fixup

Change-Id: Ie5953d1ee89d9e40779fe8f3e6c56731f77684d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246061
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-08-26 16:39:21 +00:00
Aaron Ogata 6615c4cd7e skip flakey spec
refs LS-1394

Change-Id: Iacb08ad926a583c78472efb9f0127f1b10249b3f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246074
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-08-26 16:34:36 +00:00
Rob Orton 3cbd2d31b4 use method to find pairing code
test plan
 - specs should pass

refs FOO-894
flag=none

Change-Id: I3b8b94d52a87977502c82d0235ff8644840eca68
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245938
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Nelson <bnelson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2020-08-26 16:31:55 +00:00
Rob Orton 4e6aa43759 use correct id for merging observation links
when merging a user if done from the source shard the target user.id is
global, but from target shard is is local and the update call will fail
and update the record to a local id. This could potentially be a user
that should not be associated to that record

test plan
 - specs should pass
 - merge users with observation links from target shard

fixes VICE-734
flag=none

Change-Id: Iad6007bfb4bc596f21a69a59555d5622f08d4721
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245751
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Nelson <bnelson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2020-08-26 16:31:39 +00:00
Ahmad Amireh 9bb6ac03dd add phrases for the catalan (CA) locale
refs FOO-519
flag = none

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

none, the actual support for the language will come in a different patch

Change-Id: Icb3383d83447f13fd579bc5011f38fafa5513e7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245531
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-08-26 13:13:46 +00:00
Jenkins ecee13ee49 [i18n] Update package translations
Change-Id: Iaf5185fa6dc484358f05bbc31c7fe151bc366417
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246058
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-08-26 04:55:16 +00:00
Rob Orton 238bd5992c pass enrollment_info for better errors
right now it fails cause MRA is not creating proper errors for bulk
insert. This allows the errors to stay consistent and still function
for finding the root_account

test plan
 - run import with invalid root_account_id
 - it should not fail import but should have a valid error
 - it should skip line

fixes VICE-686
flag=none

Change-Id: I5b17507045dfe23666f6dd29f347d61b102bc5e0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244313
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
2020-08-26 00:03:12 +00:00
Augusto Callejas dcf2e37129 Query node support for proficiencies/calc. methods
refs OUT-3836

flag=account_level_mastery_scales

Add top-level query node support for outcome proficiencies
and outcome calculation methods. See "Node interface" in
"app/graphql/types/HOWTO Add Types.md" for more details.

test plan:
  - create outcome proficiency and outcome calculation method
    on an account
  - query proficiency to get relay-style id:
    query MyQuery {
      outcomeProficiency(id: "<id>") {
        id
      }
    }
  - query via node and confirm the legacy id comes back:
    query MyQuery {
      node(id: "<relay-style-id>") {
        ... on OutcomeProficiency {
          _id
        }
      }
    }
  - query calculation method to get relay-style id:
    query MyQuery {
      outcomeCalculationMethod(id: "<id>") {
        id
      }
    }
  - query via node and confirm the legacy id comes back:
    query MyQuery {
      node(id: "<relay-style-id>") {
        ... on OutcomeCalculationMethod {
          _id
        }
      }
    }

Change-Id: Ibf8ebf4e2e7001481ff6450158e02b43747ba5c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245156
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Evan Francis <efrancis@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
2020-08-25 23:59:18 +00:00
Ed Schiebel d3cd1d7fc1 Fix fullscreen videos in safari
While fixing this I stumbled on the fact that fullscreen in the
video upload modal wasn't sizing the player correctly, so that's
fixed too.

closes LS-1348
flag=rce_enhncements

test plan:
  - in safari, open any page with a video added via the new rce
  > expect the fullscreen button to be available
  - click it
  > expect the video to go fullscreen and resize to fill the screen
    (if the video is portrait, or short-and-squat, expect it to be
    letterboxed)
  - click the exit fullscreen button or click esc
  > expect it to return to its original size

  - in any browser, including safari:
  - open an edit page with the RCE
  - open Upload/Record Media dialog
  - select a video
  - click the fullscreen button in the preview
  > expect it to size the player to fill the screen (letterboxed
    if necessary)
  - click exit fullscreen (or click esc)
  > expect to return to its original size

Change-Id: I3a4080f06cb132902bde98d2dfd86170a2a394cb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245846
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-08-25 21:59:14 +00:00
Ed Schiebel 5374ad43ef Don't delete links containing just images and no text
LS-1146 added code to delete empty links from the RCE. Unfortunately, it
didn't take into account links with no text content, like a linked
image. This fixes that.

closes LS-1350
flag=rce_enhancements

test plan:
  - Create a Page - upload and embed an image on the page
  - Using the hyperlink tool, link the image to either an
    external link or a course link
  - click the image and click 'link options'
  - Change the target url (or don't)
  - Click Done
  > expect the link to be updated and not deleted.

  - create another link with just text
  - delete the text
  > expect the link to be deleted from the DOM in this case

Change-Id: I8c95364a48fba95abdc2525ede600c5a11e278f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245980
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-08-25 21:58:55 +00:00
Davis Hyer 062555c451 filter profane slugs
fixes VICE-739
flag=none

See https://instructure.slack.com/archives/CGC0YJJDS/p1598370828002100
for context. tl;dr random strings can sometimes result
in vulgarity. This commit has us pick a new random
string if the previous was deemed vulgar

test plan:
  - :noideadog:

qa risk: low

Change-Id: Iddd4d0c944c44f85af9cf32352611acafd44f734
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246010
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
QA-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
2020-08-25 21:09:54 +00:00
Gary Mei 3c8363b6ff fix spacing of flyout button in gradebook
When a column is too small, contents in a cell can be hidden from the
user's eye. This helps in the scenarios where an assignment's grades
are displayed as percentages by removing an empty html element.

fixes EVAL-677
flag=none

Test Plan
- Create an assignment that displays as percentage.
- On master, note how small a column can be before the flyout button for
the Submission Tray is starting to become hidden out of view.
- With this commit, verify that at the same size, the flyout button is
more visible.

Change-Id: I74e600a9ae7019778b0b0bc8037cddff62601d64
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245600
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
2020-08-25 18:01:28 +00:00
Charley Kline 0ea99751b3 Don't return stale data after updating permissions
Fixes FOO-661
Refs FOO-873
flag=none

When updating a permission via the API, even though the change
is properly persisted, the stale (pre-update) value may get
returned in the API response. This is because although the
RoleOverride model clears the caches after a save, the update
of the Redis caches may happen asynchronously and thus may not
be complete by the time the response is built.

The fix is to add a new argument to RoleOverride.permissions_for
which causes it to bypass all the caches and always hit the AR
model itself. Then the role_json method in lib/api/v1 can use
that to force permissions_for to skip any cached entries.

Fixing this plus adding the spinners to the permissions buttons
should make the whole workflow of editing permissions settings
way more clear to the user.

Test plan:
* Play around with the permissions settings page
* Your changes should always be reflected properly after the
  API call completes, and should stay that way

Change-Id: I5b0fc1a242f886a4b2d2940e61d2e6d65c1d43d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245905
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-08-25 17:57:51 +00:00
August Thornton d7b20b04bb start focus point on close X for registration signup dialog
this fix should cover all of our student, parent, teacher
signup dialog forms.

fixes FOO-33
flag = none

test plan:
 - using chrome dev tools and responsive view
 - navigate to /register_from_website
 - click through each dialog form
 - verify focus point is set on the first visible
   navigable item (in this case it's the Close X button)

Change-Id: If04bde10558381c07f6265eab6454ada1649f57e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245699
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2020-08-25 16:53:10 +00:00
James Williams b3b5dbd5ab include pending enrollments in current_and_future API scope
test plan:
* have a course set to begin in the future with
 users restricted to participate between course dates
* enroll an observer in the future course
* /api/v1/users/self/enrollments?state[]=current_and_future
 should return the future enrollment

closes #LS-1384

Change-Id: I261f78b4f49efbf406aeb450b55c29b1825b3a99
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245911
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: James Williams <jamesw@instructure.com>
2020-08-25 16:15:14 +00:00
Aaron Ogata 0a1f6164ca skip another flakey spec
refs LS-1297

Change-Id: I06bbaf2f4d7cd3eee241cb04d57547f42ca167fe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245977
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-08-25 15:41:03 +00:00
Matthew Lemon 9ebbb931ac fix create new student from course enrollment
When creating a new student from the course enrollment view clicking the
"Click to add a name" link would fail.

fixes VICE-736
flag=none

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

- create a course
- navigate to /courses/<id>/users
- click to add people
- enter a bogus email address, login id, or SIS id and click next
- click the "Click to add a name" link
- It should work

Change-Id: Ib3549943510bf206e525589d6961cfbe8fbc7c7e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245914
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2020-08-25 15:20:49 +00:00
Ethan Vizitei 42f635be1d allow passing consistency through batch ops
Change-Id: Ib87a7caf7285f1884ac461cbed348d31c8ecb811
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245939
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-08-25 14:55:34 +00:00
Ahmad Amireh 1416ce1abe target partition table for message delivery
fixes FOO-891
flag  = none

0o test plan o.O

- send a message to a user and verify it works
- look at the job runner output and verify the UPDATE queries are
  targeting "messages_2020_35" etc and not "messages"
- you can try this in the console using Message.last.{recycle,deliver}

Change-Id: I5e4ffaf1680ccc40fef9c4c2f19683d29a5e21c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245877
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2020-08-25 13:09:56 +00:00
Alex Anderson f947195966 Make Link sidebar tray remember selected category
When opening and closing the 'Canvas Links' sidebar tray,
the tray forgets which category is open. This can be
annoying for teachers that want to add a bunch of stuff all
at once, so we persist the open category index to Session
storage.

Test Plan:
Open an RCE editor in a course context.
Make sure the RCS is running
Click the link dropdown and choose 'Course Links'. The tray
should slide out.
Open up one of the categories, like "Quizzes"
Close the tray
Reopen it the same way
The "Quizzes" category should still be open.

flag=rce_enhancements

Fixes LS-1236

Change-Id: Ie8a7c8754ab7096f07617a65af1d9f38ddf89ae2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245533
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-08-25 10:18:35 +00:00
Jenkins 77af57e981 update tr translation
Change-Id: I487c9db2633ad68efe76fa4b237bc1ac359a8644
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245954
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-08-25 06:00:47 +00:00
Jenkins 940327cb84 update fa translation
Change-Id: I600c9851a9076cc2a1b12228e4e023b143374c83
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245953
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-08-25 05:58:52 +00:00
Jenkins 7282e913f4 [i18n] Update package translations
Change-Id: Id7182642fea1cfc1c5e24e573128097ba5fad64f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245951
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-08-25 04:54:39 +00:00
Erin Hallmark d326b6f79a Update tooltip for course menu favorite
Users who cannot yet favorite a course get a message saying it
cannot be favorited at this time, but they don't know what that
means. This commit clarifies the tooltip that only active courses
can be added as a favorite.

CLOSES: LS-1373
flag=none

Test plan:
- Tooltip copy is updated
- Jenkins passes

Change-Id: I6d680593e6a5548b09b6261f9e744b9460f2011f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245662
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Erin Hallmark <erin@instructure.com>
2020-08-24 22:15:52 +00:00
Jackson Howe 3d7a41e165 Make beta & masquerading banners responsive
Converts the pink banner that appears in beta/test to use flexbox,
making it responsive down to 320px.

Also sets the width for beta banner and masquerading banner to
100vw, so on pages that overflow horizontally, the banner will stay
in the initial view and match the width of the mobile header.
Ideally, pages will be fixed so they don't overflow horizontally at
all.

Fixes LS-542
flag=none

Test plan:
 - Simulate a test cluster on local
 - Go to Canvas, pink banner should appear
 - Expect banner to look nice on small devices and on desktop
 - Expect banner links and close button to still work
 - Go to a page with horizontal overflow, like /courses/:id/users
 - Expect banner to be fully visible within initial view width
 - Repeat for masquerading banner

Change-Id: Ic383a724ec43885596a1da61ecbfc4ebfcb1637f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245296
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: Jackson Howe <jackson.howe@instructure.com>
2020-08-24 21:29:01 +00:00
Erin Hallmark 32f13a6d4f Update availability date warning message
CLOSES: QO-663
flag=none

Test plan:
- Jenkins passes

Change-Id: Iefc653c428161f674aae311eb3b76ef642e98555
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245660
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
QA-Review: Erin Hallmark <erin@instructure.com>
Product-Review: Erin Hallmark <erin@instructure.com>
2020-08-24 21:24:32 +00:00
Ethan Vizitei d732b7a180 don't reserve capacity for whitelisted requests
Change-Id: Ic0fabd4f0799afeb3337e439a93c3d31cb0873a4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245882
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-08-24 19:07:55 +00:00
Cody Cutrer fc31f434d3 bump switchman
Change-Id: I255311630cfdbd2752bc1a0b44d464054cacfe2c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245889
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-08-24 19:02:09 +00:00
Cody Cutrer fc1ba344be remove unnecessary join in account notifications
Change-Id: Icd7606fb1813855de1b4f646ec711463491ba0db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245868
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-08-24 18:29:46 +00:00
Cody Cutrer 12afbe6447 always return the domain root account from cache no matter how it's queried
Change-Id: I79e7e318b379b99cff62c150b005e2f067bc2a9a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245859
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-08-24 17:37:47 +00:00