Skip to content

Plugin Compatibility

Dennis Heaney edited this page Aug 20, 2014 · 4 revisions

Introduction

This is a short guide to creating an plugin that is compatible with the Adapt authoring tool.

Presently, the tool only supports Extension, Theme, and Component plugin types. In future, the tool will support installation and editing of all the plugins supported by the Adapt output framework.

Developing a compatible plugin

You can follow the guide to create a standard Adapt framework plugin here. That guide will show how to create a plugin and register it with the Adapt bower registry, which will allow users of the adapt-cli tool to install and use your plugin.

To allow your plugin to be installed in the authoring tool, you need to take a few extra steps.

Update your bower.json

Two extra attributes are required in your bower.json:

  • displayName - this is the user friendly name for your plugin as it will appear in the editor when they user wants to select your plugin from the interface
  • component, extension, theme - depending on the type of plugin you have created, you will need to add the appropriate attribute from this list, and the value should be name of your plugin with the adapt- or adapt-contrib- prefix removed (for components, this is the id of the component as passed to Adapt.register)

Add a properties.schema file

To allow your plugin to expose attributes to the user for editing, you must define those attributes in a json-schema file named properties.schema. This is a standard json-schema file with a $ref attribute that allows your schema to inherit certain properties from pre-defined authoring tool schemas.

The $ref attribute for the various plugin types are:

  • Themes: http://localhost/plugins/content/theme/model.schema
  • Components: http://localhost/plugins/content/component/model.schema
  • Extensions: (not required)

Your properties.schema file is otherwise a standard json schema file defining the attributes that will be added to the course json output and read by your plugin.

Click on each plugin type for examples of properties.schema files for each of Extension, Theme, and Component.

Publish a specific version of your plugin

Finally, you must create a release for your plugin. You can do this by updating your package.json and bower.json files and updating the version attribute using semver syntax, and then by either tagging your git repository with the version number and pushing the tag, or by following the release guide on github

That's all that's required to make your plugin compatible with the Adapt authoring tool!

Clone this wiki locally