Commit Graph

3379 Commits

Author SHA1 Message Date
Juan Chavez 3f8026e1b2 Fix RCE links for unpublished/date-locked files
fixes MAT-374

flag=none

test plan 1:
- Upload a pdf to course root folder.
- Set visibility of the file to unpublished.
- Create a page with a link to the file (using
RCE course links).
- Replace the pdf (same name, without changing
visibility).
- As a student, navigate to the page and click the
file link.
- Verify that there is no error and Canvas doc
viewer is opened (saying that the file is locked).

test plan 2:
- Upload a pdf to course root folder.
- Set visibility of the file to date-locked.
- Create a page with a link to the file (using
RCE course links).
- Replace the pdf (same name, without changing
visibility).
- As a student, navigate to the page and click the
file link.
- Verify that there is no error and Canvas doc
viewer is opened (saying that the file is locked).

Change-Id: I91c79dd1ec1ab362eb387ac39dab9a638fc275f0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275803
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: Juan Chavez <juan.chavez@instructure.com>
2021-10-28 18:58:27 +00:00
Syed Hussain c8d08f5b4e Include student first/last name in gradebook export
Gradebook csv export should work for both student name or
separate first and last names

closes EVAL-1989
flag=gradebook_show_first_last_names

Test plan:
With the siteadmin FF ON, and the account admin setting to allow
showing student first/last names enabled, as a teacher:

1. Select "Split Student Names" option from the view options menu
2. Verify the gradebook grid shows separate columns for student
last and first  names
3. From the gradebook actions menu, select export
4. Verify the exported csv has values for student last and first
names (in this order, comma separated) and rest of the values are
correct.
5. Unselect the "Split Student Names" option
6. Verify the grid has 1 column for student name
7. Export the csv, and verify the csv has 1 column for student
name and rest of the values are correct

Change-Id: Ia38e9d47333414e3fdac67eddc820547126ea345
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276073
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2021-10-28 17:35:35 +00:00
Cody Cutrer 47119da659 spec: remove sharding_spec_helper requires
[skip-stages=Flakey]

the main spec_helper already requires it

Change-Id: Ibcd905aa7ae603c8cdfa3cd24216e16aee252a8f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276853
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-10-28 00:19:18 +00:00
Cody Cutrer 0a025efa2f spec: use require_relative instead of require File.expand_path
[skip-stages=Flakey]

Change-Id: I861a46acffa893b4ea6630039da66851c71b5a77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276831
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-10-28 00:15:03 +00:00
Cody Cutrer 61e5b3a6dc RuboCop: Lint/UnusedMethodArgument lib
all manual

Change-Id: I0db0dbf9ffec3ac6675f6d159f8d038fe2f09256
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276489
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-10-27 15:54:27 +00:00
Keith T. Garner 19d9329411 add prioritizeNonToolGrade extension to grade passback
This flag is useful for if an LTI tool needs to provide a grade
passback, but would prefer to use the grade in canvas already if a
teacher graded via the gradebook instead of the tool.

An example of where this comes into play is if an LTI tool's grade
passback is delayed, during the delay a teacher manually grades in
canvas's gradebook, and then later the grade passback happens. We know
that certain institutions would prefer the teacher grade stay. (Why the
teacher is giving a different grade than the LTI tool? No idea.)

test plan:
 - specs pass

Change-Id: I2b166f892cc11bfc64522a850944a91aa4d94a96
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274389
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2021-10-27 15:03:43 +00:00
Cody Cutrer ff416aeb59 RuboCop: Lint/UnusedBlockArgument spec
[skip-stages=Flakey]

all manual

Change-Id: I7137e91c6b576fe29bfe8d8cb4cde343fe3df3a9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276621
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-10-26 20:41:00 +00:00
Cody Cutrer 06a2c9df42 spec: remove manual requires of spec_helper
[skip-stages=Flakey]

Change-Id: Id65c835b72e1c0a4bb825b58490ce0ff7c8d9873
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276829
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-10-26 20:38:27 +00:00
Cody Cutrer 3b38d39572 support suspending users via SIS import
closes FOO-2414

test plan:
 * create a user via SIS
 * run another SIS import with the user's status set to "suspended"
 * that use should no longer be able to login

Change-Id: I31b177ee797b3dd8962112960bda11c5c4fa575a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276557
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-10-26 15:26:11 +00:00
Alex Slaughter 616edf086c Add $Canvas.externalTool.id to LTI launch params
Add support for LTI tools to consume the tool id
as defined in canvas for themselves.

