Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 108: Subblocks duplicated when a custom page is duplicated #114

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

sumaiyamannan
Copy link
Contributor

Kia ora,

This will resolve the issue 108

Testing instructions:
Go to Moodle Workplace -> Admin -> Custom pages
Click on a page with multiblocks and click 'Duplicate page'
Go to the original page has the multiblock items duplicated
Delete the duplicated page and apply the commit
Duplicate the page again and go to original page and see that no block items are duplicated.

Cheers,
Sumaiya

* @return void
*/
private function cleanup($contextid) {
global $DB;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to add something like the if ($instance->pagetypepattern == 'admin-tool-custompage') { check in here so that we don't have to check if there a duplicates on every block load? - or maybe even an if tool_custompage plugin exists kind of thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is done

@danmarsden danmarsden changed the base branch from master to MOODLE_402_STABLE January 20, 2025 04:38
@danmarsden danmarsden merged commit d66dff5 into MOODLE_402_STABLE Jan 22, 2025
25 checks passed
@danmarsden danmarsden deleted the workplace branch January 22, 2025 22:29
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