Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

LTI ContentItem Enhancements

From MoodleDocs
Revision as of 21:12, 8 August 2017 by Claude Vervoort (talk | contribs)
LTI Content-Item Enhancements
Project state Planning
Tracker issue MDL-59402
Discussion Enhancing support for IMS Content-Item message
Assignee Stephen Vickers


Project goal

The goal of this project is to enhance the existing IMS Content-Item Message implementation in Moodle. IMS Content-Item Message is an extension of the IMS Learning Tool Interoperability (LTI) specification that allows for sharing of content, typically LTI links, between two systems. The enhancements developed as part of this project will provide a more streamlined link creation process and an improved user experience.

Specifically, these enhancements will:

  • Allow instructors and course designers to add multiple LTI links at once; eliminating the need to access a content selector each time a link is to be added
  • Support a more streamlined workflow where content items can optionally be added automatically without any manual intervention
  • Enhance the user experience of using a content selector within Moodle by increasing the size of the lightbox where the content selector is rendered

The work is not intended for now to support other content item type (like static content) although it could be extended in the future to allow for it.

This work is being undertaken with the support of Cengage.

Direct Content Item flow from Activity Chooser

This is the most significant change being proposed: a new flow is added to skip the External Tool page when launching directly from the Activity Chooser (i.e. not using the External Tool option). The goal is to make the external tool feel more integrated and behave more like an Activity Module by diving directly into the tool's User Interface and not showing any Moodle configuration page. It also allows for the creation of multiple items in a single interaction.

The new flow is summarized is in this short screen cast: https://youtu.be/TvqKuJlGATw

Streamlined add flow

When a user selects the tool directly in the activity chooser, the user is sent directly to the Tool Provider using the ContentItemSelectionRequest launch. The parameters in the launch now include:

- auto_create: true indicating the links will be created directly on return - accept_multiple: true indicating it is ok to return more than one Content Item

The actual Tool UI will be in an IFrame, and the return URL would handle the Items, add them directly to the course and create the grade item if the content item defines a line item. Then it would redirect the user to the course page with those links added in (similar to a regular Activity Module flow). An empty content item return would act as a Cancel, no item would be added and the user would be returned to the course page.

mdl mock add cisr.png

Grade Item only if Line Item is present

Right now the creation of a Grade Item for Link is a tool configuration:

  • Tool can be configured to Always accept grades, then each link will have its own gradebook item
  • Tool can be configured to Never accept grades, then no gradebook column will ever be created for that tool
  • Tool can be configured to Defer to instructor, in which, the instructor has a choice on a per link basis to add or not a grade book column
  • Tool when configured with a Tool Proxy always create a gradebook column (mod/lti/mod_form.php 231 - let me know if I misunderstand the purpose of that line!)

Always creating a gradebook column for each and every link works fine for simpler tools always providing links to the same kind of assets, but it does not work well for heterogeneous resources (for example a link could go to a Reading activity, or a Quiz). The decision to create a Grade Item for a Link should ultimately be a Link level decision, driven by the Content Item definition inclusion or not of a Line Item definition (if Content Item Selection Request is used), even if the tool is configured to always accept grades or is a Tool Proxy deployment.

To achieve this, we propose:

  1. If a tool is configured to never receive grade
    1. The option for Grade is never displayed
    2. Line Item definitions in Content Items are always ignored
  2. If a tool is configured to always accept grades OR defer to instructor OR a Tool Proxy (LTI 2)
    1. When adding using AutoCreate true (launch from Activity Chooser)
      1. A Gradebook Column will be created as part of the autocreate flow IF AND ONLY IF the content item contains a Line Item definition
      2. If the Content Item does not contain a Line Item, autocreate does not create an associated Grade Item but the user always has the option to add one using the Settings page
    2. In the External Tool Page
      1. The option to turn ON/OFF grading is moved in the GRADE section
      2. If tool is LTI 1.0 with always accept
        1. Option to receive grades is checked in and not modifiable
        2. A grade item is always created, regardless the presence or absence of a Line Item in Content Item
      3. If tool is set to instructor choice or LTI 2.0 (see caveat below on further possible refinement)
        1. Option to receive grades is checked and is modifiable
        2. If Select Content is used
          1. The option will be set to ON if a Line Item definition is included, to false otherwise; the points value will be pre-populated per the Content Item's Line Item definition
          2. The instructor can override that choice

Note that the LTI 2.0 capability of Result.autocreate or Score.url might act as a cue to decide or not to pre-select grading in the case when Content Item Selection request is not used.


New default behavior

The proposed flow will become the new behavior i.e.: if a Tool Supports Content Item Selection Request AND it is launched directly from Activity Chooser, it will go directly to the Tool as highlighted above.

Initially the proposal included an opt-in flow where this behavior would have had to be turned on from the Tool Setting page; rationale was to not impact current deployments. The new option in the tool settings would make it optional to skip the External Tool page when adding an activity from the activity chooser. This option would only be available if the tool supports the Content Item flow; it also requires the tool to be listed in the activity chooser.

Here is an early mockup of how this option could be implemented:

mdl mock settings.png

Whether or not to make this an optional behavior is discussed in the forum.

Other improvements

Support for thumbnail and icon

Content items returned to Moodle in a Content-Item Message response optionally contain an Icon and Thumbnail (i.e., images to be displayed along with link text) data. Currently Moodle does not support display of icons/thumbnails received as part of a content item. This project would add support for both the icon and thumbnail.

Support for a larger lightbox for display of a content selector in External Tool

Note: this work is independent of the other more consequent changes and will be proposed as a distinct improvement.

The current lightbox displayed by Moodle on a Content-Item Message request when initiated from the External Tool Page is rather small and often results in the need for the user to scroll vertically and horizontally. This project would update the lightbox to be larger based on screen dimensions. Outside of the wider modal, there will be no other changes in current flow of the External Tool page.