Creating plugins: Difference between revisions

From Joomdle
Jump to navigationJump to search
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Intro===
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.
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:
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.
- Joomla 3rd party integration plugins, like shop or social plugins.
- Plugins that react to Moodle events, forwarded from Moodle to Joomla.


- Plugins that react to Moodle events, forwarded from Moodle to Joomla.


==Joomla integration plugins==
===Joomla integration plugins===


There are several types of Joomla integration plugins, each with their own events.
There are several types of Joomla integration plugins, each with their own events.
Line 26: Line 29:




==Moodle events 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.
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.
Line 47: Line 50:




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:
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 [http://www.joomdle.com/download/category/35-development?download=102:joomdleevent-example]
 
[http://www.joomdle.com/download/category/35-development?download=102:joomdleevent-example]

Latest revision as of 17:05, 4 February 2019

Intro

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]