Commit Graph

313 Commits

Author SHA1 Message Date
James Williams ee66d9ab45 add file_index_menu LTI placement
test plan:
* configure a tool with a file_index_menu placement
 (similar to the wiki_index_menu type)
* enable the "Import Commons Favorites" feature
* should launch the tool though a cog dropdown
 in the header of the files page into a tray
* closing the tray after a message has been posted
 should cause the page to refresh

flag=commons_favorites
closes #LA-290

Change-Id: I9e825401fd66734da6269c62054578ccd443a4f6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218501
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
2019-12-02 22:18:07 +00:00
James Williams 61b0ebaf7b prefer array for available_canvas_resources variable
test plan:
* launching a tool with the
 module_index_menu and assignment_index_menu placements
 should return an array of hashes for the
 com_instructure_course_available_canvas_resources
 variable, as described in the documentation

refs #LA-75

Change-Id: I2c81ca611a60dfdc67d62823b35319353c4d846d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218693
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-11-27 13:09:19 +00:00
James Williams e86340a938 add assignment_group_menu LTI placement
test plan:
* configure a tool with a
 assignment_group_menu placement
 (similar to the assignment_index_menu type)
* enable the "Import Commons Favorites" feature
* should launch the tool though a cog dropdown
 for a specific assignment group into a tray
* the selected resources posted to the tool
 should only list the one assignment group you selected
* closing the tray after a message has been posted
 should cause the page to refresh

flag=commons_favorites
closes #LA-287

Change-Id: I65c38b87a863c25a45c55eae55c87994b5471632
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218306
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-11-27 13:09:07 +00:00
James Williams ba7f83d080 encode available_canvas_resources variable as JSON
test plan:
* testing with the new index placement tools
 on the assignments/modules page should send
 the available canvas resources encoded
 as a JSON string so the oauth signature works

Change-Id: I329c819a17ca70b84a5d165964246af6e635dacb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218523
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-11-25 20:27:16 +00:00
James Williams 16db63993d add module_group_menu LTI placement
test plan:
* configure a tool with a
 module_group_menu placement
 (similar to the module_index_menu type)
* enable the "Import Commons Favorites" feature
* should launch the tool though a cog dropdown
 for a specific module into a tray
* the selected resources posted to the tool
 should only list the one module you selected
* closing the tray after a message has been posted
 should cause the page to refresh

flag=commons_favorites
closes #LA-286

Change-Id: Idbaa746fc98d4ac4097da8488b7120a6acedc23f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218212
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-11-22 21:05:22 +00:00
James Williams a742e450eb add discussion_topic_index_menu LTI placement
test plan:
* configure a tool with a
 discussion_topic_index_menu placement
 (similar to the wiki_index_menu type)
* enable the "Import Commons Favorites" feature
* should launch the tool though a cog dropdown
 in the header of the discussions page into a tray
* closing the tray after a message has been posted
 should cause the page to refresh

flag=commons_favorites
closes #LA-78 #LA-79

Change-Id: I06e5915fe899f9bfd0f66b1a52b4a4faf28b814b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-11-22 16:45:10 +00:00
James Williams b5de047912 add quiz_index_menu LTI placement
test plan:
* configure a tool with a quiz_index_menu placement
 (similar to the wiki_index_menu type)
* enable the "Import Commons Favorites" feature
* should launch the tool though a cog dropdown
 in the header of the quizzes page into a tray
* closing the tray after a message has been posted
 should cause the quizzes page to refresh

flag=commons_favorites
closes #LA-76 #LA-77

Change-Id: I2205d3a73bb0c6bd2d60992968fa28b129e0e177
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218039
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-11-22 16:45:02 +00:00
James Williams cae08c5333 add assignment_index_menu LTI placement
test plan:
* configure a tool with an assignment_index_menu placement
 (similar to the wiki_index_menu type)
* enable the "Import Commons Favorites" feature
* should launch the tool though a cog dropdown
 in the header of the assignments page into a tray
* closing the tray after a message has been posted
 should cause the assignments page to refresh

flag=commons_favorites
closes #LA-74 #LA-75

Change-Id: If2e7ec2055dd1be0706fe684b1bc617db039e70a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/217973
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-11-22 16:02:19 +00:00
Evan Battaglia ded0cc8584 Don't give LTI 1.3 tools default placements
refs PLAT-4599

Test plan:
- add an LTI 1.3 tool without the default placements (assignment selection
  and link selection) and check that they do not show up there (when
  creating an assignment, and ... wherever the link selection shows up).
  The Live Events LTI tool which you may already have installed fits the
  bill for such an LTI 1.3 tool.
- add a LTI 1 tool (such as the LTI test tool) without the default
  placements and check that they still do show up in those places.
- can anyone think of anything else to check?

Change-Id: I68cd37e2b8ed4015037354ab2609f47a2e0f8bcc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/217323
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
2019-11-20 17:02:08 +00:00
James Williams 6990a780e4 add module_index_menu LTI placement
test plan:
* configure a tool with an module_index_menu placement
 (similar to the wiki_index_menu type)
* enable the "Import Commons Favorites" feature
* should launch the tool though a cog dropdown
 in the header of the modules page into a tray
* closing the tray after a message has been posted
 should cause the modules page to refresh

flag=commons_favorites
closes #LA-71 #LA-72

Change-Id: I4ab15bf71da574482b107cbbba295cb4557f4fa8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/217828
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-11-20 13:35:24 +00:00
wdransfield 4f6b22b87e Add LTI expansion for user pronouns
Closes PLAT-5143

Test Plan:

- Install an LTI tool that uses the new
  $com.instructure.Person.pronouns variable
  expansion
- Do an LTI launch and verify the post parameter
  contains the current user's pronouns

Change-Id: I03ae80e0c6a3fe6a7ada5ce87da8cf8a97299964
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/217430
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
2019-11-18 22:43:37 +00:00
Carl Kibler f595aac161 allow LTI placement to accept content selections
refs LA-70
flag=commons_favorites

test plan:
 - Set LTI to have message_type of 'ContentItemSelectionRequest' and
   set up for wiki_index_menu
 - LTI launches successfully

Change-Id: I8da26b8dafcf80950bcb41091ad508ddd20e8839
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215861
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Mate Magyar <mmagyar@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
2019-11-05 17:45:25 +00:00
Carl Kibler ed71122c85 send parameters to wiki_index_menu LTI launch
closes ADMIN-2891
flag=none

test plan:
 - Set up new LTI Tool to accept the 4 custom parameters
 - On Pages index, trigger LTI from kabob menu
 - See the 4 new parameters are correctly sent to LTI

Change-Id: Ib3a17d2d9a5d6c5117671061a00365ca86a57d4f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/213879
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
2019-10-28 20:01:49 +00:00
Simon Williams d4a3346cea bump yard to 0.9.20
https://github.com/lsegal/yard/blob/master/CHANGELOG.md

yard 0.9.6 added functionality which parses code blocks and tries to
auto link constants to their respective yard documentation. this means
that code blocks with invalid constants cause issues, which is why we
need to properly quote strings in our code blocks.

Change-Id: I0814ebb2658935f8bd3d528515acfdb5041d1e0f
Reviewed-on: https://gerrit.instructure.com/212925
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2019-10-14 15:12:49 +00:00
Marc Phillips 1fd92a0ffa Add sis_id to memberships payload if present
closes PLAT-4891, Plat-4892

Test Plan:
 - with a membership service call see that the sis id is added
  to the payload if it exists
 - see that it also is not added if one does not exist

Change-Id: Ib9723411648b7499a8c60435a522e437646e94de
Reviewed-on: https://gerrit.instructure.com/210816
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2019-09-25 18:54:11 +00:00
Clint Furse 0a3dd07e03 add logging around tool reinstallation
closes PLAT-4725

Test Plan:
- verify the ability to still add/remove a tool, preferrable
  the plagarism platform tool
- verify that removing and adding tool logs all relavant method
  calls

Change-Id: Ia7e7f41ba0503d58faf64de7fe0d19c3ac9eaf61
Reviewed-on: https://gerrit.instructure.com/205803
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Clint Furse <cfurse@instructure.com>
2019-08-22 14:28:55 +00:00
Rob Orton 57616667df make variable expander for grade_passback_setting
fixes CORE-3215

