closes OUT-3999
flag=none
test-plan:
- ensure live events are running locally (see live_events.md)
- verify that when making changes (including soft deleting) or
creating an outcome calculation method that live events are emitted
Change-Id: I715305dc3cd8dc1cab127033d1feb92acd28f948
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250457
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
QA-Review: Manoel Quirino <manoel.quirino@instructure.com>
Product-Review: Jody Sailor
fixes VICE-891
fixes VICE-928
flag=none
TEST PLAN:
- just like the new spec does,
- in a course with 2 sections
- make sure that show_announcements_on_home_page = true
- make sure that home_page_announcement_limit = 2
- follow this order:
- first: create an announcement for the whole course
- second: create 2 announcments to the section
your student does not belong to
- last: create 1 announcement to the section
your student belongs to
- visit course page as your student
- verify that the first announcement you see
is the one for your section
- the second announcement you see is the one
for your course
- the 2 announcements for the other section
do not show
Change-Id: Idcc09f677dd470f7fe5706bbdf5851500ef1e461
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250250
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>
closes: LS-1265
flag=new_file_url_rewriting
- gets the verifier, if present, forwarded to the view ping-back url so
it doesn't fail for one student viewing another student's file.
Before, when clicking on a pdf and viewing it in canvadoc, the viewing
of the file succeeds, but the ping-back to log access failed with a
401. The pin-back now succeeds.
- gets the verifier added to the iframe src when the file is being
viewed locally. You'll see this when stud1 views a .txt file from
stud2. plain text files aren't canvadoc viewable, so they're viewed
in a vanilla iframe.
- stops rewriting non /preview file URLs as download URLs.
?download_frd=1 is reserved for that. Before, when users deleted
"/download" from a link using the html editor in the RCE, canvas put
it back. Not any more. They shouldn't need to any more either,
since...
- updates the RCE so links to files do not include /download in the
URL. When clicking on a file in the tray, the generated link no
longer incfludes /download (and canvas won't put it back)
Embedded images use /preview. Using Image Options to convert the
image to a link removes /preview, and no longer replaces it with
/download.
There's some weird file URL handling on in canvas. If the URL is
/preview, it is not logged as a page view. There are comments
indicating that /download will log access, though not always actually
download the file, and that download_frd is used for that. I found
this to be hard to confirm, /download seemed to download for me a lot.
It might be in conjunction with wrap=1, or the inline class name?
This change sets the "new_file_url_rewriting" flag, which enables
these changes, to on in ci and dev.
This change scares me a little and I really want to know that it's
OK.
test plan:
- ensure new_file_url_rewriting is enabled (which it should be
unless you're in test or prod environments)
- it's nice to have canvadocs enabled too
- do everything you can think of that revolves around files/attachments
and make sure it still works. No, I/m not kidding
- link files in the RCE
- try file types that will be viewed in canvadocs (.pdf),
in google docs (.rtf), and in a vanilla iffame (.txt)
> expect clicking on the link to open the file in another tab
- embed images in the RCE
> expect the image to be shown, and the <img src> to be /preview
(when loading a page with an image, the image will not show up in
recent history, if that's on)
- using Image Options, convert an image to a link
> expect the image to be displayed in a new tab when the link is
clicked
- link a file, then add "download_frd=1" to the href's query_string
> click on the link and expect the file to be downloaded, not viewed
- I think there's some special handling WRT student submissions, so
try all ^that in a submission.
- All ^that should work if student1 links/embeds user files and
images, then
> expect student2 to be able to view them all
(discussions are good for this)
> expect existing content behavior to be the same as it ever was.
Change-Id: Ieae7e4daf549ececb982007b6ce97c8c091c099c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249094
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Given the account level mastery scales feature flag is enabled
When I view a course’s Outcomes tab
Then
I see the same Mastery/Calculation tabs that are available
on the accounts page
I can edit the course mastery scale/calculation
methods if I have permission
I cannot edit these if I don’t have permissions
closes OUT-3880
flag=account_level_mastery_scales
test plan:
- as Admin, enable "Account-level Mastery Scales"
- Go to any course's admin view (like http://canvas.docker/courses/1),
- Go to outcomes
- You should see Manage, Mastery and Calculation tabs
- Click on Mastery tab
- You should see Mastery form exactly like the account
outcomes Mastery Tab
- Edit and save this form
- Click on Calculation tab
- You should see Calculation form exactly like the account
outcomes Calculation Tab
- Edit and save this form
- Go to account's outcomes (like http://canvas.docker/accounts/2/outcomes)
- Navigate thought those tabs and check those values
are not equal to the course`s outcomes
- Try to repeat the process to different course and
check the form values are not equal to every course
Change-Id: I3304a1553b147280ef94033b9f1063e2df986165
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249407
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
QA-Review: Pablo Gomez <pablo.gomez@instructure.com>
Product-Review: Jody Sailor
closes EVAL-1243
flag=none
Test Plan:
1. Create a module with some assignments in it and at least one
completion requirement.
2. Open your browser dev tools and go to gradebook. Notice there is
an AJAX request made to /api/v1/courses/:id/modules. Once the page
loads, verify you can select a "Modules" option from the
"View -> Filters" menu, and that you can then filter gradebook
content by that module.
3. Delete the module. Open your browsers dev tools and go to gradebook.
Notice there is no longer an AJAX request made to
/api/v1/courses/:id/modules.
Change-Id: I6339acbe635a31e02eaa119fc391fde0121c542e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248936
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
closes EVAL-1246
flag=none
Test Plan:
1. Create a course that uses grading periods. Have at least 2 grading
periods.
2. Create an assignment. Assign it to one student in the first grading
period, and the rest of the students ("Everyone Else") in the second
grading period.
3. Sign in as the "one student" from the previous step. Click on
"Grades". Select the first grading period from the Grading Period
dropdown and click "Apply". You should see the assignment show up.
Then, select the second grading period from the Grading Period
dropdown and click "Apply". You should no longer see the assignment
listed.
Change-Id: I69d4b8369784086034a7883460e63f4f259a79ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248932
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Jody Sailor
"Somehow, the rotate_keys job returned" --
on Oct 1, both Lti::KeyStorage.rotate_keys and
Canvas::Oauth::KeyStorage.rotate_keys ran multiple times within seconds,
causing the keys to get rotated twice. This commit prevents us from
rotating keys if we just did a few seconds/minutes ago.
flag=none
closes INTEROP-6248
Test plan:
- in a rails console, run Lti::KeyStorage.retrieve_keys to see current
keys. (Local Canvas didn't seem to be saving DyanmicSettings for me so
rotating keys didn't have any effect on the keys at keys in
/api/lti/security/jwks)
- kick off rotation of keys: Lti::KeyStorage.rotate_keys
- check keys rotated
- kick off rotation of keys again
- check keys not rotated
- change min_rotation_period to something smaller like 2 minutes. You
can do that with:
class << Lti::KeyStorage; def min_rotation_period; 2.minutes; end; end
Wait that amount of time, kick off rotation of keys again, and check
that the keys rotated.
- run Canvas::Oauth::KeyStorage.rotate_keys and
Canvas::Oauth::KeyStorage.rotate_keys to make sure the min rotation
period for each set of keys is completely separated. Note that these
seem to start out empty so you will have to rotate them once to generate
them.
Change-Id: I7d58909e2eba7ccb2cd4222e60edf3f437547a6e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
closes LS-1559
flag=none
This makes 2 changes
1. Before, we were loading both Lato and Lato Extended fonts. This is
unnecessary since Lato Extended is a superset of Lato. Now the default
behavior is to load Lato Extended and not Lato.
2. Because we host the Lato Extended font files, Cisco loads them from
their own instance of Akamai, and they want to avoid the extra bandwidth
it's using. If Setting.get('disable_lato_extended', 'false') returns
anything other than 'false', canvas will load Lato instead.
I don't know why it started failing, but I had to tweak an rce
selenium test.
test plan:
- load any canvas page
> using the devtools Network panel, Font filter, expect to see
our lato extended woff2 files downloaded from /fonts/lato/extended
and not from fonts.gstatic.com/s/lato
> expect the pages to look just like they did before
- load a page with the RCE
> expect the lato extended woff2 files loaded in the tinymce iframe
also.
- add some text including bold, italic and so forth
> expect the text to look like it did before (see also LS-317)
- in a rails console, run Setting.set('disable_lato_extended', 'true')
- send a SIGHUP to the canvas server process
(hint: `ps -a | grep puma` will find the process for `kill -1 <pid>`
- load any canvas page
> expect to see fonts from fonts.gstatic.com/s/lato, and not our
files from /fonts/lato/extended
- load a page with the RCE
> expect to see the fonts loaded in the tinymce iframe
from fonts.gstatic.com, and not ours from /fonts/lato/extended
Change-Id: Ia0c1820fa96e5ae9095c3cd1c796d381fd035a8a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Change-Id: Ie5040fa5fbd0c360e214e5b9644d0c2d9061e1ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250572
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Change-Id: Idfff9d798ce3f3f65c7a3ed97bfd1669ba20e240
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250574
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Change-Id: I564efaf24386ca690b48fb1231df1960dadf5850
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250618
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Change-Id: I3ac07e45861aecaca50f82dbb7dccf169bc11edc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250566
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
When "View Ungraded as 0" is enabled in Gradebook, ensure the scores in
the "Total" columns are updated appropriately. (The front-end calculator
is already doing the work of calculating the ungraded-as-zero grades, so
this patchset just ensures that we display them when needed.)
closes EVAL-625
flag=view_ungraded_as_zero
Test plan:
- Have a course with some students and some assignments, with at least
one assignment group
- Issue some grades, such that the course contains a mix of graded and
ungraded submissions
- In Gradebook, toggle "View ungraded as 0"
- Check that total scores and assignment group scores update correctly
when the value is toggled on or off
- Also check that the totals update appropriately in both modes as you
enter new grades
Change-Id: Ie8dbb43ebda2a2ab7e536ec01d1392356ccaa40c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248972
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
test plan
- user1 = user on shard 1
- user2 - user on shard 2
- course on shard 2
- enroll user1 and user2 in course
- load conversations on user1 shard domain
- send conversation from user1 to user2 with an attachment
- go to sent items
- it should have an attachment present
fixes VICE-880
flag=none
Change-Id: I58c316db6df380e0caae0a45f865ab124102be62
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250514
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
fixes EVAL-1266
flag=final_grade_override_in_gradebook_history
Test plan:
- Enable the "Final Grade Override in Gradebook History" site admin flag
- Enable the "Final Grade Override" feature flag
- Have a course with Final Grade Override enabled and some override
grades entered
- In the Gradebook settings panel, turn OFF "Allow Final Grade Override"
for the course
- Open Gradebook history
- Override grade changes should not appear in the results
- The "show final grade override only" checkbox should not appear
- Otherwise, the remaining filters should function as normal
- Re-enable the course "allow final grade override" setting and check
that the checkbox and override grade changes appear again
- Try this with some other combinations (e.g., the site admin flag
turned off but the course setting turned on); override grade changes
should only appear if *both* the feature flags above are enabled and
the course has the "allow final grade override" checkbox enabled
Change-Id: I4a9574423dea8b25092fed75885e405566e2ab95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250428
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
We're adding the `lti11_legacy_user_id` variabble because is a constantly
request fom tool vendors that are working on the migration to LTI 1.3.
closes INTEROP-6214
flag=none
test-plan:
* Have a LTI 1.3 tool installed in your local Canvas, you can use the
lti-1.3.-test-tool for it.
* Launch the tool and ensure that under the JWT Decode that you see the
lti11_legacy_user_id variable as a String that matches with the current
user.
Change-Id: Id0efd2602111f99f0365ea95e2a8074c2ceca477
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249755
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
flag=rce_enhancements
Closes LS-1550
Test Plan:
Passes locally and in jenkins
Change-Id: Ie8ef708196cd9e138a57956446b67713944221d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250291
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
Check whether the new_sis_integrations feature flag is enabled on the
root account level rather than the site-admin level, since it is set on
the former and not the latter.
fixes EVAL-1256
flag=disable_post_to_sis_when_grading_period_closed
Test plan:
- For a root account:
- Enable the "Enable new SIS Integration Settings" flag
- Enable the "Disable Post to SIS for Assignment in Closed Grading
Periods" flag
- In the account settings, enable the "SIS Syncing" checkbox to cause
the below checkbox to appear
- In the account settings, enable the 'Automatically disable "Post to
SIS" on assignments when grading period closes' checkbox
- Set up a grading period with a close date within the past 20 minutes
- Have a course with at least one student
- Set up an assignment with a due date within that grading period
- Set post_to_sis on the assignment to true
- Have delayed_jobs running and wait five minutes, OR run the following
in a Rails console:
> Assignment.disable_post_to_sis_if_grading_period_closed
- Check the assignment you created above
- It should now have post_to_sis set to false
Change-Id: I6aa63b4a35fea95aedb221a13b63c600d7772cb5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249623
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Access tokens now support baking in a masquerading user, which interacts
strangely with trying to manually pass a masquerade user_id param in an
api request.
Clarify that if the users match, things work, if they don't match, we
error.
fixes FOO-1069
flag=none
test plan:
- while masquerading, create an access token
- it should work
- make an api request including as_user_id as the user you are
masquerading as
- it should work
- make an api request including as_user_id as a different user
- it should error
Change-Id: Ia1d61a977d467d1fc0eca3db4931fdfda2d05618
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249955
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>
test plan:
- have a course with multiple sections
- create a calendar event in the course, choose the "more options"
button, check the box to assign a separate date for each section,
and set up two dates on the same day, one after the other.
save. you should see both events on the calendar.
- click one of the events, select "edit" and "more options".
- uncheck the box to use a separate date for each section.
make the single event start at the time the earlier section-
specific event started, and end at the time the later section0
specific event ended
- save. the event should remember it start and end times and
not appear as an all-day event
fixes LS-1490
Change-Id: I713650a19ff60bb9840770058474927dc9d59c6b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250149
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes INTEROP-6229
flag=none
Test Plan:
- Install an LTI 2 tool in Canvas that
uses the similarity_detection placement.
This tool should also use an assignment
variable expansion. For example,
'Canvas.assignment.dueAt.iso8601'
- Create an assignment with type online upload
and select the LTI 2 tool as the plagiarism
detection provider
- Set a due date on the assignment (to test
the example variable expansion)
- Save the assignment
- Edit the assignment and monitor the LTI launch
made to the tool when the assignment edit page
is loaded
- Verify this launch includes the expanded
assignment variable you added
Change-Id: Ia57e0bc94889557c7dcdbd4ed864cbd8ce9b89eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249138
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Fixes INTEROP-6260
Right now LTI 1.3 assignment launches will fail in the
following scenario:
There are duplicate LTI 1.3 tools in the context: Tools A and B
- An assignment was created with Tool A
- The assignment was modified to use Tool B
This scenario is a legitimate situation that could occur
when an institution is upgrading an installed tool and want
to test that things work before uinstalling the old tool.
The solution here was to remove the check that required the
tool on the resource link record to match the currently
configured tool (See g/170818).
Also note the message of that commit correctly indicated that
this check was "...almost certainly incorrect
long-term behavior" (although it made sense at the time
it was added)
Test Plan:
- Install an LTI 1.3 tool and configure it with an assignment
- Install a duplicate LTI 1.3 tool
- Edit the assignment to point to the duplicate tool
- Validate that the assignment still launches and that
AGS can be used from the duplicate tool
Change-Id: If1be3894b26a7cb845a8f70ca5e030c917467f0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250017
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
When an iframe or other certain attributes are selected in the rce,
we disable the content insertion toolbar items (like linking, media,
etc). This change also disables the associated items in the menubar.
flag=rce_enhancements
fixes LS-1442
Test plan:
- Open up an RCE
- Add an iframe to the content
- Click on the iframe
- Expect the 4 content insertion buttons in the toolbar to be
disabled (done in previous commit)
- In the insert menu, expect the submenu items under Link, Image,
Media, and Document to all be disabled
Change-Id: I400ba05ac9f5a92f9ce055194a8d244bc962bc8a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250021
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
This allows schools to lock down a user's ability to change their
pronoun within Canvas.
Fixes VICE-837
flag=none
TEST PLAN:
- As an admin navigate to the account settings
- Enable personal pronouns and note the additional check box to allow
users to change their pronouns in Canvas
- With it enabled navigate to a users settings and attempt to edit their
settings
- Note that you should be able to change the user's pronoun
- Disable the setting on the account attempt to edit a users settings
again
- Note that the dropdown should be disabled and you shouldn't be able to
change the user's pronoun
Change-Id: I7d7d454e1b5df9a0afa2b39768159a86910cb7d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249883
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
test plan
- delete a course group_category
- go to /courses/:id/undelete
- it should have the group_category listed
- hit undelete to the group_category
- it should restore the group_category
- repeat for an individual group
fixes VICE-901
flag=none
Change-Id: Ia47ac829d2227bbb4c26f34c3f3cd6aa2c1638c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250061
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
We need to be able to both query for and update the users
`send_observed_names_in_notifications` preference through graphql. We
also need to update the front end UI to display the toggle when viewing
your account notification preferences.
fixes VICE-904
fixes VICE-881
flag=notification_update_account_ui
TEST PLAN:
- Create a course and add an observer to it
- Ensure the notification_update_account_ui flag is enabled on your
local site admin
- As the observer navigate to /profile/communication
- Note that there should be a toggle for showing name of observed
students in notifications
- Enable the toggle and then refresh the page and note that the change
should still be present
- As a non observer user navigate to /profile/communication and note
that the toggle is not present
- As any user navigate to a courses notification preferences page and
note that the toggle should not be present
Change-Id: I77e1b46f3e928364b0e33e91957f356f2a3e2edb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249643
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Ben Nelson <bnelson@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
as long as it's < 16k (some course designers embed base64 encoded
png images in their 2MB svgs. we don't want those)
closes LS-1522
flag=none
test plan:
- upload an svg file
- find it in the files page
> expect it to have itself as its thumbnail
- upload a giant svg file
> expect it to have a vanilla icon instead of its thumbnail
Change-Id: I4ad26e67c1b7dfbc2a38fa2182a6fa18d233f27e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249403
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
We're adding a custom variable substitution that returns a string of
observee's (students) SIS ids for the current user (observer), in the
context of the current course for LTI toll launches.
closes INTEROP-5940
flag=none
test-plan:
* Have an LTI tool installed in your local Canvas at a course
level that uses the new custom variable.
* Ensure that your current user is enrolled in at least section
in the course the tool is installed in.
* Launch the tool and ensure that under the custom claims you see
the observee ids variable expanded to an array that matches the
students your current user is linked in the current course.
Change-Id: Ib9d019411b991646633a4c3b7bc33ac159635379
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249646
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: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
As of Edge 79 (Chromium Edge), Feature Policy is enabled requiring
the use of * to enable that feature in all browsing contexts
(iframes) regardless of their origin.
Test Plan:
1. Use Edge 79 or greater
2. Navigate to a Studio LTI placement
3. Click on the 'Record' menu in the upper right corner
4. Click on 'Webcam Capture'
4. A prompt should display asking the user to accept webcam &
microphone permissions
5. Upon acceptance of permissions, webcam capture modal displays
a live view of your webcam
Change-Id: Ie2b32915bfeefebe976cba2e753c603d06c9c90f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249717
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Balint Kartyas <balint.kartyas@instructure.com>
Reviewed-by: Andras Nemeth <andras.nemeth@instructure.com>
QA-Review: John Koropchak <jkoropchak@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
flag=none
Fixes LS-1394
Test Plan:
- passes with several iterations of Jenkins
Change-Id: Ia6ea84ae40cb484088a1bcf00aa1d949162fa12e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250003
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
Normally submissions are created in raw SQL so the after_create hook is
not fired but there are some cases where this is not the case: in these
weird edge cases, submission_created is also fired when we create
Submission records with ActiveRecord so the after_create hooks fire. We
don't understand exactly what they are but they are a very small
proportion (about 0.15% of total submission_created events) and no one
cares about them.
This also adds "workflow_state" to the event body, and DRYs up some
specs.
closes INTEROP-6224
flag=none
Test plan:
- Run canvas with the environment variable STUB_LIVE_EVENTS_KINESIS=1
e.g.:
dcr -e STUB_LIVE_EVENTS_KINESIS=1 -u 0 web \
bundle exec rails server --binding='0.0.0.0' -p 80
- create assignments and make submissions for students in the following
ways, making sure the submission_created event is emitted (it will
be in the Canvas STDOUT, you might have to search for it) only when the
student (or API call in some cases) submits or resubmits:
- Student submits through UI.
- Student re-submits through UI.
- Done through API (?) Something like
/api/v1/courses/123/assignments/12345/submissions/1234 ?
- Grade passback (?)
- AGS (?)
- Make sure a submission_created event has the "workflow_state" in it.
- In a console, create a Submission with Submission.create! in a
unt push gerrit
submitted state and make sure the event does not fire.
- In a console, create a Submission with Submission.create! in a
submitted state and make sure the event does fire (you must provide
workflow_state: submitted, and a submission_type such as
online_text_entry)
Change-Id: I92b1c595282bf498557b7e52660547cc624795ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249769
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Product-Review: Oxana Jurosevic
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
* this only occurs if the AGS is used before a tool is launched
* and uses the same just-in-time fixup from the assignment
* another commit will address this same issue but for the index action
* no other actions need this fixup, since they all require a line item
closes INTEROP-6163
flag=none
test plan:
* install a new configuration of the LTI 1.3 test tool locally, with
the assignment_selection placement included
* copy that ContextExternalTool using `tool.clone` in a Rails console
* rename that tool to something like `Fake 1.1 tool`, and edit the text
in the assignment_selection placement to match
* create an assignment that launches that fake 1.1 tool
* in a Rails console, edit that fake 1.1 tool:
* `tool.settings[:use_1_3] = false`
* `tool.developer_key_id = nil`
* and remove the line item and resource link created:
* `Lti::LineItem.last.delete`
* `Lti::ResourceLink.last.delete`
* edit the assignment to now launch the new 1.3 tool from the first step
* DO NOT LET THE ASSIGNMENT LOAD OR LAUNCH THE TOOL!!
* once you click save immediately click to a different page
* get an LTI access token
* in the `lti-1.3-test-tool` repo, run:
* dcr web rake jwt:access_token['https://canvas.instructure.com',3,5,'all']
* where 3 is the credential id, and 5 is the platform id (these are
models from the tool itself)
* the token is the JWT returned
* make a request to the LineItemsController in the AGS
* get the Assignment's lti_context_id
```
curl -H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-X POST \
-d '{"scoreMaximum":2, "label":"test","resourceLinkId":"<lti_id>"}' \
http://canvas.docker/api/lti/courses/1/line_items
```
* this call should not error
* once it completes, there should be a new Lti::LineItem with a matching
assignment_id
* and a new Lti::ResourceLink with a resource_link_id that matches the
assignment's lti_context_id
* the assignment should launch properly
Change-Id: I0315dc5b1ede7ad3c37c81ec1b75cad1db693657
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248329
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
test plan:
- set up a blueprint course and associated course
- perform a sync
- the sync history in the blueprint course's sidebar should show
"X changes pushed by (name of user)"
- the blueprint information in the associated course's settings
should also show the name of the user who performed the last sync
flag = none
closes LS-1263
Change-Id: Iee4e2326d773a72d109566291a873c922108e173
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249760
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
fixes FOO-1029
flag=none
test plan:
- create a cross-shard user observer
- try to delete the link
- it should work
Change-Id: I15e4830a31e9dd29915cac1765342ec41877a4f0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249952
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>