Test Plan:
 - Specs pass

flag = none

Change-Id: I6765b907c14a79bad8e68b3b8037efc140bd7bf5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276455
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
2021-10-22 20:27:31 +00:00
Jacob Burroughs b329523126 Migrate twilio to use rails creds
fixes FOO-1496

Change-Id: I26e329e09022aecca3f575667fe5ff8c377eb24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276546
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-10-22 14:51:17 +00:00
Evan Battaglia bacc7131f8 MSFT sync fallback to batch if "too many users"
This was discovered in QA for a previous commit. If a course has over
100 owners, the sync fails, and then we run a partial sync, we can run
into the case where the partial sync tries to add 20 owners but many if
not all or duplicates. If there are >= 81 owners, Microsoft won't
realize this but instead say "there are too many users". Instead of
trusting this message, we should fall back to the batch API -- because
it adds each user individually, it will ignore any that are already in
the group instead of saying there isn't room.

Test plan:
- Have a Microsoft group with >= 82 owners
- From a rails console, get the graph service object and then get a list
  of 20 owners in the group.
    def all_owners_ids(gs, group_id)
      [].tap do |list|
        gs.list_group_owners(group_id) do |slice|
          list.concat slice.map{|u| u['id']}
        end
      end
    end
    group = MicrosoftSync::Group.first
    gs = group.syncer_job.steps_object.send:graph_service
    owners = all_owners_ids(gs, group.ms_group_id).take(20)
    gid = group.ms_group_id
- Remove one of the owners from the group:
    one = [owners.last]
    gs.remove_group_users_ignore_missing(gid, owners: [owners.last])
- Wait a couple seconds (API is eventually consistent) and check that
  the user is no longer in the group:
    all_owners_ids(gs, gid).include?(owners.last)
- Add the 20 owners -- 19 of which should already be in the group:
    gs.add_users_to_group_ignore_duplicates(gid, owners: owners)
- The function should return a list of the 19 duplicates. You should see
  it log that it first tried the 'patch' endpoint and fell back tothe
  'post $batch' endpoint.
- Wait a couple seconds and check that the user was added back in.
    gs.list_group_owners(gid).map{|g| g['id']}.include?(owners.last)

refs INTEROP-6805
flag=microsoft_group_enrollments_syncing

Change-Id: I4a3dd47edb62b29ba8278182b37894b28604ceda
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276318
Reviewed-by: Sean Scally <sean.scally@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-10-21 17:11:38 +00:00
Cody Cutrer 349ff7fa49 RuboCop: Lint/UnusedMethodArgument spec
[skip-stages=Flakey]

all manual

Change-Id: I7703886011d35c28ba1b06414a39671eca12b501
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276448
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-10-21 16:20:05 +00:00
Evan Battaglia 808ab82d34 MSFT sync: handle adding/removing users near limit
refs INTEROP-6805
flag=microsoft_group_enrollments_syncing

Test plan:
- have a course with one owner
- remove an owner and add a different owner. recall that enrollments
  have to be in an "active" workflow_state to count.
- run a partial sync (`group.syncer_job.run_synchronously :partial`)
- sync should fail, but it should still add the new owner. Check in the
  Microsoft admin console. Both owners will exist in the group.
- run a full sync (`group.syncer_job.run_synchronously`). Check in the
  MS admin console. The old owner should now be removed.
- Repeat but run a full sync instead of a partial sync the first time.

Change-Id: I0cce5a50a51f40ed36f5eea928638c4782b31937
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276019
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
2021-10-21 14:53:17 +00:00
Evan Battaglia 51b5ddc080 MSFT Sync: refactor http code
Also fix default special_cases ([] instead of {}) in graph_service/http.rb

The diff http.rb doesn't show nicely here, try:
  diff --ignore-space-change \
    <(git show HEAD^:lib/microsoft_sync/graph_service_http.rb) \
    <(git show HEAD:lib/microsoft_sync/graph_service/http.rb)

refs INTEROP-6805
flag=microsoft_group_enrollments_syncing

Test plan:
- run through a sync, make sure it still works

Change-Id: I12d4339c0c1a50417ed23f9476ca12b1b9f711a4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275802
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2021-10-21 14:53:05 +00:00
Evan Battaglia 702cf49cbd Disable course once reaches too many enrollments
closes INTEROP-6805
flag=microsoft_group_enrollments_syncing

