Creating plugins

From Joomdle
Revision as of 14:04, 6 November 2017 by Antonio (Talk | contribs)

Jump to: navigation, search

Joomdle makes heavy use of Joomla plugins in order to provide funcionality in a modular way. This makes it easier to add new features, without having to hack in core Joomdlde code.

You can create 2 types of Joomla plugins to improve/adapt Joomdle to your needs: - Joomla 3rd party integration plugins, like shop or social plugins. - Plugins that react to Moodle events, forwarded from Moodle to Joomla.


Joomla integration plugins

There are several types of Joomla integration plugins, each with their own events.

Using Joomdle events in your plugins will allow you to select them in Joomdle configuration.

For example, you could integrate with your custom profile component, creating a new plugin of type "joomdleprofile". For this, you would need to implement all the joomdleprofile events needed.

Types of plugins:

  • Shop integration (joomdleshop)
  • Profile integration (joomdleprofile)
  • Activity stream integration (joomdleactivities)
  • User points integration (joomdlepoints)
  • Profile types integration (joomdleprofiletypes)
  • Social groups integration (joomdlesocialgroups)


To see the events required in each one, you can take a look at the available integration plugins.


Moodle events plugins

These plugins will let you do things in Joomla to react to Moodle events. The events are forwarded from Moodle to Joomla by Moodle, when 'Forward Moodle events to Joomla' option is enabled in Joomdle configuration in Moodle.

Events available are:

  • onJoomdleRoleAssigned
  • onJoomdleRoleUnassigned
  • onJoomdleUserCreated
  • onJoomdleUserUpdated
  • onJoomdleUserDeleted
  • onJoomdleCourseCreated
  • onJoomdleCourseUpdated
  • onJoomdleCourseDeleted
  • onJoomdleCourseModuleCreated
  • onJoomdleCourseModuleUpdated
  • onJoomdleCourseModuleDeleted
  • onJoomdleQuizAttemptSubmitted
  • onJoomdleCourseCompleted
  • onJoomdleUserPasswordUpdated


You can get more info with the Joomdleevent Example plugin, that implements all available events, writing their arguments to a temp file so you can see them. This plugin can be downloaded at [1]