{"id":19591925,"url":"https://github.com/catalyst/moodle_tool_blocksmanager","last_synced_at":"2025-04-27T14:33:32.019Z","repository":{"id":36538756,"uuid":"227511814","full_name":"catalyst/moodle_tool_blocksmanager","owner":"catalyst","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-25T00:54:18.000Z","size":200,"stargazers_count":7,"open_issues_count":4,"forks_count":1,"subscribers_count":29,"default_branch":"MOODLE_404_STABLE","last_synced_at":"2025-04-05T00:41:18.384Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://moodle.org/plugins/tool_blocksmanager","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catalyst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-12T03:26:48.000Z","updated_at":"2025-03-25T00:54:22.000Z","dependencies_parsed_at":"2024-02-29T04:34:00.905Z","dependency_job_id":"c9bb6b8e-01e7-4425-899c-38fde1583afd","html_url":"https://github.com/catalyst/moodle_tool_blocksmanager","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle_tool_blocksmanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle_tool_blocksmanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle_tool_blocksmanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle_tool_blocksmanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catalyst","download_url":"https://codeload.github.com/catalyst/moodle_tool_blocksmanager/tar.gz/refs/heads/MOODLE_404_STABLE","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251154620,"owners_count":21544531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T08:31:55.127Z","updated_at":"2025-04-27T14:33:32.008Z","avatar_url":"https://github.com/catalyst.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/catalyst/moodle_tool_blocksmanager/ci.yml?branch=MOODLE_404_STABLE)\n\n# Block Manager #\n\nAn admin tool that allows you to control a block layout across units.\n\n# Versions and branches\n\n| Moodle Version   | Branch            |\n|------------------|-------------------|\n| Moodle 3.9 - 4.1 | master            |\n| Moodle 4.4 - 4.5 | MOODLE_404_STABLE |\n\n## Features ##\n* Lock down functionality for the blocks in the regions.\n  - Create locking rules for the regions in the specific course categories (block regions in courses from the selected course categories (including child categories) will be locked according to configured rules).\n  - Create locking rules for specific blocks in the specific regions of the specific course categories (block rules will override region rules).\n  - There is Bypass blocks locking ('tool/blocksmanager:bypasslocking') capability  that allows users to bypass created locking rules. \n* Add a specific set of blocks to the courses in the specific course categories:\n  - Define region and weight for every block type.\n  - Set visibility for each block type.\n  - Reposition or add another block instance if it's already exist in the course.\n  - Set up config data as a string if required.\n  - Set whether to show the block in subcontexts.\n  - Set the page type pattern.\n* Add blocks to course module / activity / resource pages.\n\n## Installation ##\n1. Download files or clone the repository to /admin/tool/blocksmanager\n2. Install the plugin as usual.\n\n## Usage ##\n\n### Block management ###\nThis feature allows locking a specific block in a specific region through a selected course category so no one (expect users with \n'tool/blocksmanager:bypasslocking') can apply changes to a block configuration in that region.\n\nActions that could be locked per block:\n- configuration\n- deleting\n- hiding \n- moving\n\nTo create set of rules to lock blocks, navigate to Site administration \u003e Plugins \u003e Admin tools \u003e Blocks Manager \u003e Blocks management    \n\n### Region management ###\nThis feature gives an ability to lock a whole region through a selected course category. That means all blocks in the \nmatching region will be locked from performing configured actions (expect for users with 'tool/blocksmanager:bypasslocking'). \n\nActions that could be locked per region:\n- configuration\n- deleting\n- hiding\n- adding blocks to region  \n- moving\n\nTo create set of rules to lock regions, navigate to Site administration \u003e Plugins \u003e Admin tools \u003e Blocks Manager \u003e Region management\n\n### Set up blocks ### \nThis features helps to create blocks in bulk through selected course categories (for example add a calendar block to every course \nfor a selected category).\n\nTo do  that, navigate to Site administration \u003e Plugins \u003e Admin tools \u003e Blocks Manager \u003e Set up blocks\n\nThe form let you to select: \n\n- Region - what region to add a block to (e.g. side-pre, side-post)?\n- Block - what block to add? \n- Categories - what categories to apply the block? \n- Weight - what block weight will be on those pages? \n- Config data - does block have any config? Could be applied here (but should be exact string of config that is stored in DB if you would add the block manually)? \n- Visible? - is block visible when added? \n- Add another instance (if exists)? - if the same block already exists, should we add another instance of that block? \n- Update instance (if exists)? - if the block already exists, should we update the block by new settings? \n- Reposition instance (if exists)? - if the block already exists, should we reposition the block?\n- Show in subcontexts - should the block be displayed on course subpages (e.g. course page and activity pages)?\n- Page type pattern - what page should the block be displayed? E.g. course-view-*, mod-assign-view and etc.\n    - courses: course-view-* (https://examplemoodle.com/course/view.php?id=1)\n    - assign modules: mod-assign-view (https://examplemoodle.com/mod/assign/view.php?id=1)\n    - quiz modules: mod-quiz-view (https://examplemoodle.com/mod/quiz/view.php?id=1)\n    - feedback modules: mod-feedback-view (https://examplemoodle.com/mod/feedback/view.php?id=1)\n                                                                                                           \nOnce you configured all fields in the form, you click on \"Add new line\". This will update \"Set of blocks\" text field with a new configuration line. (This data will be used later for applying blocks.) \nOnce all blocks are added to a set, click 'Apply set of blocks'. The form will be submitted, and the set of blocks will be applied \nby an adhoc task in the background. This means there will a little delay before you see new blocks appeared.\n\n### CLI script ### \nA CLI script has been added to handle recurring set of blocks. The configuration created in \"Set up blocks\" can be added to a file, then the script can be called as:\n\n```\nsudo -u www-data /usr/bin/php admin/tool/blocksmanager/cli/blocks_cli_setup.php --filepath=block_setup.txt\n```\n\nThe set of blocks will be applied in the same way as previously by an adhoc task in the background.\n\n\n# Crafted by Catalyst IT\n\n\nThis plugin was developed by Catalyst IT Australia:\n\nhttps://www.catalyst-au.net/\n\n![Catalyst IT](/pix/catalyst-logo.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalyst%2Fmoodle_tool_blocksmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatalyst%2Fmoodle_tool_blocksmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalyst%2Fmoodle_tool_blocksmanager/lists"}