Commit Graph

48154 Commits

Author SHA1 Message Date
Cody Cutrer eb258d1a9b RuboCop: Performance/Casecmp
manual

Change-Id: Iea0317442d4068cc9f75f325dcedb7922f8bf95e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278330
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>
2021-11-16 16:45:36 +00:00
Cody Cutrer 91e62f3c07 RuboCop: Performance/InefficientHashSearch
[skip-stages=Flakey]

auto-corrected

Change-Id: I6f0bcce771de76cc0b653507653681597c292a36
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278329
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>
2021-11-16 16:45:20 +00:00
Cody Cutrer 2535dd357e RuboCop: Performance/Detect
[skip-stages=Flakey]

auto-corrected

Change-Id: I18f41c583752708c7331fa12da28f309a807c105
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278327
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-11-16 16:36:55 +00:00
Cody Cutrer fee4c4af37 RuboCop: Performance/Count
[skip-stages=Flakey]

auto-corrected for positive cases; negative cases (reject {}.length)
had to be done manually by inverting the block's output

Change-Id: I9e0616319c9d7f93c24d03f928b78072e0959c39
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278326
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>
2021-11-16 16:36:02 +00:00
Cody Cutrer fe3c624016 RuboCop: Performance/RedundantSplitRegexpArgument
[skip-stages=Flakey]

auto-corrected

Change-Id: Ic9b7b8d4c3b1d76c32d8e9645cf5208002737645
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278321
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>
2021-11-16 16:35:46 +00:00
Cody Cutrer f76cbff3ac RuboCop: Performance/RedundantMerge
[skip-stages=Flakey]

auto-corrected

Change-Id: Ib7cb61f100d3ff41887c5ace9441f70fc30c9a69
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278319
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>
2021-11-16 16:35:34 +00:00
Cody Cutrer 9b5ab437d5 RuboCop: Performance/TimesMap
[skip-stages=Flakey]

manual (it says it's auto-correct, but it didn't. which is fine cause a few
I simplified in other ways than using Array.new)

Change-Id: I8a4d5cf61deac22ad24e012f5a6f3647c84d3d3c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278312
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>
2021-11-16 16:20:35 +00:00
Cody Cutrer 58eb4175fb RuboCop: Performance/MapCompact
[skip-stages=Flakey]

auto-corrected

Change-Id: I9e768e051924cfe58bf282f85d3cf6ca48735e9d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278264
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>
2021-11-16 16:20:07 +00:00
Cody Cutrer 294d98c6fd RuboCop: Style/MutableConstant
auto-corrected

Change-Id: Ib1b3c85711578a33014ea90f0662bd46f7b2288b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278214
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>
2021-11-16 16:19:54 +00:00
Matthew Lemon ba75170478 split conversation and messages queries for inbox
fixes VICE-2242
flag=react_inbox

Test Plan:
- Everything should still work
- Specs pass
- You can also navigate to the inbox and note that the conversation
  query only returns the first message for each conversation (this
  is necessary to get the last participants within the conversation)
- Clicking on a conversation will show a temporary spinner while we
  fetch the conversation messages

Change-Id: Ia392be6dd65fd3a6d7b29aca8ee1f43f6c6ea909
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278171
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2021-11-16 16:05:37 +00:00
Jackson Howe 30a951ecd4 Update rce translations
Change-Id: I29dd81eeae462526f71f5b37aeb852c5c160c08b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278371
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Scheiding <jon.scheiding@instructure.com>
QA-Review: Jon Scheiding <jon.scheiding@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2021-11-16 14:52:01 +00:00
Gonzalo Penaranda 67773dec4d Center align equations after saving changes on RCE
fixes MAT-459
flag=none

Test Plan:

 - Navigate to an instance of RCE
 - Click on 'Insert'>'Equation' option
 - Insert any short equation you like and then
click on 'Insert Equation'
 - Click on 'Format'>'Align'>'Center' in order to
preview the centered equation image
 - Save changes in the module you're located (i.e quizzes>update question)
 - Now, the equation image should show centered on the preview

NOTES (11-09-2021)

