You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very useful for us to be able to override the LTI parameters this plugin is sending to Kaltura in a similar way the core LTI activity plugin allows parameter overrides.
Kaltura plugin sends the Moodle username as the LTI user_id parameter. In our setting, users access Kaltura media either through Moodle and through a different platform. From our second platform we can't know Moodle usernames so we'd like to change the user_id that Moodle is sending to Kaltura via LTI so they both match.
The core LTI activity module provides the before_launchcallback that allow subplugins -called ltisource plugins- to override LTI params (example of ltisource plugins). We could call the same before_launch or a custom before_kaltura_launch callback from this kaltura plugin to give other plugins the opportunity to override LTI parameters as in the core LTI module.
We're willing to develop this feature and provide a PR if you are open to accept this feature. Thank you!
The text was updated successfully, but these errors were encountered:
Just in case this is of interest to Kaltura plugin maintainers or anyone else, we've implemented this feature by adding the following lines to the file local/kaltura/locallib.php in function local_kaltura_request_lti_launch before the call to lti_sign_parameters.
// Call plugins of type ltisource providing the before_launch hook// implementation the same way it is done by Moodle's LTI mod.$callbacks = get_plugin_list_with_function('ltisource', 'before_launch');
foreach ($callbacksas$plugin => $function) {
$pluginparams = component_callback($plugin, 'before_launch', [$lti, $endpoint, $requestparams], []);
if (!empty($pluginparams) && is_array($pluginparams)) {
$requestparams = array_merge($requestparams, $pluginparams);
}
}
I'll be happy to provide a PR to your branches if you're willing to accept this.
It would be very useful for us to be able to override the LTI parameters this plugin is sending to Kaltura in a similar way the core LTI activity plugin allows parameter overrides.
Kaltura plugin sends the Moodle
username
as the LTIuser_id
parameter. In our setting, users access Kaltura media either through Moodle and through a different platform. From our second platform we can't know Moodle usernames so we'd like to change theuser_id
that Moodle is sending to Kaltura via LTI so they both match.The core LTI activity module provides the
before_launch
callback that allow subplugins -calledltisource
plugins- to override LTI params (example of ltisource plugins). We could call the samebefore_launch
or a custombefore_kaltura_launch
callback from this kaltura plugin to give other plugins the opportunity to override LTI parameters as in the core LTI module.We're willing to develop this feature and provide a PR if you are open to accept this feature. Thank you!
The text was updated successfully, but these errors were encountered: