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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>