- To apply centering on formulae, it can be done clicking on
formulae image when editing in the RCE, as well as by
selecting the whole p element that contains it
- The recent fix is meant to apply on the preview of the
formulae on Assignments

Change-Id: If7c91458340b60e04bad187a1dd9680be4f91fb1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277150
Tested-by: Gonzalo Penaranda <gonzalo.penaranda@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
2021-11-16 14:32:15 +00:00
Cody Cutrer 3512a9557e RuboCop: Style/SafeNavigation
[skip-stages=Flakey]

auto-corrected

Change-Id: I0a907a6fa6229f05b4f756faf53a8dd2b18ea0c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278213
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>
2021-11-16 06:36:38 +00:00
Cody Cutrer e50edd485f RuboCop: heredocs
[skip-stages=Flakey]

Naming/HeredocDelimiterNaming and Rails/SquishedSQLHeredocs

the former was manual, the latter was automatic. I also changed
some <<- to <<~ to allow for better formatting

I also had to change comments inside squished SQL heredocs to
be block comments (since newlines are removed); searching for those
I found some multi-line strings that are better as heredocs

Change-Id: I6b138f8e32544b97df1e4c56f09ee5316cbdef9d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278184
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>
2021-11-16 06:36:00 +00:00
Evan Battaglia c44f100634 MSFT sync: delete mappings for non-existent users
Previously, we never deleted the mappings between a Canvas User and
Microsoft user AAD object ID after caching it. So if a Microsoft admin
deleted users from Microsoft 365, some courses would fail to sync
because the AAD object ID we had didn't exist on the Microsoft side, and
ge would never try to re-look it up.

Now, if we try to add a user and the user's AAD object ID doesn't exist
on the Microsoft side, we will notice that and delete the mapping. The
next time a sync is run, we will successfully re-lookup the Canvas user
and add them if a different Microsoft user exists for them.

If we are trying to remove a user from a group and the user doesn't
exist, we will still error, as Microsoft's API doesn't differentiate
between the user not existing, group not existing, or the user just not
being in the group. However this case is not as bad as it can only
happen in a partial sync (since in a full sync we get the full list of
users in the group from the API, and that list will not include deleted
users). So if that happened, a full sync would fix the course/MS group
and allow it to sync again.

This commit:
* Modifies add_users_to_group (patch api -- all users at once) to notice
  when the API sends back a 404 that some user does not exist. At this
  point we only know that at least one user doesn't exist, so we use the
  batch API (all users as separate requests in a batch) to get a list of
  all such users.
* Changes add_users_to_group_via_batch to notice when the API returns a
  404 saying the user does not exist. To communicate this up, we have
  a new method nonexistent_users on GroupMembershipChangeResult
* Changes special_case.rb to support a block tester. Also use an
  encapsulate response which can contain a `batch_request_id` for batch
  requests. These are used by the new code.

closes INTEROP-7000

Test plan:
* have a course with some users (enrollments must be 'active',
  CommunicationChannels must be 'active' if email is used for lookup
  key) and sync with Microsoft.
* delete users on MS side
* run a full sync (e.g. group.syncer_job.run_synchronously). sync should
  succeed, the usermapping for the user that no longer has a user on the
  Microsoft side should be deleted.
* delete the group on MS side.
* add a user (active enrollment, active communicationchannel as before)
  with a user on the microsoft side and run a full sync. that should
  should recreate the group on the microsoft side (as before)
* delete a user on the MS side and then immediately remove the user from
  the course on the Canvas side. run a partial sync (e.g.
  group.syncer_job.run_synchronously(:partial)). That should be ignored
  (as before) because we just assume the user is not in the group (we
  can't distinguish between that and the user not existing when removing
  users).

Change-Id: I5230b32d7cbfd1462177e3e597ba7d9633f055d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278068
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-11-16 04:42:39 +00:00
Evan Battaglia 4e46cdb34a MSFT sync refactor - GroupMembershipChangeResult
In the next commit I need add_users_ignore_duplicates to return more
complicate information than just the list of users returned.
Encapsulating that information in an new class instead of returning
a complicate array-hash structure seemed the most clear thing to do.

