-
Bug
-
Resolution: Fixed
-
Minor
-
4.5
-
MOODLE_405_STABLE
-
MOODLE_405_STABLE
-
With the hook introduced in MDL-82066 plugins can extend the defaulthomepage menu, however the url is stored as a full url
It is NOT checked to be a local url when it is set in the hook, but it is cleaned to the PARAM_LOCALURL when it is used.
This will not work if the site was moved from one domain to another and also will not work in multi-domain environment that we introduce in Workplace in 4.5
Instead I suggest the following:
- in core_user\hook\extend_default_homepage in the add_option function check that submitted url is local url and store it as $this->options[$url->out_as_local_url()] = $title;
- in get_home_page() expect that the value is already a relative url
- has to be done after
-
MDL-82066 Allow plugins to hook into/extend site default homepage options
-
- Closed
-