Commit Graph

570 Commits

Author SHA1 Message Date
Wagner Gonçalves 74238bfb96 fix editor guard and availability
Unify EDITOR_CONTENTS_GUARD and EDITOR_SELECTION_GUARD into EDITOR_GUARD
and add the correct availability to these variables in the expansion
plugin.

closes INTEROP-6679
flags=none

test-plan:
* after runing the  script/generate_lti_variable_substitution_markdown
  the doc/api/tools_variable_substitutions.md file should not be changed.
* generate the doc api again rake doc:api
* access the doc api documentation (http://canvas.docker/doc/api/) and
  check if availability of the variables com.instructure.Editor.contents
  and com.instructure.Editor.selection are correct;

Change-Id: Ib0a28a5c66f226f967139712799120290e4db4e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262250
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-04-05 17:35:35 +00:00
Xander Moffatt 811a1194ca launch LTI tool in new tab or popup if requested
refs INTEROP-6636
flag=none

* open new tab/window or a popup window depending on the message
the tool sends
* include new data from the tool like placement (so that deep linking
launches work), type of window, and width/height of popup
* keep a reference to opened window and close it when the dialog that
opened it also closes
* send postMessages to window.opener if present, instead of
window.parent - helps with tabs/popups opened by the page
* include the canvas placement in the LTI 1.3 launch token, in the
custom claims section - this is required so that the tool can pass it
in the full window launch request, so that Canvas knows whether it
should use a normal launch or a deep linking launch

test plan:
* make sure associated commits for the test tool and safari gem are
checked out and set up, see the test plan for those
* in safari, create a new assignment of type external tool
* choose the test tool from the list of tools
* it should tell you that it needs to open in a popup
* click the button and a popup should open (note: you should not have
Safari in fullscreen mode which is a bummer)
* you should click submit on that form to return a resource link
* the popup should close and the external tool dialog should have a
url in it, like normal

Change-Id: I46dc47cca7f26140041b6a638a8056a7cc0843db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261771
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2021-04-05 16:46:53 +00:00
Cody Cutrer 486506f240 add frozen_string_literal comment to doc generators
Change-Id: Ib5a2c993e27ab262efed98c3c620e7a239c9fd1f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261816
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-03-30 17:51:40 +00:00
Wagner Gonçalves 8561eecca3 add new custom variables
Add Canvas.assignment.submission.studentAttempts and
Canvas.assignment.allowedAttempts variables.

Fix `GAURD` typo.

closes INTEROP-6590
flag=none

test-plan:
* Have a course recorded;
* Have a student enrolled to this course;
* Enable `Assignment Allowed Attempts` in the course features options;
* Create an Assignment with online submission and fill the `Number of
  Attempts`;
* Logged as student, you should be able to submit your homework until
  the max allowed attempts;
* Change the assignment submission type to external tool, you ca use
  the LTI  test tool, in the custom params field fill the new custom
  variables:

  {
    "allowed_attempts": "$Canvas.assignment.allowedAttempts",
    "student_attempts": "$Canvas.assignment.submission.studentAttempts"
  }

* Launch the tool as a student, you should be able to see the two new
  variables expanded;
* Launch the tool as a teacher, you should be able to see only the
  allowed attempts variable expanded;

Change-Id: I23a5d38f69a94279a2e73d169e1e274659dc5d0f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261699
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2021-03-30 16:28:38 +00:00
Weston Dransfield fc879f9b58 Add LTI launch index to LTI manual docs
flag=none

Test Plan:
Verify new documentation's links work correctly.
Verify the documentation is free of grammatical errors.

Change-Id: I54ab36dbe846353cee848f9e31c32bf647fb575c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261062
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
2021-03-22 14:32:24 +00:00
Weston Dransfield 51dd48ebcc Add very general notes on implementation
Also added shell files that I needed to
link to. I'll be filling out those files
in detail in later commits.

flag=none

TODO: add ticket
Change-Id: I44580b0734a63c93c54f5526770523639124de77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260860
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2021-03-18 19:26:42 +00:00
Rob Orton a811654948 update sis documentation don't recommend bad stuff
test plan
 - rake doc:api should work

fixes VICE-1219
flag = none

Change-Id: I701f2abb662857bb4ce6da1849e2dac52327d146
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260580
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2021-03-15 20:09:16 +00:00
Weston Dransfield 67cbc6c448 Add collaboration DL extension with support for1.3 IDs
Closes INTEROP-6601
flag=none

Test Plan:
1. Install the 1.3 example tool in a course
   with the collaborations placement configured
2. Launch the tool from the collaborations
   placement and return an LTI Resource Link.
   In the test tool UI, also specify a combination
   of user `lti_ids` and group `lti_context_ids`
   from the course
3. Verify a collaboration is created in Canvas that,
   when clicked on, launches the tool.
4. Verify the collaboration is only available to
   users who were explicitly specified or part of
   a group from step 2

Change-Id: Icdd4a1363940a27397b93b9405d2b8878eb784c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260573
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
QA-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2021-03-15 15:36:02 +00:00
Weston Dransfield e6b8a13fc1 Document support for deep linking types
Closes INTEROP-6324
flag=none

Test Plan
- run the doc:api rake task
- navigate to /doc/api/file.content_item.html
- verify new documentation is clear
- verify all new links work

Change-Id: I5ffe5981a5a88db5ee7846d708a78c9c73d8c700
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259786
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
2021-03-04 19:58:15 +00:00
Xander Moffatt 0468c990ec begin writing all manner of LTI docs
* hackweek project
* link to all relevant code

Change-Id: I363526e61e80ae0987219bc5d98cf7902bbb32fd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259659
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: Xander Moffatt <xmoffatt@instructure.com>
2021-03-04 02:35:16 +00:00
Michael Ziwisky c580c9b474 add passive (`prompt=none`) option for oauth
fixes FOO-1562
flag=none

test plan:
 - set up a trusted developer key with a Redirect URI of
   "https://example.com" and client_id of "some_test_client"
 - without being logged in to Canvas, use that key to ask for an oauth2
   login with `prompt=none`, e.g.:
     GET https://<canvas>/login/oauth2/auth?client_id=some_test_client&response_type=code&redirect_uri=https://example.com/oauth_complete&state=XXX&prompt=none
 - you should get a 302 response with a Location like
   "https://example.com/oauth_complete?error=login_required"
 - now log in to Canvas and issue that request again along with your
   session cookie.
 - you should get a 302 response with a Location like
   "https://example.com/oauth_complete?code=<...?&state=XXX"

Change-Id: I00531768dc7570211b6c195cbcd5b367adfaf6ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258310
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
2021-02-10 21:31:48 +00:00
Weston Dransfield a9a4c47ece Always use primary DB when doing LTI assignment fixups
Closes INTEROP-6442
flag=none

With LTI 1.1 -> 1.3 upgrade path, we do a "just in time"
fixup of LTI 1.1 assignments by adding an Lti::ResourceLink
and the default LineItem when the assignment is shown.

The assignment show action wraps this code in a read-only
transaction, which causes issues when we attempt to create
the needed records.

This change ensures Canvas uses the primary DB when creating
the required records.

Test Plan:
- Set up a Canvas secondary user
- Create an LTI 1.3 assignment
- In the rails console, delete the assignment's resource link and
  line items:
  ```
  <assignment>.primary_resource_link.delete
  <assignment>.line_items.delete_all
  ```
- Navigate to the assignment and verify the tool launch
  occurs properly
- Verify a new line item and resource link were created for
  the assignment

Change-Id: I8acaa094bd43ea5fb4fc44f1011b7673665b635e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258373
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2021-02-09 21:08:14 +00:00
Matthew Buckett d6885896ed Courses can also be looked up by the integrationID
You can lookup courses by an integration ID with a URL like this:

https://instance.instructure.com/api/v1/courses/sis_integration_id:test-int-123

Closes: gh-1598

Test plan:
 - Specs pass

flag=none

Change-Id: Ia8a135d4f6469c56f38d28866a17f5e2cd4d587d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258250
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
2021-02-05 16:12:37 +00:00
Mysti Lilla aafb10036b Move doc changes to the correct file
refs INTEROP-6390
flag=none

Test plan
- Run rake doc:api and ensure
  nothing changes in the doc/api/tools_
  variable_substitutions.md file
- Ensure the docs show correctly
  for what is expected from
  g/256656

Change-Id: I140020b6e713cbc6aa510c78901072f73740d2c6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257876
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: Mysti Lilla <mysti@instructure.com>
2021-02-01 21:54:55 +00:00
Aaron Ogata 2d080018da fix JS job sanity around COVERAGE var
refs DE-462

Change-Id: Ie5bce0bdf0e7a16eb9424813abd49000d5d819d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257532
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-01-27 16:24:14 +00:00
Weston Dransfield 4a21505e19 Use "https" in client assertion example
flag=none

Test Plan:
The oauth_endpoints API documentation now
shows "https" in the client assertion
aud claim.

Change-Id: I98e9bba169836f89b3334e4106b289613ff7dc08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257172
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2021-01-22 15:46:20 +00:00
Michael Ziwisky b01f82def8 rails 6 spec error formatter fix, plus docs
refs FOO-1426
flag=none

test plan:
 - run some selenium specs that are currently failing under rails 6,
   e.g. spec/selenium/login_logout_spec.rb, with `--options
   spec/spec.opts` as outlined in the new docs. after starting up the
   chrome selenium container (see the section of the docs preceding what
   is added here), the full command is:

   docker-compose run --rm -e CANVAS_RAILS6_0=1 web bundle exec rspec \
     --options spec/spec.opts spec/selenium/login_logout_spec.rb

   which, if you haven't run rails 6 specs lately, you'll probably find
   needs to be preceded by:

   docker-compose run --rm -e CANVAS_RAILS6_0=1 web bundle install

 - follow the docs to pull the `spec_failures` out of the container and
   verify that it exists with HTML formatted error reports

Change-Id: I52b39372f65ad76b859076af980133efe790bd45
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256737
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-21 17:07:41 +00:00
Matthew Buckett 91ee30c6a9 Add support for expanding the Course Integration ID
When performing a LTI launch this allows the course
integration ID be expanded in the custom data that is made available in an LTI launch.

Closes INTEROP-6480
Closes GH-1606

flag = none
test plan:
 - specs pass

Change-Id: I5a21eab4f02f5da1f45f714d265903d5615bce6c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256921
Reviewed-by: Weston Dransfield <wdransfield@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-01-19 21:17:02 +00:00
Mysti Lilla 95fad766ff Truncate recursively_fetch_previous_lti_context_ids at 1000
fixes INTEROP-6390
flag=none

Test plan
- Perhaps best to test this on test with one of the
  problematic courses...
- But I guess set it up with a smaller number of
  courses and ensure it still looks correct

Change-Id: Ibb7d1716451c11146bc3069d4e5b0ac24a35be1f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256656
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2021-01-14 22:52:34 +00:00
Bryan Petty 3940d4690a minor linux docker development tweaks
This adds an additional check in the git install_hooks script to see if
the hook is already set as executable before attempting to chmod it. So
if it's already setup manually, or outside of Docker first, and file
write permission hasn't been granted to Docker, it doesn't fail even
though it's already done.

This also adds a new environment variable:
- CANVAS_SKIP_DOCKER_USERMOD: If defined, the Docker image build
  disables the inefficient usermod functionality, even if you're running
  Linux, the same way it does everywhere else. You would want to use
  this if you have solved Docker bind-mounted filesystem permissions
  another way.

flag=none

Test Plan:
- On Linux, export CANVAS_SKIP_DOCKER_USERMOD=1;
- ./script/docker_dev_setup.sh
- Verify app containers still run with "docker" user as UID 9999.
- Verify no changes on OSX.

Change-Id: I5bdb4ce21e9a41dec2bb99d4284ac73a067f5899
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256275
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
2021-01-13 18:48:08 +00:00
Jeff Largent d7746403e8 Support running against headless chrome, fix flakey spec
Adds the ability to easily run Selenium tests locally against headless
chrome by adding `headless` and `window_size` config properties to
`selenium.yml`. Helpful when re-running specs many times to check for
flakiness.

Also attempts to improve the reliability of the new RCE course/link
options Selenium spec by adding an explicit wait for the course links
tray to appear and reducing the number of repetitions.

fixes LS-1744
flag = rce_enhancements

Test plan:
  - Ensure that running Selenium specs against regular chrome still
    works (aka without any config changes)
  - Add `headless: true` and `window_size: "1237,974"` (or similar) to
    `selenium.yml` and ensure specs pass the same way
  - Spec reliably passes the flakey_spec_catcher!

Change-Id: I3957ded0a431f19e620848b260e7f7d54da07bf6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256351
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
Product-Review: Jeff Largent <jeff.largent@instructure.com>
2021-01-12 16:27:14 +00:00
Michael Ziwisky d39b927c3a update JS testing docs
flag=none

this commit also removes the phantomjs docker-compose service which has
been broken for years, ever since PhantomJS was removed from
karma.conf.js in https://gerrit.instructure.com/c/canvas-lms/+/102169

test plan:
 - follow the docs to ensure you can run a targeted JS test in docker

Change-Id: Ifa1647897a7a9605e097aeaf89e718c167d379fc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256179
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2021-01-06 22:47:53 +00:00
James Butters 1df82228af update docker documentation
closes: DE-438
flag = none

Test Plan:
-Jenkins passes
- following steps in documents results in successful
  docker dev environment

Change-Id: Iedb37b244f5da56568c8f8b29c397bfb271b83e8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255730
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-01-06 18:29:18 +00:00
Ryan Hawkins 1d1a28575f Update Live Events docs
Updated the Live Events documentation to emphasize that customers should
mainly use Live Events for analytics and data collection apps, and not
for real-time data. In addition, did some small reorganizing and
revising.

closes INTEROP-6357

flag = none

test-plan:
none

Change-Id: If8e10002320dcf2568bdc557e09df1e8147e7367
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255372
Product-Review: Karl Lloyd <karl@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
QA-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
2021-01-04 20:10:32 +00:00
Wagner Gonçalves 4d661df4f4 fix the api docs generation
Every time that we run `rake canvas:compile_assets` task, the file
data_service_canvas_logged.md changes, where the brake line is removed
from the body attribute.

This behavior does not occurs while using  the `rake doc:api` task.

After some investigation, we notice that to solve this issue we need to:
* load the json initializer (config/initializers/json) at the `doc:api` task;
* format the JSON file properly;
* fix the data_service_canvas_logged.md file to the correct version;

closes INTEROP-6346
flag=none

test plan:
* checkout this patch;
* run rake canvas:compile_assets and check that the file
data_service_canvas_logged.md doesn't change anymore;
* run rake doc:api and check that the file
data_service_canvas_logged.md doesn't change anymore;

Change-Id: I8cb1e3cb5d9527205827fa25b74e6da3319f65ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253036
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
2020-11-18 22:03:23 +00:00
Michael Brewer-Davis 19589805a1 update derived docs for mastery scales
flag=none
refs OUT-4078

Test plan:
CR

Change-Id: I3b7cd2cbaaacbd704ed179c5b2b8c1074491e23f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253112
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-11-18 19:54:20 +00:00
Michael Brewer-Davis a7bff4f5cb update mastery scales language
closes OUT-4078
flags=account_level_mastery_scales

Test plan:
- verify mastery scales language used in permissions
  and feature flag settings

Change-Id: Ib3c508e6a56c67c184240f831cf2ad112c023e59
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253030
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Jody Sailor
2020-11-18 17:14:27 +00:00
Mysti Lilla 4a59772e65 Update plagiarism docs for new subscription model
flag=none

Test plan
- N/A

Change-Id: Ia4b91ec3fa6d64033c985b107a6948b8868fc17b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252315
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2020-11-17 19:39:30 +00:00
Wagner Gonçalves 8ed7e117bc provide data service documentation at Canvas API docs
We're moving the Data Sevice documentation to Canvas.

closes INTEROP-5390
flag=none

test plan:
* Access canvas documentation endpoint like $HOST/doc/api/index.html
* Scroll down the page until `Data Services` section and check:
  * All links is working properly;
  * All page information is in according to the original;
  * The below structure is correctly rendered:
-> Data Services
--> Live Events
---> Overview
----> Setup
----> Metadata
---> Event Format
----> Canvas
----> Account
----> Asset
----> Assignment
----> Attachment
----> Content
----> Conversation
----> Course
----> Discussion
----> Enrollment
----> Grade
----> Group
----> Learning
----> Logged
----> Module
----> Plagiarism
----> Quiz
----> Sis
----> Submission
----> Syllabus
----> User
----> Wiki
---> Caliper IMS 1.1
----> Assessment
----> Basic
----> Forum
----> Grading
----> Navigation Events
----> Session

Change-Id: I05516e49122a44d0f979c42a6209834356f7822b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252407
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Oxana Jurosevic
2020-11-13 18:25:54 +00:00
Wagner Gonçalves 797058c228 Add custom variable Context.id.history
We're  adding a new custom variable substitution that returns a string
with a comma-separeted list of course ids in reverse chronological order
from which content has been copied related to the current course.

Requesting partners: (Aug2020: Cengage, Sep2020: Google)

closes INTEROP-6145
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 course ids variable expanded to a string that matches the ids where
the content of the current course was copied for.

Change-Id: Ie8fcabf4303f73cd647325a12b5f92974cdde511
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250268
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2020-11-10 17:07:34 +00:00
Rob Orton 394f9501fd don't include group info when none exist
test plan
 - create a new group category in a course
 - run an export from the import page link
 - the group_id and group_canvas_id columns will not exist

fixes VICE-969
flag=none

Change-Id: Idd16c07ada0487c2ab0a65506d1195c39d369b5c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249921
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2020-11-05 17:35:29 +00:00
Rob Orton 6bdb14b887 allow deleting pronouns via sis import
test plan
 - specs should pass
 - run sis import with <delete> as the pronoun
 - it should remove the users pronoun
 - rake doc:api should work

fixes VICE-955

Change-Id: I2112b785641148a5a3edfe5313ab067ef47005e2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251672
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>
2020-11-03 17:58:32 +00:00
Rob Orton 02bf0ae6b8 doc: deleted_last_completed function in sis import
test plan
 - rake doc:api should work

refs FOO-1153
flag=none

Change-Id: I58c54b526ece711f435d74e8b3275cb22084db76
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251560
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2020-10-30 20:26:31 +00:00
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:49:50 +00:00
Wagner Gonçalves f907d70909 Add custom variable com.instructure.Observee.sisIds
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>
2020-10-14 19:23:15 +00:00
Ben Nelson aa8070be39 fix typo in group csv import docs
see: https://share.getcloudapp.com/E0urqBJX for the problem

Test Plan:
 - QA/CR

closes N/A
flag=import_groups_by_csv

Change-Id: Ib88d85a92ec0ae9ca5800f23762b73c8f141ec0d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249534
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>
2020-10-07 20:40:32 +00:00
Matthew Lemon 2218a88303 add api for group category import
fixes VICE-814
flag=none

TEST PLAN
- make sure your jobs are running
  script/delayed_job run (run this in your canvas-lms repo)
- Create a csv as per the specifications in
  doc/api/group_category_csv.md
- As a teacher in a course navigate to the groups page and create a new
  group set
- In the group set use the import option to upload the csv
- Behold the wonder that is creating groups through csv upload

- Optionally you can also just use the API to create the groups by doing
  something like the following:
  curl -F attachment=@<filename> -H "Authorization: Bearer <token>" \
         'https://<canvas>/api/v1/group_categories/<category_id>/import'

Change-Id: I47a364c1f0132aef59dd61a815142f94d9cce4f6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248580
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: Matthew Lemon <mlemon@instructure.com>
2020-10-07 18:21:45 +00:00
wdransfield 8d7fe61829 Correct a few mislabeled items in LTI 1.3 introduction
flag=none

Test Plan:
- Run the `doc:api` rake task
- Navigate to /doc/api/file.lti_dev_key_config.html
- Verify the page loads with the corrected terms

Change-Id: I1ecc43bfa90e4b6f2349c31a15cad28480f6dbea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247864
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2020-10-05 15:52:28 +00:00
Rob Orton 968347af50 import all pronouns
SIS is considered source of truth, and sis may change pronouns and don't
want to manage a second list of accepted pronouns

test plan
 - run sis import with pronoun
 - it should add it even when not in account list

fixes VICE-838
flag = none

Change-Id: I51804ac73c8a1934d5c135c736de0a3dfa6131b2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248782
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-09-30 18:55:57 +00:00
Taiwo Ayanleye 135d1bc911 Update getting_docker.md
Test plan:
 - Specs Pass

closes CNVS-50088
closes GH-1633
flag = none

Change-Id: Ib53106edf48d09e93eceacdc2ffa326579dbbb58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246747
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
2020-09-02 03:31:49 +00:00
Erin Hallmark 7cc380a23b fix URLs in variable substitution files
Then we don't all keep getting tools_variable_substitutions.md
shown as checked out all the time.

CLOSES: DOC-1235
flag=none

Test plan:
- jenkins passes

Change-Id: If5a093ed006a534262ba48138013acc4e769491b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245638
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-08-21 17:06:10 +00:00
Ryan Hawkins 9049e62a35 Add custom variable com.instructure.User.sectionNames
In response to a partner request, added a custom variable substitution
that returns an array of section names for the current user, in the
context of the current course for LTI tool launches.
Note that because of the way enrollment information is stored, if a
user launches a tool and is enrolled in
multiple sections in a course (which is common for teachers), then there is
no way to determine which specific section the launch occurred in.

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 sectionNames variable expanded to an array that matches the
section(s) your current user is enrolled in in the current course.
* Ideally, you should test with a user in one section and in multiple
sections in the current course.

closes INTEROP-4701

flag=none

Change-Id: I58793a3e21d046f965af3983e5361b5a303416c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244645
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2020-08-19 17:17:59 +00:00
Tony Narlock dbcf270599 Fix small typo in docs
closes GH-1664
flag=none

Change-Id: Icc5ab90727dfbc95edce45992b5b1f93f6e5f823
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245471
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: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2020-08-19 15:53:46 +00:00
Mysti Lilla 0073128b5e Remove wording about removed feature flag
closes INTEROP-5800
flag=none

Test plan
- Compile the docs and make sure they
  don't reference the feature flag
  and that they make sense and work

Change-Id: Idb4bc32f01d2cc2a0180f730a13cec58e60473cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244917
Product-Review: Erin Hallmark <erin@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
2020-08-17 18:26:33 +00:00
Jacob Fugal 2b3886c5f4 extend client_credentials oauth2 grants for CD2
refs SAS-1540

* adds an audience setting to developer keys, so a key can be set to
  target external audiences with its credentials grants
* when a key with an external audience grants credentials, the token is
  signed with an asymmetric key instead of the internal symmetric key
* external audiences can retrieve the corresponding public keys from
  /login/oauth2/jwks
* credentials issued by developer keys with an account id include the
  account's guid in a custom claim

includes a refactor of key storage and rotation in consul, which had
already been done for LTI. but it wasn't really a feature of lti, just
something used by LTI, and we needed the same for key management for
this. moved it to be part of Canvas::Security

Change-Id: Ie5c0fcee6fc21687f31c109389a3bcc1ed349c5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243606
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2020-08-13 18:52:47 +00:00
Erin Hallmark 9be2ff569e Update community urls to reflect platform move
The Canvas Community moved to a new platform and links were affected.
Updated links in the UI to reflect new URLs so customers have them
instead of having to rely on redirects.

CLOSES: FOO-852
flag=none

Test plan:
- jenkins passes
- links work

Change-Id: I4bad04dbd550d24c48a4aac54fb3c5a547947e7d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244878
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: Erin Hallmark <erin@instructure.com>
2020-08-12 20:17:02 +00:00
Ryan Hawkins d72c3c34a1 Use LTI 1.3 lti_id for observees custom field
Previously, when any LTI tool, regardless of version, used the
custom field `com.instructure.User.observees`, a comma separated
list that contained the LTI 1.1 lti_user_id of all the students
the current user was observing in the current context was returned.
Now, if the tool being launched uses LTI 1.3, that list now
uses the lti_id of the students the current user is observing
in the current context instead.

fixes INTEROP-5991

flag = none

test-plan:
* Have an LTI 1.3 and 1.1 tool installed, both of which use the
  `com.instructure.User.observees` custom field.
* Have a user with an observer in the current context (typically
  a course)
* As the observer, launch both tools.
* For the LTI 1.3 tool, verify that the list of students the
  observer is observing matches the students' lti_id's.
* For the LTI 1.1 tool, verify that the list of students the
  observer is observing matches the students' lti_user_ids.
  This can be verified (and is calculated) using
  Lti::Asset.opaque_identifier_for(<your_user>)

Change-Id: I59117f567d1c0548f9e38eaba9cc2f097d59adb7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243314
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: Weston Dransfield <wdransfield@instructure.com>
2020-08-04 02:41:04 +00:00
Xander Moffatt 4e1a804b9f bump all docker-compose files to 2.3
refs DE-153
flag=none

test plan
* `dc up` works

Change-Id: I9e087a2c4c82a8dffd2fdb628cb9c9d45192ffa5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243673
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2020-07-28 20:44:44 +00:00
Simon Williams 48e808e63b doc: update docs for new ldb variable substitution
related to ac18b746bc

Change-Id: Id8f31031a3086dae13fa3c8fff9aaec037e686ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242772
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Han Yan <hyan@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-07-16 16:04:11 +00:00
August Thornton 8f00d2cdc8 add ability to send notifications for SIS batch enrollment
This change allows us to trigger course enrollment notifications
via the SIS enrollment batch importer. The default will be to not
broadcast the notifications unless the optional param is included
and set to *true*. We only send out one notification as to avoid
spam or duplicates in case of re-upload or a failed import.

closes FOO-652
flag = none

test plan:
 * create a new course and have an existing user to work with
 * ensure the communication channel for that user is verified
 * create an enrollments.csv with the required fields and omit
   the optional field `notify`
 * navigate to `/accounts/self/sis_import`
 * import the .csv from above
 * verify no notification is sent via MailCatcher or
   `/users/:id/messages` for the SIS user
 * add the `notify` header field to the same .csv with a value
   of `true` for the particular user enrollment
 * import the .csv and verify an email *was* sent
 * delete the newly added course enrollment for that user
 * import the same .csv and verify we don't send another enrollment
   notification for that user
 * ensure no documentation errors found for /doc/api/file.sis_csv.html
   with the newly added optional field name _notify_

Change-Id: Ibddb11bce765b3830370bc07219e34e5ec982f5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241370
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2020-07-09 18:41:12 +00:00