refs INTEROP-7000

Test plan:
- TODO, should smoke test all previous commits

Change-Id: I65e5ccbbc49ff3eaee8fcdb5e15158a95e4cf133
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277726
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-11-16 04:42:11 +00:00
Cody Cutrer 0f3fca82d9 remove now-unnecessary double-negation
Change-Id: Ia3a1f984cd482461e380d3a61af8cdb7adf46e03
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278077
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>
2021-11-15 22:34:15 +00:00
Caleb Guanzon bea6414dc5 update topic participant on read / unread change
fixes VICE-2227
flag=react_discussions_post
flag=isolated_view

test plan:
- create a discussion
- create 3 replies
- as a different user, view
the discussion index page
- you should see 3 unread indicator
- view the discussion
- wait for auto-mark as read for the 3 replies
- visit the index page again
- verify that you see 0 unread indicator

- as the reply creator, create a thread with 3 replies
- as the user who marks as unread/unread, view the
discussion index, verify that the unread count correctly
reflects the new child replies you haven't read
- visit the discussion, open isolated view for the thread, and
mark all as read
- go back to discussions index
- verify that the unread count correctly updated
- go back to isolated view of that thread, and mark thread as read
- verify that when you go back to index,
unread count correctly updated

Change-Id: Ib78a93d36bb3240a0496b54fd3c266f227a485e6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278062
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>
2021-11-15 21:35:46 +00:00
Xander Moffatt 0b17e0f2c7 skip: flaky outcomes tests
refs OUT-4879
flag=none

test plan:
* these specs do not fail the build

Change-Id: I00d2dab1794a5d640ad6be3ac891dd5022e993a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278318
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2021-11-15 21:21:10 +00:00
Adrian Packel cd3a22cbf5 make "Add Rubric" link a button
fixes EVAL-2083
flag=none

Test plan:
- Using VoiceOver or something similar, verify that the "Add Rubric"
  button that appears on the course and account rubrics page is indeed
  interpreted as a button

Change-Id: Iedefaa81e6482b036120a0ec03e6a08ec5417253
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278307
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-11-15 21:07:02 +00:00
Ed Schiebel 66cbbf1dac Size equations to surrounding text
closes LS-2845
flag=scale_equation_images