Test plan:
- note: this is closely based on test plan for last commit
- enable sync for a course
- add 101 teachers that have users in our test tenant. I
  made a bunch of test users to use owners you can use. What I did was
  generate the list of UPNs with
  'echo evantest{001..101}deleteafternov2021@...' and add them to my
  course)
- Remember the enrollments have to be all active and the communication
  channels 'registered', so I did
  `CommunicationChannel.update_all(workflow_state: 'active')`
  followed by
  `ms_group.course.enrollments.map{|e| e.update workflow_state: 'active'}`
  which will add the users to the PartialSyncChanges table.
- run a partial sync (e.g.
  `group.syncer_job.run_synchronously :partial`)
- in the course settings check the Microsoft Sync integration, it should
  be disabled. Note that it won't show any error because errors are not
  shown when the sync is disabled, but trying to enable it will show the
  error shown when trying to enable a course with too many enrollments
  (added in a previous commit)
- in a console, check that last_error is set on the group
- remove the 'check_for_enrollment_limits' before_action hook in
  app/controllers/microsoft_sync/groups_controller.rb
- also remove the 'rescue Errors::OwnersQuotaExceeded' block on
  lib/microsoft_sync/syncer_steps.rb:263 so we can be sure we are testing
  the step_full_sync_prerequisites code path
- enable the sync again
- run a full sync
- check the course settings page again. Again the sync should be
  disabled. And last_error should should have the "too many teachers"
  error message

Change-Id: Ied4faf7f997040e224c1cbdcdb7f0c5d24c4e02e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274953
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
2021-10-21 14:52:54 +00:00
Cody Cutrer 6cb0ea010c RuboCop: Lint/UselessAssignment spec
[skip-stages=Flakey]

all manual

Change-Id: I615934f94060ed339c17d6a73599487dc577e376
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276433
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-10-21 13:38:12 +00:00
Isaac Moore f94fe15d01 Add `locked_for_user` property to `observer_alert_json`
This change adds a new `locked_for_user` property to the Observer Alert
API to indicate whether or not a particular alert's context is "locked"
(e.g., invisible) for the calling observer. This can be set to `true` for
a number of reasons, but most commonly, the deletion of the content or
the conclusion of the course.

closes LS-2668
flag=none

test plan:
- create an observing enrollment for a student enrolled in a course
- using the API, as an observer, create an observer alert threshold for
  a high assignment grade for your student (see the bottom of the commit
  message for an example request)
- as a teacher, enter a grade for the student in the course above the
  value you set in your threshold
- call the `/api/v1/users/self/observer_alerts/<student_id>` endpoint and
  verify an alert appears, and `locked_for_user` is false
- set the course end date to the past, and restrict students from viewing
  the course after the end date
- call the API again, and verify `locked_for_user` becomes true
- revert your change to the course end date
- call the API again, and verify `locked_for_user` becomes false
- delete the assignment
- call the API again, and verify `locked_for_user` becomes true again

### Example threshold creation request:
```
curl --request POST \
  --url http://<canvas URL>/api/v1/users/self/observer_alert_thresholds \
  --header 'Authorization: Bearer <your token here>' \
  --header 'Content-Type: application/json' \
  --data '{
	"observer_alert_threshold": {
		"alert_type": "assignment_grade_high",
		"threshold": "90",
		"user_id": <your student's user id>
	}
}'
```

Change-Id: Ifc0775c70a0e0cb6bf66c5e60968013a91661eb9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276187
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: Isaac Moore <isaac.moore@instructure.com>
2021-10-20 22:54:45 +00:00
Eric Saupe 023f356e85 Remove pace plans start_date column
fixes LS-2723
flag=pace_plans

test plan:
- Creating and publishing pace plans for courses, sections, and users
should create all relevant assignment overrides with correct dates
- Pace plans frontend should continue to work as expected
- Pace plans should no longer have the start_date column but should
return a start_date for the relevant context's start_at date. For example,
if the pace plan is for the user then the start_date will be the start_at
date for the user's enrollment. Course section pace plans return the
course_section.start_at. The fallback for all start_at is the course's
start_at date.

