Note: You are currently viewing documentation for Moodle 3.7. Up-to-date documentation for the latest stable version of Moodle may be available here: Community hubs.

Community hubs: Difference between revisions

From MoodleDocs
(removing Managing a Moodle course template)
m (→‎See also: removing out-of-date links)
 
(13 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Improve}}
{{Managing a Moodle site}}
A community hub is a directory of courses for public use or for private communities.
{{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.}}
* [[Search for courses]]
* [[Advertise courses]]
* [[Share courses]]
* [[Import courses from hubs]]
* [[Hub administration]]
* [[Mooch|MOOCH]]
* [[Hub FAQ]]


==What is a community hub?==
==Registering with a custom community hub==
A community hub is a directory of courses for public use or for private communities.


[[Image:Community-hubs-flowchart.png]]
To register with [https://moodle.net Moodle.net], please see [[Site registration]].


The diagram above shows the basic idea. The systems in this diagram are:
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:
* [
;Ordinary Moodle site: A typical Moodle site with teachers who want to download course templates and/or users who want to connect (enrol) with external communities
;Publishing site: A Moodle site that wants to make some of its courses available for download
;Community site: A Moodle site that provides courses that are enrollable
;Moodle Hub Server: A new Moodle plugin for listing registered courses that are ''downloadable'' or ''enrollable''.  The default hub will be installed at hub.moodle.org, but there can be many others.


Community Hubs in Moodle 2.0 video:
* [https://github.com/moodlehq/moodle-tool_customhub tool_customhub] for registration and course publishing
* [https://github.com/moodlehq/moodle-block_customhub block_customhub] for searching courses published on custom hubs


<mediaplayer>http://www.youtube.com/watch?v=kFLDOcJ3cbg</mediaplayer>
==Running a custom community hub==


==Downloadable courses==
Running a hub server is not something you should undertake lightly. 


# Sites that want to publish certain courses and make them downloadable can register them with one or more hub servers.
As the hub administrator you are responsible for the content in the hub, and you need to put in place processes to:
# The hub will check the data and make sure the course zip is downloadable, caching a copy locally.  The hub may also have a security process to check the download for trojan horses, bad content, etc.
* verify all the course content is clean (of porn or malicious javascript)
# The download process may trigger the backup process on the original server if it hasn't been done already.
* manage registered sites and their status
# Later, Moodle users (who have permissions to do so) can connect to a hub to search for downloadable courses and choose one.
* maintain the quality of the listings through editing
# The Moodle site downloads the file and makes it available to the Moodle user so they can now continue to restore it normally.


==Enrollable courses==
=== Minimal Requirements ===


# Sites that want to publish certain courses for the public to enrol in can register them with one or more hub (including the main one at moodle.org).
Below is a list of Minimal requirements for running a custom community hub.
# Later, any Moodle user can connect to a hub (via Community block in their site) to search and find courses they want to join.
# They click on a link to be sent to the other site so that they can enrol there.


==Administrator manuals==
* MySQL - minimum version 5.0.25
* [[Site registration]] - Get your Moodle site "community hub ready"
* PHP 5.3.2
* [[Hub_administration|Hub server administration]]
* Apache
* [https://docs.moodle.org/en/Community_block#Capabilities Capabilities required to search for courses]
* ensure that the site you will be registering does not use any upper case letters (even though those are perfectly valid).  ''EG: moodle.org/2012-Spring will not work!''
* ensure that the following php.ini variables are set to "On"
** allow_url_fopen: This setting is required the hub to be able to register a site.  If this option is not enabled, you will be given the [[error/local_hub/cannotregisternotavailablesite|cannotregisternotavailablesite]] error. Related tracker issue: https://tracker.moodle.org/browse/CONTRIB-3063
* 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


==Teacher manuals==
===How the hub software works===
* [[Publish_a_course|How to publish a course]]
* [[Import_a_community_course|How to install a community course]]
* [[Join_a_community_course|How to join a community course]]


==Student manuals==
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.
* [[Join_a_community_course|How to join a community course]]


==Developer references ==
Once installed the whole site gets a new frontpage with a simple search box.
* [[Development:Community hub]]
* [[Development:Community hub - technical specification]]


==See also==
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.


* [[Hub FAQ]]
===How to set up a custom community hub server===
* Using Moodle [http://moodle.org/mod/forum/view.php?id=7330 Hub servers forum]
 
*[[MNet]] - a Moodle network
# Install Moodle 3.3 or earlier somewhere on a web server with a nice URL.
# Download the latest hub plugin from https://github.com/moodlehq/moodle-local_hub (this plugin is no longer supported, you may need to modify it locally yourself)
# Save the zip into the /local directory of Moodle and unzip, producing /local/hub
# Visit the "Notifications" page in Moodle (/admin) to complete the upgrade and install the hub software.
# Uncheck password policy (search 'passwordpolicy' in admin search)
# Allow extended characters in usernames (search 'extendedusernamechars' in admin search)
# Enable web services for the hub (''Administration > Site Administration > Advanced features'')
# Enable the XML-RPC protocol (''Administration > Site Administration > Plugins > Web services > Manage protocols'')
# Set up the SMTP (''Administration > Site Administration > Plugins > Message outputs > Email'')
# Set up the recaptcha (''Administration > Site Administration > Plugins > Authentication > Manage authentication'')
# Set up your hub (''Administration > Site Administration > Hub > Settings'') Supply a description, enable the hub, supply a hub password.
# You will also need to set up mailing list using software that can be downloaded from https://sendy.co/
 
Congratulations!  You now have a working hub with no content!
 
===Managing sites===
 
In ''Site administration > Hub > Manage sites'', you can:
* Prioritise a site, so that it is listed higher than unprioritised sites on the hub. By default, sites are listed in alphabetical order. A prioritised site is always trusted.
* Trust a site: when a site is trusted, any published course is immediately available
* Delete a site: delete a site from the database. A message will be sent to the site administrator.
* Settings: you can change some information as the name, the description, the language...
* Make a site visible: only sites declared as visible appear on the the site list (currently the site list hasn't been implemented)
 
===Managing courses===
 
In ''Site administration > Hub > Manage courses'', you can:
* Delete a course: delete a course from the database.
* Settings: you can change some information as the name, the description, the language...
* Make a course visible: decide if the course is displayed on search result
 
=== Important things about roles, users and web services ===
 
A hub server uses [[Web services]] a lot. For this reason it is important to understand the web services administration, and what happens if you change some roles/users/services.
 
==== Roles ====
The hub server creates on the fly some roles that you should ''never delete/modify'':
* one role for the hub directory
* one role for registered sites
* one role for public sites
 
==== Users ====
The hub server creates on the fly some users that you should ''never delete/modify'':
* one user for the hub directory
* one user for public access
* as many users as registered sites
 
==== Services ====
The hub creates during installation some web services that you should ''never delete/modify'':
* one service for Hub directory
* one service for Registered sites
* one service for Public sites
 
It also creates tokens on the fly. These tokens are not displayed on the token management list, so you cannot accidentally delete them.
 
==Community hubs FAQ==
 
===What is a hub server?===
A hub server is a Moodle plugin. It transforms a freshly installed Moodle site into a hub server. A hub server is used to store course backups that have been shared by registered Moodle sites.
 
===Can I use a hub server as a normal Moodle site?===
 
For security reasons it is better not to do so.
 
===Where can I download hub server plugin?===
 
The hub server plugin is available for download from the modules and plugins database http://moodle.org/plugins/view.php?plugin=local_hub
 
===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 [[#Registering_with_a_custom_community_hub|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 [[Development:Backup 2.0 for developers|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.
 
 
[[Category:Plugin]]


[[ja: コミュニティハブ]]
[[ja: コミュニティハブ]]
[[en:Community hubs]]
[[de:Community Hubs]]

Latest revision as of 14:36, 3 September 2019

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

To register with Moodle.net, please see Site registration.

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:

Running a custom community hub

Running a hub server is not something you should undertake lightly.

As the hub administrator you are responsible for the content in the hub, and you need to put in place processes to:

  • verify all the course content is clean (of porn or malicious javascript)
  • manage registered sites and their status
  • maintain the quality of the listings through editing

Minimal Requirements

Below is a list of Minimal requirements for running a custom community hub.

  • MySQL - minimum version 5.0.25
  • PHP 5.3.2
  • Apache
  • ensure that the site you will be registering does not use any upper case letters (even though those are perfectly valid). EG: moodle.org/2012-Spring will not work!
  • ensure that the following php.ini variables are set to "On"
  • 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

  1. Install Moodle 3.3 or earlier somewhere on a web server with a nice URL.
  2. Download the latest hub plugin from https://github.com/moodlehq/moodle-local_hub (this plugin is no longer supported, you may need to modify it locally yourself)
  3. Save the zip into the /local directory of Moodle and unzip, producing /local/hub
  4. Visit the "Notifications" page in Moodle (/admin) to complete the upgrade and install the hub software.
  5. Uncheck password policy (search 'passwordpolicy' in admin search)
  6. Allow extended characters in usernames (search 'extendedusernamechars' in admin search)
  7. Enable web services for the hub (Administration > Site Administration > Advanced features)
  8. Enable the XML-RPC protocol (Administration > Site Administration > Plugins > Web services > Manage protocols)
  9. Set up the SMTP (Administration > Site Administration > Plugins > Message outputs > Email)
  10. Set up the recaptcha (Administration > Site Administration > Plugins > Authentication > Manage authentication)
  11. Set up your hub (Administration > Site Administration > Hub > Settings) Supply a description, enable the hub, supply a hub password.
  12. You will also need to set up mailing list using software that can be downloaded from https://sendy.co/

Congratulations! You now have a working hub with no content!

Managing sites

In Site administration > Hub > Manage sites, you can:

  • Prioritise a site, so that it is listed higher than unprioritised sites on the hub. By default, sites are listed in alphabetical order. A prioritised site is always trusted.
  • Trust a site: when a site is trusted, any published course is immediately available
  • Delete a site: delete a site from the database. A message will be sent to the site administrator.
  • Settings: you can change some information as the name, the description, the language...
  • Make a site visible: only sites declared as visible appear on the the site list (currently the site list hasn't been implemented)

Managing courses

In Site administration > Hub > Manage courses, you can:

  • Delete a course: delete a course from the database.
  • Settings: you can change some information as the name, the description, the language...
  • Make a course visible: decide if the course is displayed on search result

Important things about roles, users and web services

A hub server uses Web services a lot. For this reason it is important to understand the web services administration, and what happens if you change some roles/users/services.

Roles

The hub server creates on the fly some roles that you should never delete/modify:

  • one role for the hub directory
  • one role for registered sites
  • one role for public sites

Users

The hub server creates on the fly some users that you should never delete/modify:

  • one user for the hub directory
  • one user for public access
  • as many users as registered sites

Services

The hub creates during installation some web services that you should never delete/modify:

  • one service for Hub directory
  • one service for Registered sites
  • one service for Public sites

It also creates tokens on the fly. These tokens are not displayed on the token management list, so you cannot accidentally delete them.

Community hubs FAQ

What is a hub server?

A hub server is a Moodle plugin. It transforms a freshly installed Moodle site into a hub server. A hub server is used to store course backups that have been shared by registered Moodle sites.

Can I use a hub server as a normal Moodle site?

For security reasons it is better not to do so.

Where can I download hub server plugin?

The hub server plugin is available for download from the modules and plugins database http://moodle.org/plugins/view.php?plugin=local_hub

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:

  1. Backup your course
  2. Restore your course into a Moodle 2.2 site or later.
  3. 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.