Note:

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

Plugin types: Difference between revisions

From MoodleDocs
No edit summary
(Added a table)
Line 1: Line 1:
The M in Moodle stands for modular, and the easiest, most maintainable way to add new functionality to Moodle is by using one of the many plugin APIs.  
The M in Moodle stands for modular, and the easiest, most maintainable way to add new functionality to Moodle is by writing a plugin using one of the many plugin APIs:
 
== Plugin types ==
 
{| class="nicetable"
|-
! Plugin type
! Component name
! Moodle path
! Description
! Moodle versions
|-
| [[Activity modules]]
| mod
| /mod
| Activity modules are the most important type of plugins.  They provide activities in courses.  For example: Forum, Quiz and Assignment.
| All
|-
| [[Admin reports]]
| report
| /admin/report
| Provides useful views of data in a Moodle site, for admins only.
| All until 2.1 (for 2.2+ see [[Reports]])
|-
| [[Admin tools]]
| tool
| /admin/tool
| Provides utility scripts useful for admins to examine and modify a Moodle site
| 2.2+
|-
| [[Assignment types]]
| assignment
| /mod/assignment/type
| Different forms of assignments to be graded by teachers
| 1.x - 2.2
|-
| [[Authentication plugins]]
| auth
| /auth
| Allows connection to external sources of authentication
| 2.0
|-
| [[Blocks]]
| block
| /blocks
| Small information-displays or tools that can be moved around pages
| All
|-
| [[Course formats]]
| format
| /course/format
| Different ways of laying out the activities and blocks in a course
| All
|-
| [[Course reports]]
| coursereport
| /course/report
| Reports of activity within the course
| All until 2.1 (2.2+ see [[Reports]])
|-
| [[Database fields]]
| datafield
| /mod/data/field
| Different types of data that may be added to databases
| All
|-
| [[Database presets]]
| datapreset
| /mod/data/preset
| Pre-defined templates for databases
| All
|-
| [[Editors]]
| editor
| /lib/editor
| Alternative text editors for editing content
| 2.0+
|-
| [[Enrolment plugins]]
| enrol
| /enrol
| Ways to control who is enrolled in courses
| 2.0+
|-
| [[Filters]]
| filter
| /filter
| Automatically convert, highlight, and transmogrify text posted into Moodle.
| 1.6+
|-
| [[Gradebook export]]
| gradeexport
| /grade/export
| Export grades in various formats
| 1.9+
|-
| [[Gradebook import]]
| gradeimport
| /grade/import
| Import grades in various formats
| 1.9+
|-
| [[Gradebook reports]]
| gradereport
| /grade/report
| Display/edit grades in various layouts and reports
| 1.9+
|-
| [[Grading methods]]
| gradingform
| /grade/grading/form
| Interfaces for actually performing grading in activity modules (eg Rubrics).
| 2.2+
|-
| [[Local plugins]]
| local
| /local
| Generic plugins for local customisations
| 2.0+
|-
| [[Messaging consumers]]
| message
| /message/output
| Send messages to users via different methods (email, sms, jabber, etc)
| 2.0+
|-
| [[Mnet services]]
| mnetservice
| /mnet/service
|
|
|-
| [[Plagiarism plugins]]
| plagiarism
| /plagiarism
| Define external services to process submitted files and content
| 2.0+
|-
| [[Portfolio plugins]]
| portfolio
| /portfolio
| Connect external portfolio services as destinations for users to store Moodle content
| 1.9+
|-
| [[Question behaviours]]
| qbehaviour
| /question/behaviour
|
|
|-
| [[Question formats]]
| qformat
| /question/format
|
|
|-
| [[Question types]]
| qtype
| /question/type
|
|
|-
| [[Quiz reports]]
| quiz
| /mod/quiz/report
| Perform analysis of quiz attempts
|
|-
| [[Reports]]
| report
| /report
| Provides useful views of data in a Moodle site for admins and teachers
| 2.2+
|-
| [[Repository plugins]]
| repository
| /repository
| Connect to external sources of files to use in Moodle
| 2.0+
|-
| [[SCORM reports]]
| scormreport
| /mod/scorm/report
| Analysis of SCORM attempts
| 2.2+
|-
| [[Themes]]
| theme
| /theme
| Change the look of Moodle by changing the the HTML and the CSS.  See also [[Themes 1.9]].
| 2.0+
|-
| [[User profile fields]]
| profilefield
| /user/profile/field
| Add new types of data to user profiles
| 1.9+
|-
| [[Webservice protocols]]
| webservice
| /webservice
| Define new protocols for web service communication (such as SOAP, XML-RPC, JSON, REST ...)
| 2.0+
|-
| [[Workshop allocation strategies]]
| workshopallocation
| /mod/workshop/allocation
|
| 2.0+
|-
| [[Workshop evaluation plugins]]
| workshopeval
| /mod/workshop/eval
|
| 2.0+
|-
| [[Workshop grading forms]]
| workshopform
| /mod/workshop/form
|
| 2.0+
|}
 
 


