moodle-an-hochschulen / moodle-local_boostnavigation

Moodle plugin which tries to overcome some fixed appearance behaviours of Boost's nav drawer in a clean way
GNU General Public License v3.0
39 stars 27 forks source link

Single Activity format course page error #39

Closed slewislcm closed 5 years ago

slewislcm commented 5 years ago

Hello, Great plugin! Extremely useful. I found an issue with course pages that are single activity format. It causes this debug message, I assume because there are no sections to display in the course node. I couldn't see a setting related to sections/single activity pages. This is using the scheduler plugin (v3.5.1), but also have this issue with dialogue activity.

Here's the debug trace. This page did not call $PAGE->set_url(...). Using https://server.ac.uk/mod/scheduler/view.php?id=71337 line 600 of \lib\pagelib.php: call to debugging() line 820 of \lib\pagelib.php: call to moodle_page->magic_get_url() line 491 of \local\boostnavigation\locallib.php: call to moodle_page->__get() line 156 of \local\boostnavigation\locallib.php: call to local_boostnavigation_build_node_url() line 506 of \local\boostnavigation\lib.php: call to local_boostnavigation_build_custom_nodes() line 1459 of \lib\navigationlib.php: call to local_boostnavigation_extend_navigation() line 2965 of \lib\navigationlib.php: call to global_navigation->initialise() line 450 of \course\format\singleactivity\lib.php: call to global_navigation->find() line 1108 of \lib\pagelib.php: call to format_singleactivity->page_set_cm() line 2779 of \lib\moodlelib.php: call to moodle_page->set_cm() line 36 of \mod\scheduler\view.php: call to require_login()

thanks, Simon

abias commented 5 years ago

Hi Simon,

thanks for raising this issue.

On https://github.com/moodleuulm/moodle-local_boostnavigation/blob/master/locallib.php#L491, local_boostnavigation wants to fetch the URL of the current page. Then, on https://github.com/moodle/moodle/blob/master/lib/pagelib.php#L599, Moodle tells you that the page does not have a specific URL set and falls back to autodetect the URL. The functionality should not be broken there, it's just a debug message.

I am afraid that there is not really anything which I can do in local_boostnavigation about this. It's the duty of the page (in this case: The scheduler activity plugin and the dialogue activity plugin) to set the URL of the page correctly. But I am aware that this is sometimes forgotten by plugin developers.

As I was not able to reproduce this issue with Moodle core activities, I will close this issue here and would like to ask you to turn to the developers of the scheduler activity plugin and the dialogue activity plugin.

Cheers, Alex