test plan:
  - turn on site admin flag scale_equation_images
  - in the rce, create some content with a large font
  - with the text caret in the large font area (you can tell by
    looking at the blinking cursor) insert a math equation
  > expect the equation to be scaled to match the surrounding font size
  - click on the equation image and change its font size using the rce toolbar
  - edit equation and save. you don't have to change anything
  > expect the equation to be in the new font size
  (some day we'll detect the change in font size and automagically fix it)

Change-Id: I323bf4162521cf88d2a993b8e62ef697114f8959
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278299
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2021-11-15 20:10:39 +00:00
Evan Battaglia d91a3926b0 spec: MSFT Graph Service refactor part 6 -- specs
I found the specs for the groups endpoints really hard to follow with
 the multiple layers of shared examples and such. This is my attempt to
 simplify it a bit, although it's not perfect.

* Separate out add_users_via_batch specs from outside of the
  add_users_ignore_duplicates
* Get rid of boilerplate around succ(), dupe(), etc. by using a table of
  canned subresponses -- SAMPLE_RESPONSES_CODES_BODIES_HEADERS -- and
  build_batch_response_body()
* Also use table of examples instead of another level of shared examples
  for failed batches
* Make explicit the dependencies between shared_examples_for by using
  parameters instead of lets for most values

Test plan:
- specs. we can do some overall graph service smoke tests after all my
  refactoring

Change-Id: I5456a5e26b747ab8e5d8407954ec99077c1a8156
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277727
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-11-15 19:54:46 +00:00
Evan Battaglia 9e644a7ac1 MSFT Graph Service split up endpoints refactor 5
Finish splitting up GraphService -- remove delegates and call the
methods in the GroupsEndpoints class directly, and rename the methods to
not be redundant.

refs INTEROP-7000

Test plan:
- specs. we can do some overall graph service smoke tests after all my
  refactoring

Change-Id: Ia5856e11f4f375da6f7feb353ce144a001a78aee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277695
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-11-15 19:54:35 +00:00
Jeremy Stanley 2c63814c7d fix homeroom enrollment syncing error
test plan: a course with sync_enrollments_from_homeroom = true
but no valid homeroom_course_id shouldn't make the nightly
homeroom enrollment sync fail

(run `Course.sync_with_homeroom` from a console to test)

flag = none
refs LS-2842

Change-Id: I20726ad7d6652363c66c7c23850cf3d584a1320e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278301
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-11-15 19:54:31 +00:00
Evan Battaglia 8a9cb33526 MSFT Graph Service split up endpoints refactor 4
Remove delegates and call the methods in the *Endpoints classes
directly, for everything but GroupsEndpoints. Renames methods to not be
redundant.

refs INTEROP-7000

Test plan:
- specs. we can do some overall graph service smoke tests after all my
  refactoring

Change-Id: I13463e6611abfbcf6c33838e8c28b1b97953a123
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278080
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-11-15 19:54:27 +00:00
Evan Battaglia ce56b01ae8 MSFT Graph Service split up endpoints refactor 3
Finish splitting up Graph Service Endpoints specs. This more fully
separates the specs for each set of endpoints, not going through a
central GraphService object.

refs INTEROP-7000

Test plan:
- specs. we can do some overall graph service smoke tests after all my
  refactoring

Change-Id: Iff0e606b6b1cc3aa72c112c8081d541b317a2107
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277693
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-11-15 19:54:19 +00:00
Jeremy Stanley 7050755d35 fix grammar in calendar events api "important_dates" parameter
since the newline isn't significant in the rendered docs, the
existing code read as "Defaults to false if true, ..."

put a period in there to clarify "Defaults to false. If true, ..."

test plan: render docs

flag = none

closes LS-2843

Change-Id: Ifc0917b1a5da20e1f49217a0eaee836ba043cb69
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278283
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-11-15 19:30:38 +00:00
Aaron Shafovaloff 2ea330397b Upgrade Jest to 26
Test plan:
 - tests pass

flag=none

Change-Id: Iaf7a40b5b2c3f5afd286eaaa6b5f010d0b35feda
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278231
Reviewed-by: Brian Watson <bwatson@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-11-15 19:28:14 +00:00
Jeremy Stanley b793d338fc include blueprint info in assignments index
test plan:
 - the assignments index should include

   is_master_course_master_content /
   is_master_course_child_content

   for assignments that are shared from / to blueprint courses,
   similarly to the index pages for discussion topics, pages,
   and quizzes

closes LS-2756

Change-Id: I650ef677ddb267e2475de7718e10c28e5c4b8e58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277878
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-11-15 19:15:56 +00:00
Omar Gerardo Soto-Fortuño f1c0b734b2 Fix issues w/cache update of replies unread/counts
closes VICE-2030

flag=react_discussions_post

test plan:
  - See ticket for test scenarios.
  - Make sure they work with this fixes.

qa risk: low

Change-Id: I3de3c37b3a39437aff0eb2d54efac3c79370b835
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278294
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-11-15 19:10:56 +00:00
Jeremy Stanley e1687caf9f preserve downstream module requirements/prerequisites
test plan:
 - have modules in a blueprint
 - sync
 - in an associated course, edit the requirements of a module
   and set a prerequisite module
 - in the blueprint course, make some kind of change to a module
 - sync again
 - the requirements and prerequisites that were changed should
   be preserved
 - the sync history should show a "settings changed exception"
   for the module
 - repeat the above tests with sequential completion requirements
   and/or completing just one requirement

flag = none

fixes LS-2816

Change-Id: Iba57144a81a241247474c23ebcf78c7872e65f4f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277735
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-11-15 17:28:57 +00:00
Syed Hussain 3aa84d789c Update gradebook import to support separate first/last names
closes EVAL-2028
flag=gradebook_show_first_last_names

Test plan:
With the FF ON:
1. In gradebook, select the view option to split student names
2. Export gradebook csv, make sure it matches the grid with separate
columns for student last and first names
3. Open the csv and update a few scores
4. Import gradebook csv and make sure:
- it shows the updated columns
- it uploads successfully
- grid shows the updated values
5. Repeat step 1 - 4, with the view option to split student names
unchecked.

Change-Id: I3dbd51c5cfbdaba22189cb112e3a32d0781bfb49
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277557
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Product-Review: Jody Sailor
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
2021-11-15 17:27:55 +00:00
Ed Schiebel b75949f1f4 Fix PP start date error message
closes LS-2840
flag=pace_plans

test plan:
  - on the pace plans page, set the start date to be after the
    end date
  > expect the error message to make sense.

Change-Id: I0e04f7413c6f9615cf8c18bcfa8672a8632bdda2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278147
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2021-11-15 17:19:22 +00:00
Dustin Cowles 732fd9e730 do not send assessment reminders for unpublished assignments
closes EVAL-2024
flag=none

Test plan:
- PreReqs
  - A published course with two students
- Create an unpublished Peer Review assignment
- Add a Rubric to the assignment
- Assign peer reviewers
- Check sent notification messages for each student
  - /users/#/messages
- Observe no reminder was sent

Change-Id: Ia176fe00e14b0907918ce66ab98b50977e839312
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276452
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Dustin Cowles <dustin.cowles@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
2021-11-15 17:00:43 +00:00
Evan Battaglia ad1e5eb3d6 MSFT Graph Service split up endpoints refactor 2
Split up specs part 1: this splits up the specs in a minimal way,
keeping the central GraphService object in the specs.

refs INTEROP-7000

Test plan:
- specs. we can do some overall graph service smoke tests after all my
  refactoring

Change-Id: I150c95aaf87ef30e3bf6e09b8dd2519b6c77f449
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277692
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-11-15 16:53:24 +00:00
Robin Kuss 5ec137ff78 add paceplan selenium for projected dates
Some of the tests planned for LS-2807 could not be completed yet and
will be done with a new commit when functionality is determined.

Closes LS-2807

Test Plan: passes Jenkins

Change-Id: I685942ab035f03694ec33e5e39e351e51dbc04f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277985
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-11-15 16:35:17 +00:00
August Thornton 27a965b219 prevent reset course content on template courses
closes FOO-2532
flag = none

test plan:
• designate a course a template (in console) or will require
  the site admin course template feature flag to be flipped on
  and the course setting for course template to be checked
• Reset Course Content button should no longer be visible from
  within a course settings page on the right hand side
• trying to reset via API should result in 401 unauthorized

Change-Id: I2b8f79feb77df20033226d07b624b09e0912175f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278216
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2021-11-15 15:44:13 +00:00
Caleb Guanzon 7c088412fa spec: port concluded student discussion tests
test plan: none

Change-Id: Ib6387cfade69be2e7383a39e543e753051eb9461
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277616
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2021-11-15 15:42:05 +00:00
Aaron Shafovaloff 7d7baa8ec8 Upgrade QUnit so we can use new methods
Test plan:
 - All tests pass

flag=none

Change-Id: I5b361d05fbcd1f186c75d47fd27115dcf8659a74
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278071
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-11-15 14:41:08 +00:00
Jenkins d4b8c31c72 [i18n] Update package translations
Change-Id: Idbe5174b17967c2017bf9a98491c58e346abfad0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278227
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-11-13 04:49:50 +00:00
Evan Battaglia 91d6cf81ba MSFT Graph Service split up endpoints refactor 1
This makes classes for the different endpoints and for now delegates
calls to them.

refs INTEROP-7000

Test plan:
- specs. we can do some overall graph service smoke tests after all my
  refactoring

Change-Id: I0bc81bae35066c5b94c96e37d8b0de9dbe2e821f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277691
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-11-13 04:11:29 +00:00
Mysti Lilla bf530299ac Fix flakey spec
fixes INTEROP-7144
flag=none

Test plan
- Specs pass

Change-Id: Ieaa24657e8c86aa172ec099f07d0f7b5538c1a75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277300
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2021-11-12 23:36:55 +00:00
Evan Battaglia d76217c500 MSFT graph service refactor 0 remove unused method
This method is unused except for rare debugging and is not that hard to
reproduce when needed. This file is big and complicated enough already.

Test plan:
- specs. we can do some overall graph service smoke tests after all my
  refactoring

Change-Id: I525b5a39b45612eea85106e676ec7917822cd64f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277690
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-11-12 22:15:30 +00:00
Evan Battaglia f5d89d45ad MSFT Sync: refactor special_case.rb
preparation for future commits.

refs INTEROP-7000

Test plan:
- specs. we can do some overall graph service smoke tests after all my
  refactoring

Change-Id: Ibca941f1fa1e3efa6dd6e844b7a4d1787b2701bc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277689
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-11-12 22:15:23 +00:00
Jeremy Stanley 61170fe2c7 fix homeroom enrollment syncing with linked observers
test plan:
 - enroll two students in a homeroom course
 - link the students to an observer via UserObservationLink
 - link a subject to the homeroom
 - sync enrollments from the homeroom
 - the sync should succeed

flag = none

fixes LS-2838

Change-Id: I51939b40bce729318fc61488076e39897e3a4051
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278192
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-11-12 21:56:19 +00:00
Jackson Howe cff80c8300 Rename "Feature Preview" to "Feature Option"
except not all of them, becuase some actually are "Feature Previews"

closes LS-2826
flag = feature_flag_filters

Test plan:
 - Passes Jenkins
 - The tab in course/ accounts settings says "Feature Options"

Change-Id: I90784634d87c5b7c6a39962c888277617b3d47a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278025
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Guardado <jonathan.guardado@instructure.com>
QA-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2021-11-12 21:56:07 +00:00
Jonathan Guardado 8611fa6545 Fix: Extra long course names lose format
Some tweaks were made in the CSS, removing the absolute position in
the span and using the flex and margin properties to center the name.
This will make the subject name be included in the layout flow and
the row to grow if the name is too large

fixes LS-2796
flag= none

Test plan

- Go to the setting page of any k5 subject.
- Update the course name to something longer than 256 characters and
save
- Expect the changes to be saved and the new name be at the top of
the page and properly contained

Change-Id: Id00a46f5e507ad6783fd70e0f802fc6dd1314169
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278086
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
2021-11-12 21:49:43 +00:00
Isaac Moore 93f26b1b20 Add points and assignment link to Pace Plans
This change adds a display of the possible points for an assignment to
the Pace Plans table. It also makes the assignment title a link to the
assignment.

closes LS-2712
flag=pace_plans

test plan:
- visit `/pace_plans` for a course with pace plans enabled
- ensure that you have several assignments (with points possible defined)
  as part of the pace plan
- verify that possible points are displayed as subtext below the
  assignment title
- verify that the assignment title links correctly to the assignment
  detail page
- test with discussions, assignments, and quizzes

Change-Id: I1ab2761d2c1200dc1c317e7cdc5c76166be871c3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277160
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2021-11-12 21:39:54 +00:00
Cody Cutrer b903214f1a rubocop: default pre-commit hook to auto-correct-all
since we're not enabling _any_ auto-correct if there are still existing
violations, it seems easier to enable unsafe autocorrects for new code,
when you're most likely to know how to fix it. instead of getting
frustrated and wondering why gergich is complaining about something that
should have been auto-corrected

Change-Id: Ic81316c790820e2d32a1b1826c79ccaa77d1d6ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278081
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>
2021-11-12 20:40:28 +00:00
Ed Schiebel 2851bbc9b6 Add a warning to the course import page
closes LS-1935
flag=none

test plan:
  - go to /courses/:id/content_migrations
  - select a content type
  > expect a warning about overwriting content

Change-Id: If60978eaedd5c99d8c52a1286d5c07718391a0c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278032
Tested-by: James Butters <jbutters@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2021-11-12 20:35:03 +00:00