Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Deep linking bug in Moodle #114

Closed
SteelWagstaff opened this issue Nov 12, 2020 · 2 comments
Closed

Deep linking bug in Moodle #114

SteelWagstaff opened this issue Nov 12, 2020 · 2 comments
Assignees
Labels
bug Something isn't working Unplanned Extra task done in current Sprint

Comments

@SteelWagstaff
Copy link
Member

When users attempt to create deep links in Moodle, they encounter a Invalid or missing lti_message_type parameter. error message. See https://youtu.be/oehV2OyuUQU

This error is triggered by Moodle under these conditions: https://github.com/moodle/moodle/blob/8c5162684144853a8ee3abd0862489e88421ab83/lib/ltiprovider/src/ToolProvider/ToolProvider.php#L680-L682

@SteelWagstaff
Copy link
Member Author

It appears we broke this feature with this commit:

if ( 'lti' === $controller ) {
if ( \Pressbooks\Book::isBook() || 'createbook' === $action ) {
// Book
$admin = Admin::init();
$controller = new Controller( $admin );
$params['method'] = $action;
$controller->handleRequest( 'launch', $params );
do_exit();

Using https://github.com/pressbooks/pressbooks-lti-provider/blame/a8f8403bd4fd15bdd5d1b02dffa84106cad9fe0b/inc/namespace.php#L45-L51 restores functionality.

@SteelWagstaff SteelWagstaff added bug Something isn't working Unplanned Extra task done in current Sprint labels Nov 12, 2020
@SteelWagstaff
Copy link
Member Author

Deep linking works as expected on integrations: https://youtu.be/DQVPteR8Qao
Book creation works as expected on integrations with the createbook endpoint as well. Nice work @richard015ar !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Unplanned Extra task done in current Sprint
Projects
None yet
Development

No branches or pull requests

2 participants