Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Current Totara ships with a single marketplace plugin for GO1 content, however partners can implement their own marketplace plugins using the instructions on this page.

Code overview

Content marketplace plugins should be created inside the totara/contentmarketplace/contentmarketplaces/ directory as a sub-folder. The plugin should use the type 'contentmarketplace' e.g. the $plugin->component in version.php should be 'contentmarketplace_[foldername]'.

...

The design of content marketplace plugins is such that the majority of the logic for the behaviour is defined by the specific plugin type, so once a basic plugin is in place it is up to the plugin to define the screens to show and actions to perform. The GO1 plugin provides a good reference implementation which shows what is possible and can be copied where it is useful.

Implementation approach

The general approach to implementing a contentmarketplace plugin might be:

...

In many cases the GO1 reference implementation could be used as a starting point for implementing the steps above. You should also look at the totara/contentmarketplace/classes/plugininfo.php class as this defines some methods that return class instances used by the explorer.php page.

Workflows

You may also want to make use of workflows in your plugin which are documented here:

...