-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.1
I have an LTI 1.3 tool registered using deep linking/content selection. When I add a new activity using the tool, then Select Content, then select from the tool, I get an error from Moodle:
Exception - Argument 1 passed to params_to_string() must be an object, array given, called in [dirroot]/mod/lti/locallib.php on line 1576
The Apache log says:
PHP message: Default exception handler: Exception - Argument 1 passed to params_to_string() must be an object, array given, called in [dirroot]/mod/lti/locallib.php on line 1576 Debug:
Error code: generalexceptionmessage
- line 1464 of /mod/lti/locallib.php: TypeError thrown
- line 1576 of /mod/lti/locallib.php: call to params_to_string()
- line 1629 of /mod/lti/locallib.php: call to content_item_to_form()
- line 84 of /mod/lti/contentitem_return.php: call to lti_tool_configuration_from_content_item()
', referer: https://[redacted]/
This did not happen in 4.0, only since switching to v4.1.1.
To reproduce:
- Set up a Moodle-to-Moodle LTI using LTI Advantage (See the first few sections of
MDL-78219's testing instructions if you're not sure how this is done. Also, docs if needed). You'll need one published activity - published over LTI 1.3. - Apply this patch to the TOOL site: https://github.com/snake/moodle/compare/580c009cacb...MDL-77249-replication-deeplinkresponse. This just forced an empty object within the deep link response JSON.
git pull https://github.com/snake/moodle MDL-77249-replication-deeplinkresponse
- In the PLATFORM site, click to create an activity
- Select the Moodle tool
- Select the activity checkbox and click "Add content"
Expected: The modal closes without error, and you see the activity instance form is updated with details of the activity (e.g. name)
Actual: You'll see an exception in the modal:Exception - params_to_string(): Argument #1 ($params) must be of type object, array given, called in [dirroot]/mod/lti/locallib.php on line 1503
- is a regression caused by
-
MDL-69275 User can open external tool submission from the gradebook
- Closed