test plan
 - have a course with grade_passback_setting
 - use gradePassbackSetting variable in lti tool
 - it should return the setting

Change-Id: I0f598c8563d9f9d40e1d1f49c483a93bbde364a0
Reviewed-on: https://gerrit.instructure.com/205841
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-21 19:57:54 +00:00
Drake Harper d766d16326 Remove feature flag for lti advantage
Fixes PLAT-4698

Test Plan:
-verify lti 1.3 and lti advantage flag is gone
-verify that all lti 1.3 features are still available/functional

Change-Id: I8be9e02fb2d32a92098bde43099ba0198e8d3329
Reviewed-on: https://gerrit.instructure.com/204381
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Tested-by: Jenkins
2019-08-14 21:21:58 +00:00
wdransfield a9103ea4ac Remove editor button default parameters
Closes PLAT-4660

Test Plan:
- Install an LTI 1 tool that uses
  com.instructure.Editor.contents and
  com.instructure.Editor.selection
- Launch the tool from an RCE that has content and
  a selection
- Verify the custom fields are sent
- Verify the custom fields are not duplicated
  in the launch without the "custom_" prefix

Change-Id: Ie77e2479f29c89ec8331f2cbf68bbdeb2de96168
Reviewed-on: https://gerrit.instructure.com/201204
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-07-16 14:30:19 +00:00
wdransfield b7fdb94a66 Add RCE variable expansions to privacy level expander
Closes PLAT-4594

Test Plan:
Add the following custom parameters to an LTI 1 tool at the
editor button placement:

com.instructure.Editor.selection
com.instructure.Editor.contents

Launch the tool from the editor button placement and verify
the first param is set to the user's current selection
in the RCE.

Verify the second param is set to the current contents
of the RCE.

Change-Id: Ib0014397ce2d7cc0cad4331a8d00d60ec8d7c0be
Reviewed-on: https://gerrit.instructure.com/197842
Tested-by: Jenkins
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
2019-06-21 16:24:27 +00:00
James Williams 6a40ee3a00 add variable expansion for hide_distribution_graphs
test plan:
* the expansion "Canvas.course.hideDistributionGraphs"
 should correspond to the course checkbox
 "Hide grade distribution graphs from students"

refs #PLYT-1826

Change-Id: I6172441ac0dfdc4a59396bade794bbfbbf74e893
Reviewed-on: https://gerrit.instructure.com/197368
Tested-by: Jenkins
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
2019-06-13 15:19:31 +00:00
Marc Phillips 07d32ec362 Add DeploymentId to Tool UI
fixes PLAT-4585

Test Plan:
 click on an installed lti 1.3 tool and see the deployment id
  button, click on it, and see the deployment id

Change-Id: I78a2e977246b4a6524427995f10cf3600b59e090
Reviewed-on: https://gerrit.instructure.com/197321
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
2019-06-12 22:35:08 +00:00
James Williams bb6bd0aeac add permissions variable expansion
also keeps it undocumented for now

