Note: In Moodle 3.4 onwards, registration with custom community hubs has been removed from Moodle core. Custom hubs can still be created using the local_hub plugin and Moodle 3.4 sites wanting to register with a custom community hub need to install additional plugins.

Registering with a custom community hub

In Moodle 3.4 onwards, registration with custom community hubs has been removed from Moodle core. Moodle 3.4 sites wanting to register with a custom community hub need to install the following plugins:

mod_security in Apache version 1 and mod_security2 in Apache version 2 will return a 403 forbidden error when a URL that is not the local domain is passed as a get variable. mod_security on either the hub or client servers will block the completion of the client/hub registration process, even to Moodle.net, as within the registration process URL's are passed as get variables a number of times. An exception can be added to mod_security in Apache version 1 via a local .htacess file. However, this ability was removed in mod_security2. In mod_security2 the exception must be added to mod_security.conf of /conf.d. Related forum discussion: http://moodle.org/mod/forum/discuss.php?d=188933

How the hub software works

The hub software is implemented as a separate "local" plugin designed to be added to a standard install of Moodle 2.x. In this way the hub gets to use on all the features in the Moodle core API and benefits from maintenance of the core code. This plugin is no longer supported by Moodle HQ and is not compatible with Moodle 3.4 or later.

Once installed the whole site gets a new frontpage with a simple search box.

Please don't add the hub capabilities to an existing Moodle site with real courses. Although it may work, there are some opportunities for GUI confusion and some unknowns when it comes to security, so please just avoid it. Moodle is free, so it's trivial to install another clean copy to build your hub with.

How to set up a custom community hub server

Install Moodle 3.3 or earlier somewhere on a web server with a nice URL.

Where can I download hub server plugin?

Is the hub server plugin code maintained by Moodle HQ?

Not any longer. It is also known that the current code is not compatible with Moodle 3.4 or later.

Can anybody register with my hub?

For sites running Moodle 3.3 or earlier the registration and course publishing is included in standard Moodle distribution. For sites running Moodle 3.4 or later, as mentioned above, additional plugins are required.

Can I share a course with a specific theme?

Yes you can. However it is better to indicate in the publication creator notes that the theme will only be activated if:

The theme is installed

Course themes are enabled for the site

Can I share a course using a contributed module/block?

Yes. If this module/block is Moodle 2.0 compatible (with support for backup and restore in 2.0), the module and its data will be added to the shared course backup.

Can I share a course using a contributed local plugin?

The local plugin would need to be already installed on the destination Moodle site. Then this local plugin would need to be set up. Use publication creator notes to explain it.
Note that sharing does not save information related to a local plugin (i.e. the local plugin database is not backed up).

Can I share Moodle 1.9 courses?

It is not possible to share courses directly from a Moodle 1.9 site. However it is possible as follows:

Backup your course

Restore your course into a Moodle 2.2 site or later.

Share your course

I get an error when attempting to publish a course

The most likely cause of the error "An error occurred during the course publication (Access control exception | DEBUG INFO: Invalid token - token not found). Please try again later." is that the token is shared by multiple sites.

The solution is to unregister your Moodle site in Administration > Site administration > Server > Hubs then re-register it.