Skip to content

Fix TODO page in STACK question dashboard for Moodle 5 - #1899

Merged
sangwinc merged 2 commits into
maths:devfrom
ngandrass:fix/todo-page
Oct 13, 2026
Merged

sangwinc merged 2 commits into
maths:devfrom
ngandrass:fix/todo-page

Conversation

@ngandrass

Copy link
Copy Markdown
Contributor

Since Moodle 5, accessing the "Find [[todo]] blocks" page (adminui/todo.php) from the STACK question dashboard throws the following codingerror:

image

Moodle 5 changed the context in which question live. Due to the missing $PAGE->set_cm() call, the page now fails to build the header navigation and throws the exception seen above.

Applying the workaround introduced by fa00b15 to other adminui pages, i.e. adminui/bulktest.php, fixes this issue while maintaining full compatibility with Moodle 4.

This PR also fixes the previously incorrectly set page URL while keeping the passed contextid.

@sangwinc
sangwinc changed the base branch from master to dev October 13, 2026 18:39
@sangwinc

Copy link
Copy Markdown
Member

Thank you @ngandrass that's very helpful indeed. We're about to make a new release, so it will find its way into master very soon.

@sangwinc
sangwinc merged commit b8651ea into maths:dev Oct 13, 2026
2 of 5 checks passed
@ngandrass
ngandrass deleted the fix/todo-page branch October 13, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants