Note:

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

LTI ContentItem Enhancements: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 27: Line 27:


The new flow is summarized is in this short screen cast: https://youtu.be/TvqKuJlGATw
The new flow is summarized is in this short screen cast: https://youtu.be/TvqKuJlGATw
We propose that: when a tool proxy is deployed, and the tool proxy supports Content Item Selection Request, the tool is by default selected to be visible in the Activity Chooser (it may be changed after to only be listed in External Tool in the config page of that tool).


=== Streamlined add flow ===
=== Streamlined add flow ===
Line 46: Line 48:
* Tool can be configured to '''Never accept grades''', then no gradebook column will ever be created for that tool
* 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 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!)
* Tool when configured with a '''Tool Proxy''' which treats the capability of Result.autocreate to decide whether the tool is Never Accept or Always Accept
 
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. This will be the direction taken by the new flow. The older flow, not mandating the usage of Content Item Selection Request, will keep its current behavior of relying purely on the tool definition.
 
As a result:
 
If a tool is configured to never receive grade (either manually or not part of the tool proxy)
# The option for Grade is never displayed in the External Tool page (existing functionality)
# Line Item definitions in Content Items are always ignored (External Tool Page, new Activity Chooser flow)


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.
Otherwise:


To achieve this, we propose:
When adding using this proposed new flow from from Activity Chooser (autocreate: true)
# A Gradebook Column will be created as part of the autocreate flow IF AND ONLY IF the content item contains a Line Item definition
# If the Content Item does not contain a Line Item, autocreate does not create an associated Grade Item even if the tool has required the capability or is set to ALWAYS


# If a tool is configured to never receive grade
In the External Tool Page, the flow is mostly unchanged:
## The option for Grade is never displayed
# If tool is set to always accept:
## Line Item definitions in Content Items are always ignored
## Option to receive grades is checked in and not modifiable
# If a tool is configured to always accept grades OR defer to instructor OR a Tool Proxy (LTI 2)
## A grade item is always created, regardless the presence or absence of a Line Item in Content Item
## When adding using AutoCreate true (launch from Activity Chooser)
# If tool is set to instructor choice:
### A Gradebook Column will be created as part of the autocreate flow IF AND ONLY IF the content item contains a Line Item definition
## Option to receive grades is checked and is modifiable
### 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
## The instructor can override that choice
## In the External Tool Page
# if Tool Proxy deployment requires grading:
### The option to turn ON/OFF grading is moved in the GRADE section
## grade is checked and cannot be unchecked
### If tool is LTI 1.0 with always accept
#### Option to receive grades is checked in and not modifiable
#### A grade item is always created, regardless the presence or absence of a Line Item in Content Item
### If tool is set to instructor choice or LTI 2.0 (see caveat below on further possible refinement)
#### Option to receive grades is checked and is modifiable
#### If Select Content is used
##### 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
##### 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.
From the External Tool page, if a line item definition is present in the Content Item payload, it ideally should be used to pre-populate the max points for the Grade (although this value could be changed by the instructor).


Note that the capabilities to decide whether or not a tool proxy requires grading probably needs to be extended to support the new capabilities exposed by the Gradebook Services: https://tracker.moodle.org/browse/MDL-59789


=== New default behavior ===
=== New default behavior ===

Revision as of 17:26, 10 August 2017

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

We propose that: when a tool proxy is deployed, and the tool proxy supports Content Item Selection Request, the tool is by default selected to be visible in the Activity Chooser (it may be changed after to only be listed in External Tool in the config page of that tool).

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 which treats the capability of Result.autocreate to decide whether the tool is Never Accept or Always Accept

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. This will be the direction taken by the new flow. The older flow, not mandating the usage of Content Item Selection Request, will keep its current behavior of relying purely on the tool definition.

As a result:

If a tool is configured to never receive grade (either manually or not part of the tool proxy)

  1. The option for Grade is never displayed in the External Tool page (existing functionality)
  2. Line Item definitions in Content Items are always ignored (External Tool Page, new Activity Chooser flow)

Otherwise:

When adding using this proposed new flow from from Activity Chooser (autocreate: true)

  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 even if the tool has required the capability or is set to ALWAYS

In the External Tool Page, the flow is mostly unchanged:

  1. If tool is set to 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
  2. If tool is set to instructor choice:
    1. Option to receive grades is checked and is modifiable
    2. The instructor can override that choice
  3. if Tool Proxy deployment requires grading:
    1. grade is checked and cannot be unchecked

From the External Tool page, if a line item definition is present in the Content Item payload, it ideally should be used to pre-populate the max points for the Grade (although this value could be changed by the instructor).

Note that the capabilities to decide whether or not a tool proxy requires grading probably needs to be extended to support the new capabilities exposed by the Gradebook Services: https://tracker.moodle.org/browse/MDL-59789

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.