Search code examples
pluginsblockmoodle

What is deference between local plugin and block plugin in Moodle?


I have to make a page to manage a series of videos in a Moodle system, but I am wondering that if I use block plugin or local plugin for managing videos; or may be basically I should use block to creating per video and editing that specific video and add local plugin to retrieving list of all videos and managing them... (a combination of local plugin by block plugin)

...


Solution

  • The main difference between a local plugin and a block plugin, is that a block plugin is designed to be added into the side panel or user dashboard as a 'block' of content. A local plugin, on the other hand, does not have a defined space to appear on the page (although it may hook into the site navigation in order to provide a link to access the pages inside the local plugin).

    Both can run scheduled background tasks, define database tables, trigger and handle events, etc. There are also a few hooks into the code that local plugins have access to (and which not all other plugins have) - you can find the details here: https://github.com/moodle/moodle/blob/master/local/readme.txt