Change-Id: Iffce86bd0eca65a4f51db5f88e2b35833b7bc1f1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276317
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2021-10-20 21:57:54 +00:00
Ethan Vizitei 75a442a563 keep db connections in MB producer thread clean
closes FOO-2500
flag=none

TEST PLAN:
  1) re-enable MB pulsar writes in high traffic environment
  2) connection leasing errors do not return

Change-Id: I63bbfc370777c542d7d74441991fbafc188146b1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276255
Reviewed-by: Cody Cutrer <cody@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-10-19 19:48:45 +00:00
Jackson Howe 60f3a182fe Tweak zoom/webex regex to allow '-' in url
fixes LS-2752
flag = none

Test plan:
 - Add a link like https://instr-ucture.zoom.us/j/9585021282 (with a
   hyphen) to a k5 subject calendar event location or description
 - Visit the planner
 - Expect to see a join button

Change-Id: Iac43b8bc15eada834bdc71054e3f239d253e4aee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276272
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2021-10-19 19:43:13 +00:00
Rob Orton 4c14d0fdf1 don't join cross shard for discussion_topics
test plan
 - specs should pass

fixes VICE-2164
flag=none

Change-Id: I3be48a2d4500dc7377ec274d9a6a87c01130f725
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275553
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-10-18 15:47:51 +00:00
Eric Saupe 36ebfea4ec Fix inconsistent can_submit value
fixes LS-2679
flag=none

test plan:
- Create a published course with a student enrolled
- Create and publish an assignment
- Create a module and leave it unpublished
- Check the API for the assignment for the student with
include[]=can_submit in the request like this,
api/v1/courses/:course_id/assignments/:assignment_id?include[]=can_submit&as_user_id=:user_id
- Verify the can_submit value is true
- Add the assignment to the module
- Verify the API response for can_submit is false
- Publish the module
- Verify the API response for can_submit is true

Change-Id: Ife6ce897bf52c990ad6bdd3a7d7d5787dda069dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275985
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: Eric Saupe <eric.saupe@instructure.com>
2021-10-15 19:33:05 +00:00
Jeremy Stanley 803daccbef correctlies fix RSpec/ExampleWording adverb flubs
Change-Id: Ib981f3ee7e805c4f298696cf0ae8fe8f92934f60
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275969
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-10-15 17:14:28 +00:00
Alex Slaughter 30f0a02445 Add $Canvas.assignment.description to LTI launch params
Add support for LTI tools to consume the assignment description
set in canvas.

Test Plan:
 - Specs pass

flag = none

Change-Id: I339d80f91fbe2bf2e9c855f227b9ee015f1bb835
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275548
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
2021-10-15 06:08:05 +00:00
Luis Oliveira 372399e798 Fix content export/import with longfilenames
closes: LS-2657
flag=none

test plan:
- Upload 2 files to a course with long file names (above 215 chars)
- Create an export
- Import into a new course
- Check that the files are there

Change-Id: I336763c2f10dbe7cec3a535e39e213172bd290ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275069
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2021-10-14 18:26:37 +00:00
Spencer Olson 734344eaff fix speedgrader status menu with anonymous assignments
closes EVAL-1995
flag=edit_submission_status_from_speedgrader

Test Plan:
1. Enable "Edit Submission Status from Speedgrader".
2. Create an anonymous assignment.
3. Go to SpeedGrader and change a student's status (i.e. Late, Missing,
   Excused, or None) using the select menu. Verify the request succeeds
   and the status is updated.
4. Create an assignment that is not anonymous.
5. Go to SpeedGrader and change a student's status using the select
   menu. Verify the request succeeds and the status is updated.

Change-Id: I949648b7a2c78e01642d0c73298995acb3e4e7d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275004
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
2021-10-14 16:19:50 +00:00
August Thornton bc6a684750 prefer active user if matching uuid for InstAccess tokens
Prefer local users with a caveat. in case there are user merge
artifacts left behind with matching uuids we can prefer a local
user record object, BUT it could be in a deleted state, instead
we want to only look up active user record objects as we can
count on shadow records getting updated properly on workflow
state changes.

fixes FOO-2424
refs FOO-2374
flag = none

test plan:
 • have a user-merge occur x-shard
 • visit an api-gateway mediated pathway like account notifications
 • the correct _active_ shard-local user should be loaded as the
   proper auth context

