-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
5.0
-
MOODLE_500_STABLE
-
mdl-85584_405
-
mdl-85584_500
-
mdl-85584_main
-
-
This is an addition to https://tracker.moodle.org/browse/MDL-83307 which fixes the functions building the course URLs. Currently when creating a new LTI external activity and clicking the 'Save and return to course' button, you are actually redirected to the first custom section page instead. This is because the default value for generating the URL is 0, which is specifically the id the first custom section. By changing the default paramater value to null, it will redirect to the course page instead.
How to recreate
Do the following in moodle 4.5.
- In mod/lti/lib.php function lti_get_course_content_items(), change the line $preconfiguredtools = lti_get_configured_types($course->id, ...) to remove the second parameter, so default behaviour is given.
- Create a new Custom sections course with at least one section, besides the General section.
- Click More > LTI External tools
- Add a new test tool with the URL https://ltiapps.net/test/tp.php
- Return to the course main page.
- In Section 1, click to add activity or resource, and choose the test tool.
- Give the activity a name, and click 'Save and return to course'.
Expected Behaviour
- Redirected to course page (url looks something like http://[url]/course/view.php?id=5)
Actual Behavior
- Redirected to first custom section page (url looks something like http://[url]/course/section.php?id=20)
- has a non-specific relationship to
-
MDL-83307 Section return issues
-
- Waiting for peer review
-