pressbooks / pressbooks-lti-provider

A plugin which turns Pressbooks into an LTI provider.
GNU General Public License v3.0
7 stars 4 forks source link

Blackboard LTI2: Can not deserialize instance of out of START_OBJECT token #21

Closed dac514 closed 2 years ago

dac514 commented 6 years ago

Prerequisites

Description

Upstream issue: https://github.com/Izumi-kun/LTI-Tool-Provider-Library-PHP/issues/13

Tested using:

https://community.blackboard.com/docs/DOC-4242-using-the-developer-ami

When doing a LTI2 registration with Blackboard, the LMS errors with:

{"status":400,"message":"Could not read document: Can not deserialize instance of  out of START_OBJECT token\
 at [Source: @3fe45ab9; line: 1, column: 1263] (through reference chain: [\\"tool_profile\\"]->[\\"resource_handler\\"]->[0]->[\\"icon_info\\"]); nested exception is : Can not deserialize instance of  out of START_OBJECT token\
 at [Source: @3fe45ab9; line: 1, column: 1263] (through reference chain: [\\"tool_profile\\"]->[\\"resource_handler\\"]->[0]->[\\"icon_info\\"])","extraInfo":"b711870c01384a0cb406dbda5c4ef919"}

If I If comment out the icon_info node then the LTI2 registration works fine.

//        $this->icon_info = new \stdClass;
//        $this->icon_info->default_location = new \stdClass;
//        $this->icon_info->default_location->path = $resourceHandler->icon;
//        $this->icon_info->key = "{$resourceHandler->item->id}.icon.path";

https://github.com/Izumi-kun/LTI-Tool-Provider-Library-PHP/blob/master/src/ToolProvider/MediaType/ResourceHandler.php#L36

IMHO the icon is fine and follows the standard this is a bug in Blackboard.

https://www.imsglobal.org/lti/model/uml/purl.imsglobal.org/vocab/lti/v2/lti/index.html#IconInfo

Sent an email to devs and got (abridged):

"Blackboard is no longer supporting/developing LTI 2. [...] Icons and thumbnail support isn’t required. We have passed all the certification suites from IMS. [...] We’re considering this as a future enhancement, but it wouldn’t be in 2018. Focused on certification of LTI Advantage and this isn’t a requirement in spec."

Need to figure out a way to suppress \IMSGlobal\LTI\ToolProvider\MediaType\ResourceHandler::$icon_info when doing LTI2 with Blackboard.

SteelWagstaff commented 5 years ago

Some context, in case it's helpful. The current LTI standard is LTI 1.1. IMS Global also released LTI 1.2 and 2.0, and some tools built certifications against these specifications. However, IMS Global found that the architecture for these versions were poor and decided to deprecate them. They also announced that they'd start over with a rebuilt 1.3 spec and several extensions (which they're calling LTI Advantage).

During the security policy analysis, it was determined that the architecture of LTI 2.x as currently constituted was not the most suitable basis to upgrade. This conclusion—based on the key principles for future evolution—was reached by the LTI workgroup and supported by the LTI Product Steering Committee and IMS architects. It was decided that the best framework to build the updated security model upon would be the LTI 1.1 baseline, as a new version 1.3.

A result of this decision is the designation of LTI 1.2 and LTI 2.0 as “legacy” specifications; both will still be supported and recertified but will not be on the recommended upgrade path. Source

This means that the recommended LTI adoption roadmap is now 1.1 -> 1.3 (compatible with LTI Advantage) -> future versions. IMS has released a final candidate for the LTI v1.3 Core Specification (including the IMS Security Framework v1.0) and the LTI Advantage services/extensions (for Assignment/Grade services, Name & Role provisioning, and Deep Linking). Early adopters can begin going through LTI 1.3 and LTI Advantage conformance certification now, and many LMSes have done exactly that.