Change-Id: I7d7e53663cd34e3d016863b1d04f34a562c2dcbe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275897
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2021-10-14 14:35:24 +00:00
Evan Battaglia 9650b9bd15 Support detecting too many owners/members
* This needs to be done when adding users, either via the endpoint which
  adds multiple users, or adding via the "$batch" endpoint (which batch
  subrequests which each add one user).
* To ease handling of the ever-growing number of special cases, I
  refactored code away from using the "special case block" paradigm to a
  "special_cases" hash with matchers (status code + body regex)

More work to rescue the exception and disable sync will be done in
the next commit.

flag=microsoft_group_enrollments_syncing
refs INTEROP-6805

Test plan:
- have a course setup with Microsoft Sync enabled and run a full sync
  once.
- add 101 teachers that have users in our test tenant. I
  made a bunch of test users to use owners you can use. What I did was
  generate the list of UPNs with
  'echo evantest{001..101}deleteafternov2021@...' and add them to my
  course)
- Remember the enrollments have to be all active and the communication
  channels 'registered', so I did
  `CommunicationChannel.update_all(workflow_state: 'registered')`
  followed by
  `ms_group.course.enrollments.map{|e| e.update workflow_state: 'active'}`,
  which will add the users to the PartialSyncChanges table.
- run a partial sync (e.g.
  `group.syncer_job.run_synchronously :partial`) It should fail with the
  Errors::OwnersQuotaExceeded error, coming from the request() call in
  add_users_to_group_ignore_duplicates() (not from
  add_users_to_group_via_batch())
- run:
    MicrosoftSync::UserMapping.to_a.each_slice(20) do |users|
      graph_service.add_users_to_group_via_batch(
        group.ms_group_id, [], users.map(&:aad_id)
      )
    end
  That should also fail with the same error.
- Note: I didn't add 25,000 members to see the too many members error,
  but I assume it looks nearly the same.

Change-Id: I425b7c8f09609db11fed31a475ffac2f77b1d3e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274798
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-10-13 22:55:59 +00:00
Ethan Vizitei 5f4bf2e8ea Inflect OAuth2 for Zeitwerk
refs FOO-2476
flag=none

TEST PLAN:
  1) specs pass

Change-Id: Ic5b67c658913a31dd0a6ac25a8813397745e6c2b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275754
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-13 20:25:00 +00:00
Ethan Vizitei 015d7abc62 inflect OAuth for zeitwerk
refs FOO-2476
flag=none

TEST PLAN:
  1) specs pass

Change-Id: I9f73e0021f5efec2be3c2f419e758baf00e6914f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275642
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-13 16:32:05 +00:00
Michael Ziwisky cf4da290e3 don't blow up when InstAccess::Token contains a bad user_uuid
fixes INTEROP-7105

test plan:
 - create an InstAccess::Token for a bogus user, e.g. in a rails
   console:
   > InstAccess::Token.for_user(user_uuid: 'bogus', account_uuid: 'whatever').to_unencrypted_token_string

 - try to use that token to query the subgraph, e.g.:
   $ curl http://localhost:3000/api/graphql/subgraph \
     -v \
     -X POST \
     -H "Accept: application/json" \
     -H "Content-type: application/json" \
     -H "Authorization: Bearer $INST_ACCESS" \
     --data '{ "query": "{ allCourses { name } }" }'

 - notice the response is a 401, not a 500

Change-Id: Ia303ce2a233d3bc3b4e30358ac71f19bb360a091
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275785
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2021-10-13 16:06:40 +00:00
Eric Saupe a299cab570 Add pace plans publish endpoint
fixes LS-2454
flag=pace_plans

test plan:
- With pace plans feature flag enabled
- Create a pace plan and verify it isn't active and does not have a
published_at date
- Make a POST request to /api/v1/courses/:course_id/pace_plans/:id/publish
- Verify the request is successful and the pace plan is active and has
a published at date
- Verify the modules have assignment overrides created
- Change the duration dates for the pace plan module items
- Republish
- Verify the modules have new assignment overrides for the new dates

Change-Id: I6ad4fc1669cf069b4edeb313ba07885a36c0a8ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273070
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2021-10-12 22:08:36 +00:00
József Kozma 46f2947903 Store declared_user_type while importing CSV
Closes SOS-1917
flag=none

Test plan:
- import a csv with declared_user_type provided
- verify that the user has declared_user_type set
- import a csv with declared_user_type not provided
- verify that the user still has declared_user_type set previously
- import a csv with declared_user_type=<delete>
- verify that user's declared_user_type is unset

