Module vs Plugin

Module vs Plugin

by Nuno Sousa -
Number of replies: 4
Hi all,

I have a few questions:

First:
What is the difference between a module and a plug in? (if any)
I know how surprising this question is, but I've looked and just didn't understand... Some users mention modules, others plug ins... sad

Second:
For my master theses, I need to develop a moodle application that generates and redirects the moodle user to the add result of a constant URL and a random part.
example: http://testing.pt/experiment/ + (random variable)

This random variable, also needs to be send by TCP/IP, or, made available by other means to another machine.

So, any ideas on how to to make this work?
Should it be by creating a module?
Does anyone know any thing of the sort? (I've looked and failed)

Thanks in advance for any assistance.
Average of ratings: -
In reply to Nuno Sousa

Re: Module vs Plugin

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Plugins are the generic term for any sort of code package that can be added to Moodle to extend fuctionality. There's about 20 or more different types of these.

Modules usually refers to one type of plugin, the activity modules that are stored in the /mod directory. This is probably what you want for your project.
Average of ratings: Useful (1)
In reply to Martin Dougiamas

Re: Module vs Plugin

by Nuno Sousa -
Hi,

Now I understand what people are saying. smile

But, I need more help, is there any base module that one can use to start development? Or, should I start by one that is just close to what I need, and change it?

Another thing that I'm confused. Can I change a module after it's installed in moodle, and test it on the fly?

Once again, thanks.
In reply to Nuno Sousa

Re: Module vs Plugin

by Matt Gibson -
There used to be a blank module in CVS contrib, but I'm not sure if its up to date. You could have a poke about...
In reply to Nuno Sousa

Re: Module vs Plugin

by Nuno Sousa -
Hi,

I've managed to start developing a new module, and I already found howto do some nice things. :P

Creating functions and so on.

But, now I face another question that at least looks simples, but I can't solve it.

The thing is, in the file mod_form.php I have this line of code:

class mod_ontheweb_mod_form extends moodleform_mod {
function definition() {
...
$mform->addElement('text', 'ipcliente', ' IP do cliente', get_string('ipcliente'));
$mform->setType('ipcliente', PARAM_TEXT);
$mform->addRule('ipcliente', null, 'required', null, 'client');

And now, I want to read the "ipcliente" variable in view.php or lib.php.
The question is, how do I access that variable?

It should be in $mform->ipclient, no?