There are many '''types''' of plugin you can write:


*[[Activity modules]]
**and [[Subplugins]] (2.0 Onwards)
*[[Admin reports]]
*[[Admin tools]]
*[[Assignment types]]
*[[Authentication plugins]]
*[[Blocks]]
*[[Course formats]]
*[[Course reports]]
*Course importers (2.0 onwards)
*[[Database fields]]
*[[Database presets]]
*[[Editors]]
*[[Enrolment plugins]]
*[[Filters]]
*[[Gradebook export]]
*[[Gradebook import]]
*[[Gradebook reports]]
*[[Grading methods]]
*[[Local plugins]]
*[[Messaging consumers]] (2.0 onwards)
*[[Mnet services]]
*[[Plagiarism plugins]] (2.0 onwards)
*[[Portfolio plugins]] (2.0 onwards)
*[[Question behaviours]]
*[[Question formats]]
*[[Question types]]  (2.0 and 2.1 onwards)
*[[Quiz reports]]
*[[Repository plugins]] (2.0 onwards)
*[[Resource types]] (1.9 and earlier only)
*[[SCORM reports]]
*[[Themes]] (2.0 onwards) (see [[Themes 1.9]] for older versions).
*[[User profile fields]]
*[[Webservice protocols]]
*Workshop allocators (2.0 onwards)
*Workshop forms (2.0 onwards)
*Workshop evaluators (2.0 onwards)


Other information that applies to all types of plugins:
Other information that applies to all types of plugins:

Revision as of 09:08, 30 January 2012

The M in Moodle stands for modular, and the easiest, most maintainable way to add new functionality to Moodle is by writing a plugin using one of the many plugin APIs:

Plugin types

Plugin type Component name Moodle path Description Moodle versions
Activity modules mod /mod Activity modules are the most important type of plugins. They provide activities in courses. For example: Forum, Quiz and Assignment. All
Admin reports report /admin/report Provides useful views of data in a Moodle site, for admins only. All until 2.1 (for 2.2+ see Reports)
Admin tools tool /admin/tool Provides utility scripts useful for admins to examine and modify a Moodle site 2.2+
Assignment types assignment /mod/assignment/type Different forms of assignments to be graded by teachers 1.x - 2.2
Authentication plugins auth /auth Allows connection to external sources of authentication 2.0
Blocks block /blocks Small information-displays or tools that can be moved around pages All
Course formats format /course/format Different ways of laying out the activities and blocks in a course All
Course reports coursereport /course/report Reports of activity within the course All until 2.1 (2.2+ see Reports)
Database fields datafield /mod/data/field Different types of data that may be added to databases All
Database presets datapreset /mod/data/preset Pre-defined templates for databases All
Editors editor /lib/editor Alternative text editors for editing content 2.0+
Enrolment plugins enrol /enrol Ways to control who is enrolled in courses 2.0+
Filters filter /filter Automatically convert, highlight, and transmogrify text posted into Moodle. 1.6+
Gradebook export gradeexport /grade/export Export grades in various formats 1.9+
Gradebook import gradeimport /grade/import Import grades in various formats 1.9+
Gradebook reports gradereport /grade/report Display/edit grades in various layouts and reports 1.9+
Grading methods gradingform /grade/grading/form Interfaces for actually performing grading in activity modules (eg Rubrics). 2.2+
Local plugins local /local Generic plugins for local customisations 2.0+
Messaging consumers message /message/output Send messages to users via different methods (email, sms, jabber, etc) 2.0+
Mnet services mnetservice /mnet/service
Plagiarism plugins plagiarism /plagiarism Define external services to process submitted files and content 2.0+
Portfolio plugins portfolio /portfolio Connect external portfolio services as destinations for users to store Moodle content 1.9+
Question behaviours qbehaviour /question/behaviour
Question formats qformat /question/format
Question types qtype /question/type
Quiz reports quiz /mod/quiz/report Perform analysis of quiz attempts
Reports report /report Provides useful views of data in a Moodle site for admins and teachers 2.2+
Repository plugins repository /repository Connect to external sources of files to use in Moodle 2.0+
SCORM reports scormreport /mod/scorm/report Analysis of SCORM attempts 2.2+
Themes theme /theme Change the look of Moodle by changing the the HTML and the CSS. See also Themes 1.9. 2.0+
User profile fields profilefield /user/profile/field Add new types of data to user profiles 1.9+
Webservice protocols webservice /webservice Define new protocols for web service communication (such as SOAP, XML-RPC, JSON, REST ...) 2.0+
Workshop allocation strategies workshopallocation /mod/workshop/allocation 2.0+
Workshop evaluation plugins workshopeval /mod/workshop/eval 2.0+
Workshop grading forms workshopform /mod/workshop/form 2.0+



Other information that applies to all types of plugins:

Please see the Guidelines for contributed code for an overview of how to contribute to the Moodle code.

Sometimes it is not possible to write a proper plugin for what you want to do, in which case you may have to resort to using the local customisations hook.

See also