Change-Id: I9a26247b20f65cdb96a5a84e0eb53dd29f391467
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275475
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Kozma Jozsef <jkozma@instructure.com>
Product-Review: Kozma Jozsef <jkozma@instructure.com>
2021-10-12 09:26:28 +00:00
Rob Orton dddd8d8b4c remove group leaders on user deletion via sis
test plan
 - specs should pass

fixes VICE-2068
flag=none

Change-Id: I939895a817d03fb654590d3e3734337704a669d4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275649
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>
2021-10-12 06:26:00 +00:00
Ethan Vizitei 41daa63d39 rename CSVImporter with zeitwerk inflection
refs FOO-2474
flag=none

TEST PLAN:
  1) specs pass

Change-Id: I3140bf82419458089fd3f6821eb3ae62a7315a3d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275626
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-11 21:31:51 +00:00
Ethan Vizitei 17a887bc53 rename CSVWithI18n to inflect properly for zeitwerk
refs FOO-2474
flag=none

TEST PLAN:
  1) specs pass

Change-Id: If8e9580fbf76a001f5765dcce9080daff66dba38
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275610
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-11 18:52:05 +00:00
Ethan Vizitei bb3453ed0f Inflect "IMS" consistently
closes FOO-2467
flag=none
[skip-stages=Flakey]

Since canvas and it's plugins
share an autoloader, they need
to make consistent choices about how to inflect
the same acronyms

TEST PLAN:
  1) tests pass

Change-Id: Icb133f33ed3e719b616e42e497bac1dc65bd9370
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275496
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-08 20:11:15 +00:00
Mysti Lilla 377d4eb438 Add developer key ID to external tool JSON
flags=none

Test plan
- Load up an LTI 1.3 external tool in the API
- See the developer_key_id

Change-Id: I00c277be71c7c1c9056c17a3f6bd3906708c60bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275467
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: Connor Merchant <cmerchant@instructure.com>
2021-10-08 17:36:52 +00:00
Ethan Vizitei b72cd379c8 make datafixup classes zeitwerk compatible
closes FOO-2461
flag=none

TEST PLAN:
 1) specs pass

Change-Id: I5f997c721f7ce560af245397d0a76ec419cca76b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275460
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-08 12:57:11 +00:00
Ethan Vizitei 1ce41c20fe rename CCWorker so module path can match file path
closes FOO-2436
flag=none

TEST PLAN:
  1) all specs still pass

Change-Id: I958149a8537e704b5144adb7121c0318bcb5c823
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275403
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-07 19:21:40 +00:00
Xander Moffatt 726ecebdac support deep linking in module_index_menu
closes INTEROP-6833
flag=lti_deep_linking_module_index_menu

why:
* this is an easy unit of work that's separate from the requirements
for adding line item and multiple assignment support

* create a new module and add content items to that module
* also extract the deep linking listener for use in contexts other than
collaborations

test plan:
* install the 1.3 test tool and include the module_index_menu placement
* launch the tool from that placement by clicking the 3 dots button on
the top row of the Modules page
* pass back 1 or many content items with any overrides you wish
* the page should reload, and a new module should be created that
contains the content items you passed back
* each of them is properly configured and launches correctly

Change-Id: I2a2bb47db261a9c1bd32e9799f73b81d2102d374
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272902
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2021-10-06 19:02:53 +00:00
Ethan Vizitei eab0f468e0 reset message bus settings to avoid state pollution from specs
refs FOO-2423
flag=none

TEST PLAN:
  1) run pulsar specs lots of times with many seeds
  2) they don't fail.

Change-Id: Ide7fbaebee5ddac37bf2db03d8699f32d1b57d56
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275315
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>
2021-10-06 17:13:21 +00:00
Jacob Burroughs 214014049f Add asymmetric encryption for service tokens
refs FOO-2410

