Note:

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

Frankenstyle

From MoodleDocs
Revision as of 13:16, 12 November 2010 by sam marshall (talk | contribs) (New page: '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 ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

'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

  • Module: mod_
  • Admin report: report_
  • Course report: coursereport_
  • ... (TODO - somebody else add these as they come up please)

Usages

Frankenstyle is used in:

  • Table names: All table names for a plugin must begin with its frankenstyle name.
  • Capabilities: All capabilities for a plugin use the frankenstyle name, except with a / instead of a _, so mod/quiz:viewattempt for instance.