What type of plugin must I create for this?

What type of plugin must I create for this?

by Evans Thomas -
Number of replies: 4
Hi everyone,
I have just started learning moodle programming. I need to add functionality in moodle to categorise students site-wide, into groups. These groups will themselves be grouped which in turn will be grouped and it goes on. What type of plugin would you suggest for this?

Here basically, I need to have a full page with the required UI. I need the page to be called from a sub-menu in Site Administration. Can I implement this as a type of plugin, or do I have to do it some other way?
Thanks
Evans
Average of ratings: -
In reply to Evans Thomas

Re: What type of plugin must I create for this?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Evans,
It's likely that forthcoming version 2.0 of Moodle will do what you want. Please install a test Moodle 2.0 and find out how it works before re-inventing the wheel.wink
Joseph

In reply to Evans Thomas

Re: What type of plugin must I create for this?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I would do this as an admin 'report', I think. An admin report does not have to actually be a report. I just lives as a subfolder of admin/report, and has an index.php file that can be a script that does anything.

As Joseph says, have a look at the new Cohorts feature in Moodle 2.0. It may be that your plugin is most naturally an interface for creating cohorts.
In reply to Tim Hunt

Re: What type of plugin must I create for this?

by Evans Thomas -

Yeah, I will be using cohorts, but I need to have a multi-level hierarchy - ie., groups of groups of groups of cohorts.

Why do you suggest admin report over some other type of plugin? Is there a website/page where I can get info about each type of plugin and what each is meant for?

In reply to Evans Thomas

Re: What type of plugin must I create for this?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There is a probably complete list of plugin types at Development:Developer_documentation#Make_a_new_plugin. For a definitive list of plugin types, execute the following PHP script in a Moodle 2.0 install:

require_once('config.php');
print_object(get_plugin_types());

The purpose of most plugins is clear (for example, authentication plugin). It is only a few situations, like this one, where there is some ambiguity, and to be honest, in these cases, none of the plausible answers will be wrong. It is just that some of the choices will be slightly less work, depending on exactly what you want to do.