Create a plugin

Re: Create a plugin

by Michael Milette -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Manoj,

Unfortunately I don't know if any videos that could help you. Understanding English is going to be a prerequisite to your success. Moodle documentation and source code, even the programming language PHP and it's documentation are all in English.

The best place to start creating a new plugin like that in Moodle is to base it on another existing plugin with a similar functionality such as the one for Zoom or BigBlueButton, preferably one that is compatible with the current version of Moodle. Otherwise you will just end up having to troubleshoot compatibility issues for nothing. You can find these in the Moodle plugins repository at https://moodle.org/plugins .

You may want to try a few to see which one works best and would be most similar to what you want to do. Remember that the more options there are, the more complex the code will be behind it. Do not bother with the one for MS Teams. It ties into other Office 365 and Azure which is way more complex than what you need.

STEP 1: Install the existing plugin as is to make sure you have a it fully configured and working. There is little point in basing your new plugin on one that does not work or that you cannot figure out.

STEP 2: Make a copy of the plugin and get the copy to work. This may involve renaming files, directories, classes and function names and language strings. Sometimes capabilities too. The key will be to understand how the original code works so that you can customize it. Consider using XDEBUG to trace through the execution of the code. I find it can help a lot.

STEP 3: Once you have the copy working with the original service, you can start to customize the code to make it work with your video conferencing service instead.

STEP 4: As you will be working with GPL licensed code, be sure to include attribution and the original copyright notice in all of the source code files and documentation from the original project.

STEP 5: If this is for a service provider that others might use, I am sure people would appreciate it if you would be so kind as to share your new plugin with the world in the Moodle repository. After all, it was thanks to the work of others that you will be able to create your own plugin.

Hope you found this information helpful.

Best regards,

Michael
Average of ratings: Useful (1)