Accessibility to the code

Accessibility to the code

by Stefano Pettorossi -
Number of replies: 6

Hi to everyone,

I hope to be writing in the right place... I'm completely new in the "Moodle World" and I want to develop an activity plug-in, but I do not find certain information in this regard (I watched this https://docs.moodle.org/dev/Activity_modules and others but nothing, sorry...).

  1. where should I upload the plugin to make it publishable and installable on Moodle platforms? Respecting the standards and protocols to ensure that the updates work properly, etc.
  2. how does code ownership work? Once a plug-in is published, will it become public and will anyone have access to the source code? So anyone could "steal" it?
  3. there is the possibility of making it private or encrypted?

Thanks in advance to everyone and sorry for my english!

Regards

Average of ratings: -
In reply to Stefano Pettorossi

Re: Accessibility to the code

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Stefano, Before I continue, I should point out that Moodle is an open source community, we work on the basis of sharing ideas and code freely, so that we can all benefit from each others' work and experience. If you aren't comfortable working like this, you might find it difficult to particpate in the commuity. This being said, I'll attempt to answer your questions:

You should submit a zip file of your plugin to the Plugins directory. It will be reviewed and made available for other users to install. Many plugins are also hosted on GitHub or another public hosting platforms, for people to submit bug reports and patches.

You (or your employer, if you have one) will probably own the copyright of your code and assets. If you are unsure of this, speak to a lawyer. Moodle plugins are ususally released under the GNU General Public License (GPL), which means anyone can take your code and modify it, but if they distribute it or any modified version, they have to do so under the same license. This isn't "stealing", since it's explicitly permitted by the license. Again, if you are unsure of the license terms you wish to publish under, speak to a lawyer, ideally once familiar with open source licenses.

You don't have to make your plugin publicly available at all. You could give it directly to your clients or whoever you are developing it for, under your own license*. I don't know if the Plugins directory accept submissions that aren't GPL-licensed, but I suspect not. In any case, since PHP is an interpreted language, you will be distributing the readable source code.

*There is an argument that, since you will probably be copying code from Moodle or another plugin to develop your plugin, your work is derivative work of GPL code and must therefore be GPL. Again, speaking to a lawyer is a good idea if you are thinking of using a different license.

Average of ratings: Useful (4)
In reply to Mark Johnson

Re: Accessibility to the code

by Stefano Pettorossi -
Hi Mark,
thank you very very much! You have been impeccably exhaustive!
Thanks again!

PS: I love and am an estimator of the open-source world, but I still needed to collect this information wink
PPS: sorry again for my english smile
Average of ratings: Useful (1)
In reply to Stefano Pettorossi

Re: Accessibility to the code

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Happy to help, and no need to apologise for your English, I am a native speaker and I'm still learning smile

Average of ratings: Useful (1)
In reply to Mark Johnson

Re: Accessibility to the code

by Stefano Pettorossi -
I still have another question (maybe easier): if I submit my zipped plugin in Plugins directory, but without hosting it on GitHub (or similar), users can "edit" the source code of the plug-in? (like bugs correction, proposals for functional extensions, etc.)

And what if I hosting it on GitHub? People can "edit" the source code or can only "propose"?

In simple terms: is it possible to have control over one's plug-in without "unknown people" modifying / altering it? I guess so...

Thanks again!!!
In reply to Stefano Pettorossi

Re: Accessibility to the code

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Only you can upload a new version of the code onto the plugins database, though anyone could download it and modify their own copy locally.

GitHub, others can fork your code to their own repository, but you would have the ability to control merges and code changes on your own repository (which would be the one linked from the Moodle plugins database). You can allow others to request a merge change, but you control whether that merge happens.

In other words, although someone can download your code (from either the plugins database, or github) and can make their own changes to their copy of it (and can then upload their own version to their own repository), you control your own code and maintain your branch of it as the 'official' version of whatever you create.

(Note: you can, of course, give those permissions to others, but that is also in your own control)

Richard

Average of ratings: Useful (3)