Frankenstyle: Difference between revisions
(Sorted the list) |
|||
Line 15: | Line 15: | ||
* Activity modules: [mod] => /mod | * Activity modules: [mod] => /mod | ||
* Admin reports: [report] => /admin/report | |||
* Assignments: [assignment] => /mod/assignment/type | |||
* Authentication plugins: [auth] => /auth | * Authentication plugins: [auth] => /auth | ||
* Blocks: [block] => /blocks | * Blocks: [block] => /blocks | ||
* Course formats: [format] => /course/format | * Course formats: [format] => /course/format | ||
* Course reports: [coursereport] => /course/report | * Course reports: [coursereport] => /course/report | ||
* Database field types: [datafield] => /mod/data/field | |||
* Database presets: [datapreset] => /mod/data/preset | |||
* Editors: [editor] => /lib/editor | |||
* Enrolment plugins: [enrol] => /enrol | |||
* Filters: [filter] => /filter | |||
* Grade export plugins: [gradeexport] => /grade/export | * Grade export plugins: [gradeexport] => /grade/export | ||
* Grade import plugins: [gradeimport] => /grade/import | * Grade import plugins: [gradeimport] => /grade/import | ||
* Grade reports: [gradereport] => /grade/report | * Grade reports: [gradereport] => /grade/report | ||
* Local plugins: [local] => /local | |||
* Messaging consumers: [message] => /message/output | |||
* Mnet services: [mnetservice] => /mnet/service | * Mnet services: [mnetservice] => /mnet/service | ||
* | * Plagiarism plugins: [plagiarism] => /plagiarism | ||
* Portfolio plugins: [portfolio] => /portfolio | * Portfolio plugins: [portfolio] => /portfolio | ||
* Question behaviours: [qbehaviour] => /question/behaviour | * Question behaviours: [qbehaviour] => /question/behaviour | ||
* Question formats: [qformat] => /question/format | * Question formats: [qformat] => /question/format | ||
* Question types: [qtype] => /question/type | * Question types: [qtype] => /question/type | ||
* Quiz reports: [quiz] => /mod/quiz/report | * Quiz reports: [quiz] => /mod/quiz/report | ||
* Repository plugins: [repository] => /repository | |||
* SCORM reports: [scormreport] => /mod/scorm/report | * SCORM reports: [scormreport] => /mod/scorm/report | ||
* | * Themes: [theme] => /theme | ||
* User profile fields: [profilefield] => /user/profile/field | |||
* Webservice protocols: [webservice] => /webservice | |||
* Workshop allocation strategies: [workshopallocation] => /mod/workshop/allocation | * Workshop allocation strategies: [workshopallocation] => /mod/workshop/allocation | ||
* Workshop evaluation plugins: [workshopeval] => /mod/workshop/eval | * Workshop evaluation plugins: [workshopeval] => /mod/workshop/eval | ||
* | * Workshop grading forms: [workshopform] => /mod/workshop/form | ||
To get a definitive list, do <tt>print_object(get_plugin_types());</tt> in a Moodle 2.x install. | To get a definitive list, do <tt>print_object(get_plugin_types());</tt> in a Moodle 2.x install. |
Revision as of 09:48, 23 August 2011
'Frankenstyle' refers to the naming convention that is used to uniquely identify a Moodle plugin based on the type of plugin and its name.
Martin Dougiamas is credited with inventing the word 'frankenstyle'. (It is a great word!)
Format
Frankenstyle names have a prefix and then a name, separated by an underscore.
- The prefix is determined by the type of plugin. For example, the prefix for a module is mod.
- The name is the name of the plugin. (Plugin names are always made of lower-case letters.)
So the frankenstyle name for the quiz module is mod_quiz.
Plugin types
- Activity modules: [mod] => /mod
- Admin reports: [report] => /admin/report
- Assignments: [assignment] => /mod/assignment/type
- Authentication plugins: [auth] => /auth
- Blocks: [block] => /blocks
- Course formats: [format] => /course/format
- Course reports: [coursereport] => /course/report
- Database field types: [datafield] => /mod/data/field
- Database presets: [datapreset] => /mod/data/preset
- Editors: [editor] => /lib/editor
- Enrolment plugins: [enrol] => /enrol
- Filters: [filter] => /filter
- Grade export plugins: [gradeexport] => /grade/export
- Grade import plugins: [gradeimport] => /grade/import
- Grade reports: [gradereport] => /grade/report
- Local plugins: [local] => /local
- Messaging consumers: [message] => /message/output
- Mnet services: [mnetservice] => /mnet/service
- Plagiarism plugins: [plagiarism] => /plagiarism
- Portfolio plugins: [portfolio] => /portfolio
- Question behaviours: [qbehaviour] => /question/behaviour
- Question formats: [qformat] => /question/format
- Question types: [qtype] => /question/type
- Quiz reports: [quiz] => /mod/quiz/report
- Repository plugins: [repository] => /repository
- SCORM reports: [scormreport] => /mod/scorm/report
- Themes: [theme] => /theme
- User profile fields: [profilefield] => /user/profile/field
- Webservice protocols: [webservice] => /webservice
- Workshop allocation strategies: [workshopallocation] => /mod/workshop/allocation
- Workshop evaluation plugins: [workshopeval] => /mod/workshop/eval
- Workshop grading forms: [workshopform] => /mod/workshop/form
To get a definitive list, do print_object(get_plugin_types()); in a Moodle 2.x install.
Usages
Frankenstyle is used in:
Table names
All table names for a plugin must begin with its frankenstyle name (after the standard Moodle table prefix).
Examples: mdl_mod_quiz, mdl_mod_quiz_attempts
Capabilities
All capabilities for a plugin use the frankenstyle name, except with a / instead of a _.
Example: mod/quiz:viewattempt
Other places (TODO)
Please add more as they come up.