-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.5.4, 3.7
-
None
-
MOODLE_35_STABLE, MOODLE_37_STABLE
Steps to reproduce:
- Create a course (Course 1)
- Create a user tour with the following settings:
- Name - Welcome to Course 1
- Apply to URL match - leave this blank
- Tour is enabled - checked
- Tour filters: Courses - Course 1
- All other settings should be left as default
- Add a new step to the tour, with the following settings:
- Target type: Display in the middle of page
- Title: Welcome
- Content: Welcome to Course 1
- Make sure the tour is the first one on the list, so no other tour will be chosen instead
- Login as the user who is not enrolled on Course 1 (and cannot view it without enrolment)
- Try to visit Course 1
- You will then be redirected to the enrolment page
Expected outcome:
- Moodle makes no attempt to launch the user tour, as the user does not have permission to access the course
Actual outcome:
- Moodle attempts to display the tour, but fails and shows a 'requireloginerror' popup
Error stack trace:
Not enrolled
Error code: requireloginerror
- line 2943 of /lib/moodlelib.php: require_login_exception thrown
- line 498 of /lib/externallib.php: call to require_login()
- line 62 of /admin/tool/usertours/classes/external/tour.php: call to external_api::validate_context()
- line 244 of /lib/externallib.php: call to tool_usertours\external\tour::fetch_and_start_tour()
- line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
- duplicates
-
MDL-58763 Usertours cannot be used on the enrolment page
-
- Closed
-