You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migration tool: convert block_configurable_reports block instances to block_sqlreports #49
report_sql can import Configurable Reports (block_configurable_reports) SQL reports via cr_import, but nothing migrates the block instances themselves. Sites replacing BCR with block_sqlreports must re-add every block by hand.
Proposed
Script/CLI (and/or admin action) that, for each block_configurable_reports row in block_instances, creates a block_sqlreports instance in the sameparentcontextid, defaultregion, defaultweight, pagetypepattern, subpagepattern, then removes the old instance.
Use the old→new report id map produced by cr_import to point the new block at the imported query (config_queryid).
Imports are created as drafts, so provide a bulk publish step (or clear reporting of what still needs publishing + an audience).
Carry over courseid and visible (already done in import); document that BCR global and permissions are not migrated and need audiences set.
Make it idempotent and support a dry-run.
Verify
Confirm cr_import works with the BCR plugin code removed but its tables/data retained (it only reads block_configurable_reports; add a test for this).
Related
Old BCR blocks listed multiple reports; see the block_sqlreports "list of reports" issue for the display side of the migration.
Activity
keevan commentedon Dec 2, 2026
Moved to catalyst/moodle-block_sqlreports#9, because the block plugin should create and migrate its own block instances. Resolved there by catalyst/moodle-block_sqlreports#8. Closing this issue.