"Finding the right Plugin type"
http://moodle.org/mod/forum/discuss.php?d=116773
"Proposed Pages Block - Plugin, patch, or package?"
http://moodle.org/mod/forum/discuss.php?d=118793
I still can't figure out what exactly is the difference between a plugin, a module, and a block. Are they mere synonyms?
But why does the one live in /mod and the other in /blocks?
I hope someone can enlighten me.
Thanks in advance!
Frank
(This is different from, say Drupal, where there is only one type of plugin, and a plugin can choose to implement any number of hooks.)
I'm still struggling to get this straight. When I look at the Site Administration block there are three categories under Modules:
* Activities
* Blocks
* Filters
Activities is the stuff from the /mod folder, Blocks the stuff from /blocks, and Filters the stuff from /filter.
(BTW why is the folder name plural for blocks and singular for filters?).
Those three are collectively called "plug-ins" or "modules", but besides residing in different folders and therefore appearing in different places in the administration menu there is no difference (for example in scope), right?
Regards,
Frank
Re: Plugin, module, block - what's the difference?
I only can agree with you 100%. IMO it should be:
- Plugins:
- Modules
- Blocks
- Filters
It's one tiny thing I have thought about in the past, perhaps it's time to change it?
Ciao
P.S.: In fact, due there are also other plugins (auth, enrol...) perhaps it wouldn't be wrong to add some "aliases" to the corresponding pages in that menu item, in order to have all the "pluggable" components together.
Re: Plugin, module, block - what's the difference?
Plugins
- Activity modules
- Blocks
- Filters
- Repositories
- Portfolios
- Question types
The reason for the plural directory "blocks" is that it was a mistake by PJ (who developed blocks) and unfortunately by the time I noticed the error it was in CVS and too late to fix. Folders and file names are generally always singular in Moodle.
Re: Plugin, module, block - what's the difference?
To repeat what has already been written above.
plugin = any type of code that can be 'plugged-in' to extend Moodle
activity module = a particular type of plugin for adding a new activity to a course (e.g. forum, quiz, assignment), instead of, for example, adding a new course enrolment type (enrol) or quiz question type (qtype) or block to the edge of the page (block).
For the list of plugin types, see http://docs.moodle.org/dev/Plugins
Also note, in certain situations (such as in the administration interface), it is useful to distinguish "standard plugins" (that come with Moodle) from "add-ons" (plugins added to clean Moodle installation). However, from development point of view, they all are equal (some of them are just more equal than the others ).
Re: Plugin, module, block - what's the difference?
mod = in course activities
blocks = literal blocks that you turn on and off that appear usually to the left and right of the center content. Block display is determined a lot by the theme or the person with rights to turn them on or off and move them
report = custom reports that you may develop or others, that appear in the Site Admin | Report list. I have created several of these over the years for things like enrollment numbers, tardy course access, account in the advisor role, messaging between accounts
report/grade = custom grade report that you can develop.
The code to build report here is located in webroot/report
And this is my custom grade report whose code is placed in webroot/grade/report. Access to the report is located via the gradebook.
Code for blocks is placed in webroot/blocks.
Code for course activities is placed in webroot/mod
Each plugin type follows the same moodle development guidelines, but *plugs in and appears in different places.
Cheers
So I now understand from the above that there are many types of Plugins. Can someone enlighten me on what is the difference between each type and if I'll develop, what would be the criteria to call it a module or to call it a block?
Thank you very much.
Activity - a separate activity that can be added to a course via the 'Add Activity' menu (e.g. a quiz, an assignment, a glossary)
Block - one of the blocks that sits on the right or left of the main course list (e.g. 'recent items', 'calendar', 'blog tags')
Theme - changes the look & feel of moodle site/course, using custom colours & graphics
Question - a new type of question for the quizzes (e.g multiple-choice, short answer, essay)
Assignment Type - a type of assignment for a student to attempt (e.g. 'upload single file', 'upload multiple files', 'offline activity')
Filter - something that parses blocks of text and changes it in some way (e.g. hyperlink known words to a glossary, remove naughty words)
Hope that helps to get you started - there is more detail here: http://docs.moodle.org/en/Development#Make_a_new_plugin