Closed sh-csg closed 3 months ago
(failing CI is not related to the patch)
Some details about the patch:
The problem arises as $PAGE->_pagetype is not set when the constructor is called for the handling of the get_fragment() call. When $PAGE->pagetype is accessed the first time (lib.php, L140), moodle_page::magic_get_pagetype() calls moodle_page::initialise_default_pagetype() where pagetype is set to "lib-ajax-service" (out of "/lib/ajax/service.php"): https://github.com/davidherney/moodle-format_onetopic/blob/6c6950b531df56fc8fafc43176f05ffc996c5d86/lib.php#L140
Other course formats don't access $PAGE->pagetype that early, so they get to L408 in /lib/external/externallib.php:
$PAGE->set_url() sets the pagetype to "site-index" in this case.
Can confirm this patch works, but the issue described by @sh-csg should be fixed in the course format in a cleaner way.
Hi,
We've applied this patch and it fixes the issue.
Hi...
Thanks @sh-csg, I've integrated the fix.
@PhMemmel If you have an idea on how to do it better, tell me and I'll review it.
Saludos
This shows action menu when course module is rendered again after changing sth (e.g. indentation). This closes #169 .