Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Add a block cleanup: Difference between revisions

From MoodleDocs
(discussion link)
(Add "un-addable" blocks section)
Line 9: Line 9:


In the Add a block menu, the list of blocks is really long. This project is about figuring out how to reduce the list.
In the Add a block menu, the list of blocks is really long. This project is about figuring out how to reduce the list.
==Disabling blocks if the feature is disabled==
==Disabling blocks if the feature is disabled==
Blocks such as the blog menu, blog tags and recent blog entries should be disabled if blogs are disabled in advanced features.
Blocks such as the blog menu, blog tags and recent blog entries should be disabled if blogs are disabled in advanced features.


Blocks this applies to:
Blocks this applies to:
* Accessibility review
* Accessibility review
* Blog menu
* Blog menu
Line 29: Line 26:
* Tags
* Tags
* Network servers
* Network servers
==Disabling less useful blocks==
Some blocks that we can consider disabling include:
* Course summary
* Feedback - as the block only works if a Feedback activity is added to the site home page
* Remote RSS feeds - as RSS feeds are not used as much these days
* Self completion - as the block is only needed if self completion is enabled in the course completion settings. Instead we can mention in the interface that for self completion, the block needs to be enabled by an administrator.


==Disabling less useful blocks==
For new installs, the above blocks can be disabled by default.


For upgraded sites, we should check if there are any instances of the block and if not, disable it.
==Letting themes define "un-addable" blocks==
The Administration and Navigation blocks are only needed if the Classic theme is used. We can mention in the interface when enabling the Classic theme that the Administration and Navigation blocks need to be enabled and provide a link to the Manage blocks page.
The Administration and Navigation blocks are only needed if the Classic theme is used. We can mention in the interface when enabling the Classic theme that the Administration and Navigation blocks need to be enabled and provide a link to the Manage blocks page.


Other blocks that we can consider disabling include:
Apart from that, a new theme setting will be added to let themes mark blocks as "un-addable" (to avoid them being displayed in the "Add a block" list page). This will allow boost to mark the following blocks as un-addable:


* Navigation - as it has been improved in 4.0
* Administration - as navigation has been improved in 4.0
* Courses - as we have My courses in 4.0
* Courses - as we have My courses in 4.0
* Section links - as the course index in 4.0 provides access to sections
* Section links - as the course index in 4.0 provides access to sections
* Course summary
* Feedback - as the block only works if a Feedback activity is added to the site home page
* Remote RSS feeds - as RSS feeds are not used as much these days
* Self completion - as the block is only needed if self completion is enabled in the course completion settings. Instead we can mention in the interface that for self completion, the block needs to be enabled by an administrator.


For new installs, the above blocks can be disabled by default.


For upgraded sites, we should check if there are any instances of the block and if not, disable it.
It will be a theme setting, so admins will still be able to remove them from this "un-addable" blocks list, if, for any reason, they want to get them displayed in the "Add a block" page.

Revision as of 07:07, 14 December 2021

Add a block cleanup
Project state In progress
Tracker issue MDL-73299 (epic)
Discussion Add a block cleanup for Moodle 4.0
Assignee Sara Arjona

Moodle 4.0


In the Add a block menu, the list of blocks is really long. This project is about figuring out how to reduce the list.

Disabling blocks if the feature is disabled

Blocks such as the blog menu, blog tags and recent blog entries should be disabled if blogs are disabled in advanced features.

Blocks this applies to:

  • Accessibility review
  • Blog menu
  • Blog tags
  • Recent blog entries
  • Comments
  • Course completion status
  • Flickr
  • Global search
  • Latest badges
  • Learning plans
  • Random glossary entry
  • Tags
  • Network servers

Disabling less useful blocks

Some blocks that we can consider disabling include:

  • Course summary
  • Feedback - as the block only works if a Feedback activity is added to the site home page
  • Remote RSS feeds - as RSS feeds are not used as much these days
  • Self completion - as the block is only needed if self completion is enabled in the course completion settings. Instead we can mention in the interface that for self completion, the block needs to be enabled by an administrator.


For new installs, the above blocks can be disabled by default.

For upgraded sites, we should check if there are any instances of the block and if not, disable it.

Letting themes define "un-addable" blocks

The Administration and Navigation blocks are only needed if the Classic theme is used. We can mention in the interface when enabling the Classic theme that the Administration and Navigation blocks need to be enabled and provide a link to the Manage blocks page.

Apart from that, a new theme setting will be added to let themes mark blocks as "un-addable" (to avoid them being displayed in the "Add a block" list page). This will allow boost to mark the following blocks as un-addable:

  • Navigation - as it has been improved in 4.0
  • Administration - as navigation has been improved in 4.0
  • Courses - as we have My courses in 4.0
  • Section links - as the course index in 4.0 provides access to sections


It will be a theme setting, so admins will still be able to remove them from this "un-addable" blocks list, if, for any reason, they want to get them displayed in the "Add a block" page.