-
Bug
-
Resolution: Fixed
-
Minor
-
3.11.2
-
MOODLE_311_STABLE
-
MOODLE_310_STABLE, MOODLE_311_STABLE
-
MDL-72325-master-tourspolicy -
If the user has not yet agreed to the site policy and there is a user tour to be started, an ugly error popup "sitepolicynotagreed" appears.
This was originally noticed by jessica@moodle.com as a bug affecting Moodle Academy: users who log in via OAuth2, get this error box on the landing screen and then on every single screen of the site policy wizard.
Steps to reproduce:
- Log in as admin
- Go to Site administration > Users > Privacy and policies > Policy settings
- Define some URL (such as https://example.com) as the "Site policy URL" (sitepolicy)
- Go to Site administration > Appearance > User tours
- Create new tour
- In the "Apply to URL match" use /% so that it matches any URL
- In the "Show if target not found" select "Yes"
- Define a single step of the tour that shows some message in the middle of the page.
- Log out
- Log in as a student
Expected behaviour
Site policy agreement is shown and only once the site policy is agreed, the custom user tour runs
Actual buggy behaviour
An error popup sitepolicynotagreed appears with call stack
Error code: sitepolicynotagreed
|
* line 2855 of /lib/moodlelib.php: moodle_exception thrown
|
* line 515 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 261 of /lib/externallib.php: call to tool_usertours\external\tour::fetch_and_start_tour()
|
* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
|
- has been marked as being related by
-
MDL-56822 sitepolicynotagreed error appears on site policy page on clean
- Closed