test plan:
* test an lti launch in a course using a variable
 in the format:

 $Canvas.membership.permissions<permission1,permission2,..>

 with a comma-separated list in between the brackets
 corresponding to course-level permissions
 (see doc/api/roles.html#method.role_overrides.show), e.g.

 $Canvas.membership.permissions<read_forum,moderate_forum>

 these are the list of permissions to check
 when the variable is expanded it should substitute it with a
 comma-separated list of permissions filtered to those
 that the user has been granted within the course

closes #PLYT-1796

Change-Id: I1c039e04318fcfe8ca5ee450e608bd3fb2affe6b
Reviewed-on: https://gerrit.instructure.com/194797
Tested-by: Jenkins
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
2019-06-12 12:13:28 +00:00
James Williams b0c770470d add variable substitution for section restriction
test plan:
* set up a tool with the "$Canvas.course.sectionRestricted"
 LTI variable substitution
* it should correspond to whether the user was enrolled
 with "Can interact with users in their section only" checked

closes #PLYT-2349

Change-Id: I567a57927f0e5ec1b2dd34529262257f7dc9b527
Reviewed-on: https://gerrit.instructure.com/196878
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-06-10 16:35:12 +00:00
wdransfield edaf90222c Fix target link for LTI links created via deep linking
Closes PLAT-4531

Test Plan:
- install an LTI 1.3 tool that uses deep linking
  from assignment_selection
- use the tool to select a link as an external_tool
  submission type
- verify that the tool returned a url that is
  different from the base launch url on the dev key
- launch the assignment and verify the target_link_uri
  is correct in the final id_token

Change-Id: Ia773d7fdc67a510194ad9c998adb82681fbff826
Reviewed-on: https://gerrit.instructure.com/195782
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
2019-06-05 14:23:40 +00:00
Marc Phillips 273889d6f3 Remove N+1 on NRPS calls
Variable Expansion for sis_ids was causing an n+1 because
the lookup for the pseudonym didn't take into account if
the pseudonyms were preloaded.

Because of this, several other expansions would have produced
n+1s, so all known n+1 scenarios have been fixed.

fixes PLAT-4241

Test Plan:
 tests pass

Change-Id: Ib39068e8e5f1e17a0963443148438b1d16287526
Reviewed-on: https://gerrit.instructure.com/195731
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-05-30 19:04:14 +00:00
wdransfield a4737dd37d Fix tool launches after tool re-installation
Closes PLAT-4487

Test Plan
- Install a tool in a course or account
- create an external tool assignment
  associated with the tool
- create a module item associated with
  the tool
- uninstall the tool
- verify the launches fail for both
  the module item and assignment
- reinstall the tool (at course or
  account level) and verify the launches
  work again

Change-Id: Ifa41bda3bbaffc8413bc6944f48484b482f8d8f7
Reviewed-on: https://gerrit.instructure.com/195045
Tested-by: Jenkins
Reviewed-by: Drake Harper <dharper@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-05-30 18:08:08 +00:00
James Williams a1388dbd56 add caching around recursive copied lti id query
Change-Id: I398c0e73aa12bee37a4f7de42779a3db07c315b9
Reviewed-on: https://gerrit.instructure.com/193852
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-05-17 12:19:45 +00:00
Rob Orton 128a4cb3cc use sis_pseudonym from enrollment if there is one
fixes CORE-2926

test plan
 - specs should pass

Change-Id: I0b349bc44aecffbcede7093b0689e686c49fe0bb
Reviewed-on: https://gerrit.instructure.com/192886
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-05-14 15:18:40 +00:00
Marc Phillips 7472b589fc LTI 1.3 tools don't show edit in app index
closes PLAT-4438

Test Plan:
 - Create a 1.3 tool in a context
 - The 1.3 tool should only show placements
   and the delete option from the cog dropdown

Change-Id: I8df1a6474226167fe402158a7837cc5fc33a458e
Reviewed-on: https://gerrit.instructure.com/192828
Tested-by: Jenkins
Reviewed-by: Drake Harper <dharper@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2019-05-09 21:20:06 +00:00
wdransfield 2027a7df12 Don't collate 1.3 tools separately from 1.1
Closes PLAT-4436

Test Plan:
Verify LTI 1.3 tools are displayed the same
as 1.1 tools in course and account tool
index pages

Change-Id: I33237ad701ef4c6645f59521080519c483bc4900
Reviewed-on: https://gerrit.instructure.com/191996
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-05-03 15:27:16 +00:00
Rob Orton 003ed64763 use the sis_id tied to enrollments for lit2 launch
refs CORE-2850

test plan
 - have a user with a sis enrolled course
 - have a second sis_id for the user
 - it should return the sis for enrollment on
   lti_launch

Change-Id: I3de963944465e7e49b768e898762362e1c463c7f
Reviewed-on: https://gerrit.instructure.com/191080
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-04-26 21:17:53 +00:00
wdransfield e7a0d2def1 Support deep linking at migration_selection
Closes PLAT-3780

Test Plan:
- Install an LTI 1.3 tool that does deep linking at
  migration_selection
- Launch the tool from the migration_selection
  placement and verify a deep linking launch
  occurs

Change-Id: Ib49192e5a3af97f946debbbbe636d2bcda496557
Reviewed-on: https://gerrit.instructure.com/190379
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2019-04-26 16:59:16 +00:00
wdransfield 1ba76e3af6 Allow deep link request at link_selection
Closes PLAT-3784

Test Plan:
- Install a 1.3 test tool that does deep linking at the
  link_selection placement
- Create a new module item. Select the 1.3 tool in the content
  selection modal.
- Verify a deep linking request is made to the tool

Change-Id: I90178a6f08b551c45a4b19627e2398e21eeeb641
Reviewed-on: https://gerrit.instructure.com/190263
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-04-23 19:46:10 +00:00
wdransfield a047cf1a31 Allow deep linking request launches at homework_submission
Closes PLAT-3781

Test Plan:
- Install an LTI 1.3 tool that expects a deep linking
  request at the homework_submission placement
- Create a Canvas assignment with submission type "online upload"
- As a student go to the assignment submission page
- Verify the LTI 1.3 tool shows up in a tab and launches when
  the tab is activated

Change-Id: I415fd17503dcf93f799910961d574d8960ec59c2
Reviewed-on: https://gerrit.instructure.com/189851
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
2019-04-23 18:53:40 +00:00
wdransfield 680c66aee1 Allow making deep linking request from assignment_selection
Closes PLAT-4394

Test Plan:
- Install an LTI 1.3 tool that uses the assignment_selection
  placement and expects an LtiDeepLinkingRequest
- Verify Canvas can do a deep linking request to the tool
- Verify the accept types setting only contains "ltiResourceLink"
- Verify the document target setting only contains "window" and
  "iframe"
- Verify the media types setting only contains
  "application/vnd.ims.lti.v1.ltilink"
- Verify the auto create setting is set to false

Change-Id: I5614f546eaa6f2f9d1a4b2944b35f50dc0f25c9d
Reviewed-on: https://gerrit.instructure.com/189481
QA-Review: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
2019-04-18 21:11:47 +00:00
Nathan Mills 2fe0bc27aa switch url lookup to use "url"
fixes: PLAT-4361

test-plan:

* install a 1.1 tool with user navigation
* it should launch to the user_navigation_url

Change-Id: Ib064859f446007c05a0551a507104faf78f5a8fe
Reviewed-on: https://gerrit.instructure.com/188416
Tested-by: Jenkins
Product-Review: Marc Phillips <mphillips@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
2019-04-18 17:51:10 +00:00
Rob Orton e5291c04db rename user_past_lti_ids to user_past_lti_id
Change-Id: If7801aa4af6e39af0f885eba78e354ec7096db29
Reviewed-on: https://gerrit.instructure.com/189636
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-04-17 19:11:29 +00:00
Marc Phillips 5fe73fad00 Remove lti11_legacy_user_id
This was removed from the spec.

fixes PLAT-4346

Test Plan:
 - tests pass

Change-Id: I16ff8a72679cfa867e025b2d58d1913796cebfb3
Reviewed-on: https://gerrit.instructure.com/187655
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2019-04-04 15:53:35 +00:00
Rob Orton 8094a06c13 update lti_context_id on the master
refs CORE-2598

test plan
 - specs should pass

Change-Id: I0e67a641c71daa667a19e99a72f801cf85222c4a
Reviewed-on: https://gerrit.instructure.com/188007
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-04-03 13:41:36 +00:00
Rob Orton c4de231b0e support past lti ids for users
when a user_a is merged into user_b, user_a is
deleted, but the enrollments lti_tools still point
to the old lti_id, so this allows us to store them
and serve them as the lti_id when a user is merged

fixes CORE-2565

test plan
 - merge a user that uses an lti tool in a course
 - the lti_id should not change for that course

Change-Id: Iac70957ed1fcb08111745a91d0c2e402dfad3002
Reviewed-on: https://gerrit.instructure.com/181905
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2019-03-28 22:03:07 +00:00
Marc Phillips 7326138db1 Remove 1.3 Tools from AppCenter Page
LTI Tools now show up in the apps page.

refs PLAT-4288

Test Plan:
 - Go to the appcenter page, note that the lti 1.3 tab is no
   longer there

Change-Id: I0b1450322b741cb3bd733bc76919271b877a5855
Reviewed-on: https://gerrit.instructure.com/186189
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-03-21 18:22:32 +00:00
Marc Phillips fff63b51d6 Move LTI 1.3 apps for installation
Previously under the app center, now under the tool
management view.

closes PLAT-4288

Test Plan:
 - Go to the app management area, see that you can install and
   uninstall a tool in a context

Change-Id: Ia454c8671365b64629a0c60b725b15a96a1985dd
Reviewed-on: https://gerrit.instructure.com/185246
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
2019-03-21 18:22:17 +00:00
James Williams 0962ef21f4 use sispseudonym to find lti sis_email
closes #PLAT-4274

Change-Id: I44770570d052dcc2eec995c2c85c64c3a3060bae
Reviewed-on: https://gerrit.instructure.com/185168
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-03-18 16:17:55 +00:00
Marc Phillips fa3dfcb3d6 Add lti-advantage gem validation
Call the message validations on the lti messages
before we send the launch.

closes PLAT-4117

Test Plan:
 - do a launch, it should still work

Change-Id: I34d20c328173158c76b11aacf7028f7eb152f87b
Reviewed-on: https://gerrit.instructure.com/185216
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-03-15 15:56:34 +00:00
Marc Phillips bdcd348962 Revert "Fix global_navigation showing context roles"
This reverts commit aa23d87dc9.

Change-Id: I171bb684b04874b80fc491023cbeb7484997ae7a
Reviewed-on: https://gerrit.instructure.com/185021
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-03-12 22:07:09 +00:00
Marc Phillips c144af0ec5 Replace launch_url with target_link_uri
LTI 1.3 configurations had confusing names for the
target_link_uri. Make them consistent.

refs PLAT-4258

Test Plan:
 n/a

Change-Id: Ia3ac7f896bdf5959cdf30fc6264ef85cd6774a76
Reviewed-on: https://gerrit.instructure.com/184158
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-03-08 19:53:37 +00:00
Marc Phillips 8d68354f26 Fix roles map for instroles
On contextless launches, we failed to map
system roles to lti launch roles.

fixes PLAT-4277

Test Plan:
 - do a contextless launch, see that an admin role is sent

Change-Id: I815f6eb4f31ccd0d1eed24ab1c62636af80f9607
Reviewed-on: https://gerrit.instructure.com/184363
Reviewed-by: Mark Valentine <mvalentine@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-03-07 19:36:41 +00:00
Marc Phillips aa23d87dc9 Fix global_navigation showing context roles
closes PLAT-4115

Test Plan:
 - Install a tool with a global_navigation or user_navigation
   placement
 - launch the tool from these locations and note that they
   don't pass the context roles of the use

Change-Id: I9810fc9745d26e5623a67f66988dbb97b25c606b
Reviewed-on: https://gerrit.instructure.com/182351
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
Tested-by: Jenkins
2019-02-28 20:17:01 +00:00
wdransfield 216e827a22 Add oidc_login_uri for LTI Advantage
Closes PLAT-4141

Test Plan:

1. Create an LTI developer key and set the oidc_login_uri.
   The tool should have the following placements:
   - user_navigation
   - course_navigation
   - editor_button
   Each placement should have a different 'url' property
   (you can just add query params if you want)

2. Launch the tool from each of the placements and verify
   the following:
   - The OIDC login message is sent to the oidc_login_uri
   - the target_link_uri sent in the OIDC login message
     is equal to the 'url' property of the placement setting

3. Create ane LTI assignment with the tool and do a launch

4. Verify that:
   - The OIDC login message is sent to the oidc_login_uri
   - The target_link_uri is the 'url' of the ContextExternalTool

5. Install an LTI 1 tool in the same placements

6. Launch the LTI 1 tool at each placement and verify the launch
   works as before

Change-Id: Ib7508daad9a954e7eabcb0374dbd54520280a172
Reviewed-on: https://gerrit.instructure.com/177627
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
2019-01-16 19:11:54 +00:00