Commit Graph

7 Commits

Author SHA1 Message Date
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
wdransfield 55fce28b93 Add submisson, attachment, and report id variable expansions
Closes PLAT-2688

Test Plan:
- Install an plagiarism detection tool that uses
  LTI launches for displaying originality reports.
  The message handler for these launches should have
  com.instructure.OriginalityReport.id,
  com.instructure.Submission.id,
  and com.instructure.File.id in it's enabled
  capability array.
- Create an originality report with the tool and
  launch the originality report.
- Verify that parameters for each of these three
  capabilities are send and set correctly.

Change-Id: I2cb246e3a48f5e63a60ff6a0d90a003aaf9c8d62
Reviewed-on: https://gerrit.instructure.com/116377
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-07-05 18:49:40 +00:00
Landon Wilkins d198a52517 da licença part 31
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I7b353d1ec31c36c0b12df7feb09fff743dc8a985
Reviewed-on: https://gerrit.instructure.com/110056
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 21:59:58 +00:00
Brad Humphrey 9fad40e8de add variable expansion for getting uuid on root accounts
test plan
 - add a custom variable expansion for $vnd.Canvas.root_account.global_id
  * it should be substituted for root_account.uuid in any LTI launch
 - the capability vnd.Canvas.root_account.global_id should appear in the
   tool consumer profile
 - install an LTI 2 tool that requests the capability
   vnd.Canvas.root_account.global_id
  * launches should come with
    vnd_canvas_root_account_id=<root_account.uuid>

fixes PLAT-2267

Change-Id: I23be140c22c0edd8e20460f648c51cc570a45e80
Reviewed-on: https://gerrit.instructure.com/102077
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-02-15 19:19:31 +00:00
wdransfield 5304c98661 LTI2 only send Context.id when requested
Fixes PLAT-2246

Test Plan:
- Install an lti2 tool without
  the 'Context.id' capability
  enabled.
- Launch the tool and verify that
  the context_id param is absent.
- Install an lti2 tool with the
  'Context.id' capability
- Launch the tool and verify that
  the context_id param is present.
- Verify the Context.id capability
  is preseint in the TCP.

Change-Id: I164f2ca675d77c9ad743d0dad0f8d4ee7364444c
Reviewed-on: https://gerrit.instructure.com/101478
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-02-13 20:11:27 +00:00
wdransfield adff709f9d Add variable substitution capabilities to TCP
Fixes PLAT-2235

Test Plan:
- Get the Canvas TCP and verify it contains all
  capabilities listed in lib/lti/capabilities_helper.rb:3
  in its capability_offered section.
- Install an LTI2 tool, launch it, and verify
  none of the following parameters are sent in
  the launch:
  * launch_presentation_document_target
  * launch_presentation_locale
  * tool_consumer_instance_guid
  * lis_course_section_sourcedid
  * roles
  * lis_person_sourcedid
 - Each of the above params now have an associated
   capability offered by Canvas. If a TP wants
   one of the above parameters sent in their
   tool launch they must include the associated
   capability in their enabled_capability section
   of the tool proxy.

   Verify adding the associated capability in the
   tool profile causes the paramter to be sent
   in the tool launch. See variable_expander.rb
   docs for a mapping of capabilities to
   variable names

Change-Id: I027d079d9d3cf53715fcf8ca4d9d8759af02cb88
Reviewed-on: https://gerrit.instructure.com/101336
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-02-13 17:33:17 +00:00
wdransfield e741d09fbe only send non-required launch params contained in security contract
Fixes PLAT-2199

Test Plan:

1. Instsall an lti2 tool capable of a basic lti launch
  but has no capabilities
2. Launch the tool and verify none of the following
  parameters are sent in the launch:
   * launch_presentation_document_target
   * tool_consumer_instance_guid
   * launch_presentation_locale
3. Install an lti2 tool capable of a basic lti launch
  with and has the following capabilities:
   * launch_presentation_document_target
   * tool_consumer_instance_guid
   * launch_presentation_locale
4. Launch the tool and verify that the parameters
   from step 2 are now present.
5. Verify the tool consumer profile contains
   the capabilities from step 3 in the
   capabilities section.

Change-Id: Idbaf3536575dae37bfa22b035c0312d26e19996b
Reviewed-on: https://gerrit.instructure.com/100693
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
2017-02-03 15:46:19 +00:00