test plan:
- in dynamic_settings.yml, add the following block:
```
store:
    canvas:
      services-jwt:
        # these are all the same JWK but with different kid
        # to generate a new key, run the following in a Canvas console:
        #
        # key = OpenSSL::PKey::RSA.generate(2048)
        # key.public_key.to_jwk(kid: Time.now.utc.iso8601).to_json
        jwk-past.json: "{\"kty\":\"RSA\",\"e\":\"AQAB\",\"n\":\"uX1MpfEMQCBUMcj0sBYI-iFaG5Nodp3C6OlN8uY60fa5zSBd83-iIL3n_qzZ8VCluuTLfB7rrV_tiX727XIEqQ\",\"kid\":\"2018-05-18T22:33:20Z_a\",\"d\":\"pYwR64x-LYFtA13iHIIeEvfPTws50ZutyGfpHN-kIZz3k-xVpun2Hgu0hVKZMxcZJ9DkG8UZPqD-zTDbCmCyLQ\",\"p\":\"6OQ2bi_oY5fE9KfQOcxkmNhxDnIKObKb6TVYqOOz2JM\",\"q\":\"y-UBef95njOrqMAxJH1QPds3ltYWr8QgGgccmcATH1M\",\"dp\":\"Ol_xkL7rZgNFt_lURRiJYpJmDDPjgkDVuafIeFTS4Ic\",\"dq\":\"RtzDY5wXr5TzrwWEztLCpYzfyAuF_PZj1cfs976apsM\",\"qi\":\"XA5wnwIrwe5MwXpaBijZsGhKJoypZProt47aVCtWtPE\"}"
        jwk-present.json: "{\"kty\":\"RSA\",\"e\":\"AQAB\",\"n\":\"uX1MpfEMQCBUMcj0sBYI-iFaG5Nodp3C6OlN8uY60fa5zSBd83-iIL3n_qzZ8VCluuTLfB7rrV_tiX727XIEqQ\",\"kid\":\"2018-06-18T22:33:20Z_b\",\"d\":\"pYwR64x-LYFtA13iHIIeEvfPTws50ZutyGfpHN-kIZz3k-xVpun2Hgu0hVKZMxcZJ9DkG8UZPqD-zTDbCmCyLQ\",\"p\":\"6OQ2bi_oY5fE9KfQOcxkmNhxDnIKObKb6TVYqOOz2JM\",\"q\":\"y-UBef95njOrqMAxJH1QPds3ltYWr8QgGgccmcATH1M\",\"dp\":\"Ol_xkL7rZgNFt_lURRiJYpJmDDPjgkDVuafIeFTS4Ic\",\"dq\":\"RtzDY5wXr5TzrwWEztLCpYzfyAuF_PZj1cfs976apsM\",\"qi\":\"XA5wnwIrwe5MwXpaBijZsGhKJoypZProt47aVCtWtPE\"}"
        jwk-future.json: "{\"kty\":\"RSA\",\"e\":\"AQAB\",\"n\":\"uX1MpfEMQCBUMcj0sBYI-iFaG5Nodp3C6OlN8uY60fa5zSBd83-iIL3n_qzZ8VCluuTLfB7rrV_tiX727XIEqQ\",\"kid\":\"2018-07-18T22:33:20Z_c\",\"d\":\"pYwR64x-LYFtA13iHIIeEvfPTws50ZutyGfpHN-kIZz3k-xVpun2Hgu0hVKZMxcZJ9DkG8UZPqD-zTDbCmCyLQ\",\"p\":\"6OQ2bi_oY5fE9KfQOcxkmNhxDnIKObKb6TVYqOOz2JM\",\"q\":\"y-UBef95njOrqMAxJH1QPds3ltYWr8QgGgccmcATH1M\",\"dp\":\"Ol_xkL7rZgNFt_lURRiJYpJmDDPjgkDVuafIeFTS4Ic\",\"dq\":\"RtzDY5wXr5TzrwWEztLCpYzfyAuF_PZj1cfs976apsM\",\"qi\":\"XA5wnwIrwe5MwXpaBijZsGhKJoypZProt47aVCtWtPE\"}"
```
- Ensure /internal/services/jwks loads correctly
- In console, ensure `CanvasSecurity::ServicesJwt.decrypt(Base64.decode64(CanvasSecurity::ServicesJwt.for_user('localhost', User.first)))`
and `CanvasSecurity::ServicesJwt.decrypt(Base64.decode64(CanvasSecurity::ServicesJwt.for_user('localhost', User.first, symmetric: true)))`
both work and produce sensible looking output

Change-Id: I13c6c35cc92ed12d03bf97e89e590614e11c6d47
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275160
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
2021-10-06 15:11:06 +00:00
Evan Battaglia b7fb6a5492 Disallow enabling MSFT Sync if too many users
flag=microsoft_group_enrollments_syncing
refs INTEROP-6805

Test plan:
- modify limits in membership_diff.rb
- for each limit, have a course with more owners or users than the
  limits. The users' enrollments must all have a workflow_state of
  "active" or "creation_pending"
- in the UI try to enable sync for the course
- it should fail and give an error
- make sure you can enable and disable sync for courses below the limits

Change-Id: I7def5f664dc57e640529bf6a8b3b3d12c16556e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273810
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2021-10-05 23:05:50 +00:00
Jeremy Stanley e7f623ad9b fix offline web exports with media from course files
code assumes the mediahref-style path will be used if
"Uploaded Media" folder isn't present, but media files
can be referenced from anywhere. so look for the
mediahref path specifically

test plan:
 - have a working Notorious setup
 - enable offline web exports, e.g.
   Account.default.settings[:enable_offline_web_export] = true
 - enable "allow course content to be downloaded and viewed
   offline" in course settings
 - create a subfolder in course files and upload a video file
   into there
 - in the RCE, use the media button and select that file
 - perform an export from the modules page
 - the export should succeed

flag=none
fixes LS-2639

Change-Id: I12f100a8b96e29bf64031969e01c6cb0779c8e02
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275190
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-10-05 22:21:05 +00:00
Ethan Vizitei c7c41a6747 speed up pulsar tests
refs FOO-2423
flag=none

Patch multiple sources of unintentionally shared
state between specs, and reduce
intentional wait periods in
the pulsar consumer process.

TEST PLAN:

  1) execute pulsar tests in vendor gems build
  2) runtime is cut down to less than 4 minutes

Change-Id: I9a4d990b01f2c20ea78f4a59926dffbd91d3b32f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275183
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>
2021-10-05 20:35:26 +00:00
Cody Cutrer 3ef09eed34 allow configuring token expiration for mobile apps
fixes FOO-2336

Change-Id: Ic7f555ae4d85b8b79c7114f43495a638ca2dead2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273587
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: August Thornton <august@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>
2021-10-04 20:10:39 +00:00
Martin Yosifov 0da9a51ef1 Add notImportedOutcomesCount field to LearningOutcomeGroup type
closes OUT-4743
flag=improved_outcomes_management

Test plan:
- Import Academic Benchmarks
- Go to Account > Settings > Feature Options and enable
Improved Outcomes Management FF
- Go to Account > Outcomes and open developer tools -> network
- Select via TreeBrowser the root outcome group and use network
tab to find the id of that group from the graphql response
- Click on Find button select State Standards in the Find Modal;
then find the id of that group using network tab
- Open a new browser tab, go to canvas.docker/graphiql and paste
the query below in the GraphiQL window:
query GroupDetailWithSearchQuery($id: ID!, $targetGroupId: Int) {
  group: legacyNode(type: LearningOutcomeGroup, _id: $id) {
    ... on LearningOutcomeGroup {
      _id
      title
      contextType
      contextId
      outcomesCount
      notImportedOutcomesCount(targetGroupId: $targetGroupId)
      outcomes(first: 10) {
        edges {
          _id
          node {
            ... on LearningOutcome {
              _id
              description
              title
            }
          }
        }
      }
    }
  }
}
- In the query variables window paste the snippet below
{
  "id": X,
  "targetGroupId": Y
}
- Replace X with the id of the State Standards group, Y with
the id of the imported group and execute the query
- Verify that there are no errors in the response
- Verify that notImportedOutcomesCount is equal to the
number of outcomes in State Standards
- Import 10 outcomes from State Standards to the account
- In the Manage View select the group where outcomes are
imported and find its id from the network tab
- Verify that notImportedOutcomesCount is equal to the
number of State Standards minus 10
- Go to Course > Outcomes, and repeat the above tests importing
from Account Standrds and verify that results are the same

Change-Id: I20652b5ece5350c2df884c98defc11d8d092b8b0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272768
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Marcus Pompeu <marcus.pompeu@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
Reviewed-by: Manoel Quirino <manoel.quirino@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Ben Friedman <ben.friedman@instructure.com>
2021-09-29 19:21:21 +00:00
Jacob Burroughs 6ce8e2e14e Just upload raw assets to the CDN
Just let cloudfront compress the assets for us.  It can handle the brotli/gzip
switching natively now.

Change-Id: I3416d428403f0bfbec5a575ff1c095d2342a5e4c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247818
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2021-09-29 16:49:10 +00:00