Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: Community hub.

Development:Community hub: Difference between revisions

From MoodleDocs
 
(150 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Moodle 2.0}}
{{Moodle 2.0}}


This page describes a functional spec for the "Moodle Community Hub" project, which consists of several new features in Moodle 2.0.  
* '''PROJECT STATE: implemented'''
* '''MAIN TRACKER ISSUE''': MDL-19309
* '''DISCUSSION AND COMMENTS''': [http://moodle.org/mod/forum/view.php?id=7330 Hub servers] forum in Using Moodle
* '''MAIN AUTHORS''': [[User:Martin_Dougiamas|Martin Dougiamas]] and [[User:jerome_mouneyrac|Jerome Mouneyrac]]
 
 
 
This page describes an overall functional specification for the "Moodle Community Hub" project, which consists of a new system (the Moodle Hub Server) and several new features in Moodle 2.0.  
 


The tracker issue for this project is MDL-19309.


= Goals and rationale =
= Goals and rationale =


The goals of the Community hub project are:
The main goals of the Community hub project are:


# to allow '''educators''' to find and join '''communities of practice''' around the world.  Such communities (or "hubs") could be subject or region-oriented, allowing teachers to easily associate with their peers on a long-term basis.
# to allow people to easily find courses around the world that they want to enrol in:
#* educators want to find '''communities of practice''' that are subject or region-oriented, so that they can associate with their peers on a long-term basis.
#* other learners want to find and study courses on various other subjects
# to make it easy for educators to find and download '''course templates''' from other people.  This will help educators share and identify examples of '''best practice''' in online pedagogy and hopefully improve the average quality of online courses.
# to make it easy for educators to find and download '''course templates''' from other people.  This will help educators share and identify examples of '''best practice''' in online pedagogy and hopefully improve the average quality of online courses.
Finally, we want to do all this in the simplest, safest way possible, while allowing a range of scenarios such as courses that are public or private, free or paid, so that the Moodle community can build solutions for themselves.


= Overview =
= Overview =


The solution consists of several parts in Moodle.
The diagram below shows the basic idea.  The systems in this diagram are:


* an open directory of registered community sites and courses on directory.moodle.org
;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
* a new block in Moodle 2.0 to search this directory to find courses/hubs to join
;Publishing site: A Moodle site that wants to make some of its courses available for download
* new repository plugins in Moodle 2.0 to download and restore courses from registered hubs
;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.




[[Image:Community.png]]
[[Image:Community-hubs-flowchart.png]]


Downloadable courses
Downloadable courses
* A: Sites that want to publish certain courses and make them downloadable do so during registration time with the Moodle Directory.
* (A) Sites that want to publish certain courses and make them downloadable can register them with one or more Hub Servers.
* B: Later, any Moodle user can connect to the Directory (via Repository API) to search for downloadable courses and choose one (receiving a URL).
* (B) 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.
* C: When the Moodle user tries to download the course, it comes from the original site.  The original site will send a Moodle archive as a .zip file (can be cached by the server).
* (C) The download process may trigger the backup process on the original server if it hasn't been done already.
* D: The Moodle user receives the file and can now restore it normally.  
* (D) Later, Moodle users (who have permissions to do so) can connect to a Hub to search for downloadable courses and choose one.
* (E) 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
Enrollable courses
# Sites that want to publish certain courses for the public to enrol in can do so during registration time with the Moodle Directory
* (1) 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)
# Later, any Moodle user can connect to the Directory (via Community block in their site) to search and find courses they want to join
* (2) 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 (with or without Mnet).
* (3) They click on a link to be sent to the other site so that they can enrol there.


= Use Cases =
= Use Cases =


== Newbie teacher ==
== New teacher creating a course ==


# New teacher needs some help with a new course for "Alligator farming 101"
# New teacher needs some help with a new course for "Alligator farming 101"
# Teacher sees "Import/Export" block into the "Alligator farming 101" course page and presses "Import course"
# Teacher sees the "Community" block into the "Alligator farming 101" course page and presses "Search course"
# Teacher browses directory in the File picker, searches for "Alligator"  
# Teacher browses a list of downloadable courses in the community page (the data comes from one or more Hubs via web services)
# Teacher finds 4 courses that look good.  After reading reviews and ratings, choose one.
# Teacher searches for "Alligator"  
# Teacher finds 4 courses that look good, and after reading reviews and ratings, chooses one.
# The course is downloaded and unpacked in Moodle.
# The course is downloaded and unpacked in Moodle.
# The teacher now has a good starter course they can keep working with!
# The teacher now has a good starter course they can keep developing.


A week later, the newbie teacher decides they need some help and wants to talk with others teaching Alligator farming.
== New teacher needs help ==


# Teacher goes to his "Community" block and clicks "Find community".
A teacher decides they need some help and wants to talk with others teaching Alligator farming.
# Moodle displays an search courses page (this page request data from Moodle.org by web services)
 
# Teacher goes to their "Community" block and clicks "Search course".
# Moodle displays a page to search for courses (the data comes from one or more Hubs via web services)
# Teacher searches courses for "educator" courses on "Alligators" in their country/language.
# Teacher searches courses for "educator" courses on "Alligators" in their country/language.
# Teacher finds two, selects one, and is returned to the page where is was before clicking on "Find community".  The selected course is now permanently listed in the Community block.
# Teacher finds two, selects one, and is returned to the page where is was before clicking on "Search course".  The selected course is now permanently listed in the Community block.
# Teacher clicks on the link and is taken to the course, where he can interact with peers over time, subscribe to forums etc.
# Teacher clicks on the link and is taken to the course, where they can enrol and interact/learn with peers over time, subscribe to forums etc.


== University consortium ==
== University consortium ==


== Course creation business ==
A group of five universites wants to share courses among themselves and not to the outside world.  They also want to prevent teachers from downloading courses from outside the consortium.


# Someone downloads Moodle and installs it as a private Moodle Hub Server
# Admins of all five Moodle sites in the group add the URL of the private Hub to their settings and register their sites there
# The default Hub at hub.moodle.org is (optionally) disabled in the site-wide settings.
# Admins register their courses with the Hub.
# Teachers can now import, export or join courses via the private Hub.


= Components =
== Course creation business ==
NOT IMPLEMENTED


There are three main parts to this project:
CoolCourses Inc have produced a set of 50 good Moodle courses which they wish to sell.
* Moodle.org directory (+ registration form on Moodle sites)
* Community membership
* Import/Export courses


==Moodle.org directory==
# They set up a Moodle site with all their courses in them.
# They set up a Hub with a payment system, and register it with the Hub List at moodle.org so people can find it
# They register all their courses with their own Hub with appropriate metadata
# When looking for courses, users can either
#* find this Hub by browsing through the Hub List, or
#* type the URL of the Hub directly into their Moodle site
# When users try to download a course, they may see a payment button to download it (credit card, paypal etc)
# CoolCourses could provide limited access to the courses on their Moodle site using Roles, as a preview.


A new directory system (hosted at directory.moodle.org) will allow users to browse and search registered courses and hubs around the world.  This data is collected from site admins when they register their Moodle site on an "opt-in" basis.  Only courses that are marked as "publish" will be listed.
= Components =


=== Data structure ===
There are several components:
this section concerns how the database tables will look on Moodle.org. This section is about listing all data that Moodle.org should store.


==== Sites ====
;'''Hub List''': A list of known Hub Servers, kept on moodle.org
;'''Hub Server''': A new Moodle plugin for publishing a list of registered courses that are '''downloadable''' or '''enrollable'''
;'''Course registration''': A new mechanism in every Moodle to register particular courses with one or more Hub Servers
;'''Community membership block''': to search Hub Servers to find enrollable courses to join and bookmark
;'''Import/Export block''': Makes it easy to find downloadable course templates in a Hub Server, then download them from the Hub Server and restore them locally


This information will be used for [http://moodle.org/stats general statistics], as well as the directory.


# Site name
==Moodle Hub List==
# Site description
The Hub List is a list of known Hub Servers (see the next section).  This makes it easy for Moodle users to find the most appropriate Hub Servers for their needs.  To get on the Hub List, Hub Servers choose to register with moodle.org via their administration interface.
# URL
# Physical address
# Site manager (name, email, phone)
# Contact form yes/no?
# Mnet/WS information, enough to let a teacher authenticate to the site using Mnet 2.0 (optional)
# Tool usage stats (forums/quizzes/resources etc) Not for public viewing.


Stats fields:
Moodle.org will store the following information, and make it available via a browseable interface at [http://hubdirectory.moodle.org/ hhttp://hubdirectory.moodle.org/].
* number of courses
* number of users
* number of enrolments
* number of posts
* number of resources
* number of questions


Field herited rom previous registry database:
==Moodle Hub Server==
* default site language
[[Image:Registerhub.png| thumb |Mockup: hub registration page]]
* Moodle version (2009050502)
The Moodle Hub Server (aka Hub) is a separate system (based on Moodle technology) that allows Moodle sites to register their courses for listing there. More technically, the hub server is a Moodle plugin.
* Moodle release (1.9.5+)
* Site ip address (need to be updated at every update)
* Secret answer
* Mail me the Moodle newsletter
* Can be contacted on the site
* Confirmed
* Time updated
* Time created
* Unreachable
* Time link checked


A default installation of this software will be running at '''hub.moodle.org''', but anyone else can download it and set up their own hub for private or public uses.  A hub can also be used as a Moodle site, even though the Moodle front page will be replaced by the hub front page.


Hubs can optionally register themselves in the Hub List so that they are easier to find and so they can become a "Trusted Hub".


A hub server has some config fields (saved into its database):
* name (site name by default, changing the value here, do not change the site name)
* description (front page summary as default value)
* language (choose the language, set site language as default)
* contact name (current user by default)
* contact email
* enable
* password (only for private hub)
* logo url (need to have a limited size of 150x150)
* protected web search interface '''(TODO: MDL-24015)'''


=== Data structure ===
Most of the data structure can be found in the [https://docs.moodle.org/en/Development:Community_hub_-_technical_specification community hub technical specification].


{| class="nicetable"
=== User interface ===
! Field
[[Image:Webinterface.png|thumb|Mockup: search course UI]]
! Type
If visiting the hub via the web, it will provide an interface for full searching and browsing.   
! Default
! Description
|-
| '''id'''
| int(10)
| auto-incrementing
|
|-
| name
| varchar(255)
| not null
| Site Name
|-
| description
| text
| null
| site description
|-
| url
| varchar(255)
| not null
| site URL
|-
| Physical address
| varchar(255)
| null
| location of the company
|-
| manager name
| varchar(100)
| null
|
|-
| manager email
| varchar(100)
| null
|
|-
| manager phone
| varchar(20)
| null
|
|-
| statistic
| text
| null
| stats, text format
|-
| moodleversion
| varchar()
| null
| stats, text format
|}
 
==== Courses ====
 
All registered courses will be stored here.  Some will be looking for students, some will be teacher and admin communities, and some will be downloadable course templates.
 
# Site
# Name
# Description
# URL
# Tags
## Standard (mathematics, physics, biology)  Always displayed, translatable etc ([https://docs.moodle.org/en/Course_Standard_Tags  Course Standard Tags ]) <span style=color:red>Do we need some special tags per country?</span>
## User (stuff, openuni, jeromesstuff etc)  Not displayed for browsing, but searchable
## Metadata standard <span style=color:blue>Dublin Core</span>
# Country code (AU, FR etc) <span style=color:blue>lang/countries.php</span>
# Region/state (based on list) <span style=color:blue>ISO 3166-2 (XX-XXX)</span>
# Language <span style=color:blue>lang.php</span>
# Availability (public/private)
# Cost (and currency) <span style=color:blue>ISO 4217</span>
# Download link: direct URL to Moodle download script or moodle.org cache or somewhere else
# Guest Access
# Accounts allowed (can we sign up)
# Screenshots <span style=color:blue>no references into the "registered_courses" table, all screenshots will be saved into the "files" table and the references to the "registered" will be into this "files" table.</span>
# Audience: Educators | Students | Admins
# Educational level being discussed (for educators audience only):  Tertiary | Secondary | Primary | Government | Corporate
# Tool usage stats (number of forums/quizzes/resources etc <span style=color:blue>All core modules - no participant number</span>) Only available for downloadable content.
 
 
{| class="nicetable"
! Field
! Type
! Default
! Description
|-
| '''id'''
| int(10)
| auto-incrementing
|
|-
| site id
| int(10)
| auto-incrementing
|
|-
| name
| varchar(255)
| not null
| Course Name
|-
| description
| text
| null
| Course description
|-
| url
| varchar(255)
| not null
| course URL
|-
| stdtags
| varchar(255)
| null
|
|-
| usertags
| varchar(255)
| null
|
|-
| metadata
| varchar(255)
| null
|
|-
| country
| varchar(2)
| null
|
|-
| region
| varchar(6)
| null
|
|-
| language
| varchar(30)
| null
|
|-
| currency
| varchar(3)
| null
|
|-
| cost
| varchar(10)
| null
|
|-
| availability
| varchar(20)
| private
|
|-
| downloadlink
| varchar(255)
| null
|
|-
| guestaccess
| boolean
| false
|
|-
| accountsallowed
| boolean
| false
|
|-
| audience
| varchar(20)
| null
|
|-
| educationallevel
| varchar(20)
| null
|
|-
| stats
| text
| null
|
|}
 
=== Web interface ===


A Moodle.org web interface, with a search form, displays clickable links to each course.  
The web interface can be protected from access.  The hub at moodle.org will of course be open to all.


[[Image:Webinterface.png]]
[[Image:Search_hub_moodle.png|thumb|Mockup: search hub UI]]


From this web interface the users can:
The web interface allows users to:


* search by keyword and see a list of courses that match - hightlight key word
* search by keyword (descriptions, titles, tags, subject etc)
* browse a list of courses using the standard tag set (hierarchy, tree on the left)
* browse a list of courses by subject
* go directly to a course (if marked for public use)
* go directly to a course (if marked for public use)
* preview a course (if screenshots have been provided)
* preview a course (if screenshots have been provided, or the original URL location)
* download the course to desktop (only if an download url has been set)
* download the course to desktop (only if an download url has been set)
* give a rating to the course
* If logged in to the Hub, users can also:
* write a comment for the course - <span style=color:blue>use comment 2.0 API</span>
** give a rating to the course
** write a comment for the course - <span style=color:blue>use comment 2.0 API</span>
 


When displaying courses, you can see and sort by:
When displaying courses, you can see and sort by:
Line 328: Line 163:
* Moodle site name
* Moodle site name
* Date added to directory
* Date added to directory
* Date last updated in directory  
* Date last updated in directory
* Date last checked (by a cron job)
* Audience (teachers, students, admins)
* Audience (teachers, students, admins)
* Teacher name(s) - ''Sortable''
* Teacher name(s) - ''Sortable''


=== Web service interface ===
=== Web service interface ===
 
'''TODO: MDL-24031'''
A REST-based web services interface will be provided for other systems (eg Moodle sites) to use directly.
A REST-based web services interface will be provided for other systems (eg Moodle sites) to use directly.


Line 344: Line 178:
* Others?
* Others?


== Registration on Moodle sites==
=== Hub admin interface ===


The existing Moodle registration form will be extended so that admins can choose to send in more info about their sites to the Moodle.org directoryAll courses flagged "Register" are also sent with their full details.
The hub will have a Hub admin interfaceAdmin processes include:


A cron job will be added to Moodle so that each site can automatically inform directory.moodle.org later when course information is updated (if the admin allows it).
* Listing, approving and editing the sites registered with the hub
* Listing, approving and editing the course descriptions, metadata etc.
* Registering/updating the Hub with the Hub List
* Configuring Hub behaviour and the appearance of the home page.


Moodle.org will perform a heartbeat ping every week to verify that the site is accessible. Sites that fail two or three in a row will be removed from the directory.
== Course global search functionality ==
In order to quickly search a course on all public hubs, Moodle.org will have a table equivalent to the course 'directory' table with dew additional field as "public hub id", "site url", "site name"...


== Site registration ==
[[Image:SiteRegistration.png|thumb|Mockup: site registration UI]]
The existing site registration form in Moodle will be extended so that admins can:


[[Image:Registrationform.png]]
# choose one or more Hubs to register with (hub.moodle.org and/or others in the Hub List, or directly to a particular Hub specified by URL)
 
# choose to enable cron to re-send statistics to the hub on a periodic basis. (TODO/TBD)
# choose to enable the hub to harvest courses on a periodic basis (TODO: not shown on image/TBD)


== Community membership ==
== Community membership ==
Line 360: Line 202:
The "Community" block allows people to find and subscribe to external courses that they want to be part of.
The "Community" block allows people to find and subscribe to external courses that they want to be part of.


It can be added to any page for any user, and contains:
Visibility of the block and the features within it are controlled by roles, and contains:


# A link to a search script, with a new capability to view it (default on for teachers, not students). If a user has not the capability, he will not see the "Community" block.
# 'Bookmarks' of previously-selected (subscribed) external courses (to make revisiting easy) grouped by site, which can be edited/deleted etc
# A search script to browse/search the directory (using web services to call Moodle.org).  Users can select joinable courses from the list and they will be added to the list of "subscribed" course links in the block contents (grouped by site).
# A link to a search script - "Add new courses..."
# A search script to browse/search one or more Hubs (via web services to get the data, with the interface rendered by the local script).  Users can select joinable courses from the list and they'll get added to the list in the block.


If the course is on a site with mnet enabled in "open hub mode" then the link will take the user directly to the course and they will stay logged in.  Otherwise the link will be just be an ordinary URL and the remote site will be responsible for authentication.
Generally the links will be just be an ordinary URL and the remote site will be responsible for authentication.


If the foreign site has an Mnet connection set up with the current site then login will be immediate.


[[Image:Blocktemplate.png]]


== Import/Export courses ==
[[Image:Addacourse.png|thumb|Mockup: community block]]


The Import/Export block will be available on course pages and contains buttons to:
community block database structure:
{| class="nicetable"
|-
! Name
! Type
! Description
|-
|id
|int
|Standard autoincrement
|-
|userid
|int
|foreign key - ID of the user
|-
|-
|coursename
|varchar
|Name of the community course
|-
|coursedescription
|text
|Description of the community course - display by the tag link
|-
|courseurl
|varchar
|The full URL to the community course front page
|-
|image
|varchar
|community course logo url - it could be displayed as icon
|}


* '''Export course''': publish entire course (as Moodle Backup minus userdata) as a course template to a Moodle Hub (Portfolio API plugin)
== Publish courses ==
* '''Import course''': find/install a course template from a Hub or from another course on same site (Repository API plugin)
  '''Publish course''': to publish or update the description of the current course in one or more Hubs
* '''Publish course''': to publish or update the description of the current course in the Moodle.org directory (admins only)


The '''Publish''' button only exists if the current user has the appropriate capabilities and if the current Moodle site has been registered with a Hub.


=== Export course ===
[[Image:Coursepublishing.png|thumb|Mockup: course publishing]]


A standard export will do a normal backup (taking care to remove userdata by default), and at the end will call the portfolio API to push that file to a connected portfolio.  These could include:
Choosing "Publish" goes to a script where you can chose from the registered Hubs and whether you want to publish the course as:
* downloading it to the local computer (if the portfolio plugin is activated)
* enrollable/advertise, so that others can come here and use the course where it is, and/or
* uploading it to any general purpose repository
* downloadable/share, so that a Hub can offer this course for download to others
* uploading it to a Moodle Hub site already set up with Mnet peering.


Pushing it to a Moodle Hub would trigger extra behaviours:
If the user wants to offer this course for download, then they are directed to the standard backup process to create and define the backup file (without users!).  If the backup is successful the zip is stored in a standard place and then the user is returned to the publish script to continue.  (If downloads are not required then this whole step is skipped).
* More metadata would be required (including screenshots?)
* Permissions would be checked on the destination Moodle
* The course can be immediately restored on the external Moodle in a special "New" category as a hidden course
* Someone on the external Moodle can be alerted to approve/unhide the new course


=== Import course ===
It allows the user to set up full , and especially whether you want to advertise this course as being:


The '''Import course''' button will pull up a normal file picker to browse repositories for files with a mimetype matching .mbkup.zip.
Now the script presents a form with metadata that this course will be published with on the chosen Hub(s) (this is also available in the course settings page). Metadata includes information such as description, licensing, categories, screenshots etc (see the [[#Courses|Courses]] section above for more info).


One special repository plugin called "Courses" allows the user to:
After checking/updating the metadata, the script will push the data to the selected Hub.


* search the moodle.org directory for downloadable courses (only)
If the checkbox to allow download was selected, then the URL to a course upload script in the current Moodle is included with the metadata. This URL contains a token (eg an MD5 stored in the course table) that only the Hub knows.
* directly search any connected hubs for downloadable courses
* search other courses on the same server (replacing the existing import function we have)


Once the user has selected one of these courses, the user is passed to the standard restore process.
The course upload script (eg /local/hub/webservice/upload.php?id=55&token=XXXXX) will expect the cached .zip file for the given course.


=== Publish course ===


The '''Publish''' button only exists if the current site has been registered on the Moodle directory already, and if the current user has the appropriate capabilities.
==== Publish course settings ====


After clicking "Publish" the user will get taken to a script asking if you want to allow downloads of this course. He's also asked to upload screenshots if he'd like to.
Some publish settings and info will also be available anytime via the course settings page under a "Publish" tab:


If downloads are allowed, then you are redirected to the backup process to create and define the backup file, then returned to the script if successful.  The backup file is cached in a standard place with a standard name.  If downloads are not required then this step is skipped.
* Which hubs has this course been published on, and when
* Full metadata
* Screenshots


Now the script lists the metadata that this course will be published with on the moodle.org directory (this is also available in the course settings page).  After checking/updating the metadata, the script will push the data to the Moodle.org directory.  The Moodle directory will bounce back a confirmation which gets saved locally as the "Last publish date".
== Harvest courses ==
'''NOT IMPLEMENTED'''
''Note: site to hub communication is one way only, the following text may change.''


If the checkbox to allow download was checked, then the URL to a course download script is included with this metadata.
Each hub will use cron to call every site that has registered a harvesting url on a periodic basis.  This will be done at the same time as the link is checked to ensure the site is reachable, so the "time link was last checked" field in the site table also indicates when the site was last harvested.


The course download script (eg /course/download.php?id=55&secret=XXXXX) will send the cached .zip file for the given course, or (if the the admin has specified that automatic updates are allowed and the course has also allowed it, then it might update the cache once a day or something).
The harvesting url will be an RSS feed which will list all the courses to be included in the hub and their metadata. This might be the feed of all visible courses on the site, or courses in a given category. TODO: should we allow them to enter multiple category feeds so they can say "arts", "business" and "languages" but not "science"?


[[Image:Publishtemplate.png]]
Course list RSS feeds are an existing tracker item for Moodle 2.0  See http://tracker.moodle.org/browse/MDL-13248  This patch allows admins to pick which categories have individual feeds created and are included in the "all courses" feed. Each course becomes an <item> in the RSS feed as follows:


= Course settings page =
* <category> the Moodle course category in which the course belongs
Some new settings will appear on this page:
* <title> the course fullname
* register on Moodle.org - a sub option is activated by default: publish (the site will be displayed in the search result on Moodle.org)
* <link> the course url
* cache on Moodle.org
* <pubdate> the date the course (or any of its resources and activities) last updated
* downloadable
* <description> the course summary
* metadata
* screenshots


= Schedule =
The current tracker item will need to be extended to include appropriate course metadata in the RSS feed.  There is a [http://purl.org/dc/elements/1.1/ Dublin Core extension to RSS 2.0] which can be implemented. 


Full schedule and progress is in the tracker: MDL-19309
TODO: If we choose an alternative metadata format we will need to locate or create an alternative RSS extension.  There is a [http://www.downes.ca/xml/RSS_LOM.htm LOM extension] but not from an official IEEE namespace. 


# Moodle.org directory
We will need to declare our own namespace RSS extension to identify whether a course should be listed in the hub as downloadable and/or enrollable. This extension will add tags to the RSS feed as follows:
# Web interface
# Web service interface
# Improve registration form
# Community block
# Publish courses
# Import courses
# Export courses


= See also =
* <moodlehub:downloadable>
* <moodlehub:enrollable>
 
Both tags will take either "yes" or "no" values and will be set by course creators at the same time as they enter course metadata.
 
The hub will check the published date for each item in the RSS feed to identify whether it needs to update its records.  TODO: if we use OAI-PMH for harvesting we can request courses updated since x see http://moodle.org/mod/forum/discuss.php?d=127488


* [[Community hub technotes]] - relating to MNet developments in Moodle 1.8
If the course has been updated and is <moodlehub:downloadable> is yes, then the hub will request the site to create a new backup of the entire course (less user data).
* MDL-18580 - Community Hub tracker issue


= See also =
* [https://docs.moodle.org/en/Community_hub Community hub]
* [https://docs.moodle.org/en/Development:Community_hub_-_technical_specification Development: community hub technical specification]


[[Category:MNET]]
[[Category:Hub]]


[[ja:開発:コミュニティハブ]]
[[ja:開発:コミュニティハブ]]

Latest revision as of 01:25, 2 September 2010

Template:Moodle 2.0


This page describes an overall functional specification for the "Moodle Community Hub" project, which consists of a new system (the Moodle Hub Server) and several new features in Moodle 2.0.


Goals and rationale

The main goals of the Community hub project are:

  1. to allow people to easily find courses around the world that they want to enrol in:
    • educators want to find communities of practice that are subject or region-oriented, so that they can associate with their peers on a long-term basis.
    • other learners want to find and study courses on various other subjects
  2. to make it easy for educators to find and download course templates from other people. This will help educators share and identify examples of best practice in online pedagogy and hopefully improve the average quality of online courses.

Finally, we want to do all this in the simplest, safest way possible, while allowing a range of scenarios such as courses that are public or private, free or paid, so that the Moodle community can build solutions for themselves.


Overview

The diagram below shows the basic idea. The systems in this diagram are:

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-flowchart.png

Downloadable courses

  • (A) Sites that want to publish certain courses and make them downloadable can register them with one or more Hub Servers.
  • (B) 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.
  • (C) The download process may trigger the backup process on the original server if it hasn't been done already.
  • (D) Later, Moodle users (who have permissions to do so) can connect to a Hub to search for downloadable courses and choose one.
  • (E) 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

  • (1) 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)
  • (2) Later, any Moodle user can connect to a hub (via Community block in their site) to search and find courses they want to join
  • (3) They click on a link to be sent to the other site so that they can enrol there.

Use Cases

New teacher creating a course

  1. New teacher needs some help with a new course for "Alligator farming 101"
  2. Teacher sees the "Community" block into the "Alligator farming 101" course page and presses "Search course"
  3. Teacher browses a list of downloadable courses in the community page (the data comes from one or more Hubs via web services)
  4. Teacher searches for "Alligator"
  5. Teacher finds 4 courses that look good, and after reading reviews and ratings, chooses one.
  6. The course is downloaded and unpacked in Moodle.
  7. The teacher now has a good starter course they can keep developing.

New teacher needs help

A teacher decides they need some help and wants to talk with others teaching Alligator farming.

  1. Teacher goes to their "Community" block and clicks "Search course".
  2. Moodle displays a page to search for courses (the data comes from one or more Hubs via web services)
  3. Teacher searches courses for "educator" courses on "Alligators" in their country/language.
  4. Teacher finds two, selects one, and is returned to the page where is was before clicking on "Search course". The selected course is now permanently listed in the Community block.
  5. Teacher clicks on the link and is taken to the course, where they can enrol and interact/learn with peers over time, subscribe to forums etc.

University consortium

A group of five universites wants to share courses among themselves and not to the outside world. They also want to prevent teachers from downloading courses from outside the consortium.

  1. Someone downloads Moodle and installs it as a private Moodle Hub Server
  2. Admins of all five Moodle sites in the group add the URL of the private Hub to their settings and register their sites there
  3. The default Hub at hub.moodle.org is (optionally) disabled in the site-wide settings.
  4. Admins register their courses with the Hub.
  5. Teachers can now import, export or join courses via the private Hub.

Course creation business

NOT IMPLEMENTED

CoolCourses Inc have produced a set of 50 good Moodle courses which they wish to sell.

  1. They set up a Moodle site with all their courses in them.
  2. They set up a Hub with a payment system, and register it with the Hub List at moodle.org so people can find it
  3. They register all their courses with their own Hub with appropriate metadata
  4. When looking for courses, users can either
    • find this Hub by browsing through the Hub List, or
    • type the URL of the Hub directly into their Moodle site
  5. When users try to download a course, they may see a payment button to download it (credit card, paypal etc)
  6. CoolCourses could provide limited access to the courses on their Moodle site using Roles, as a preview.

Components

There are several components:

Hub List
A list of known Hub Servers, kept on moodle.org
Hub Server
A new Moodle plugin for publishing a list of registered courses that are downloadable or enrollable
Course registration
A new mechanism in every Moodle to register particular courses with one or more Hub Servers
Community membership block
to search Hub Servers to find enrollable courses to join and bookmark
Import/Export block
Makes it easy to find downloadable course templates in a Hub Server, then download them from the Hub Server and restore them locally


Moodle Hub List

The Hub List is a list of known Hub Servers (see the next section). This makes it easy for Moodle users to find the most appropriate Hub Servers for their needs. To get on the Hub List, Hub Servers choose to register with moodle.org via their administration interface.

Moodle.org will store the following information, and make it available via a browseable interface at hhttp://hubdirectory.moodle.org/.

Moodle Hub Server

Mockup: hub registration page

The Moodle Hub Server (aka Hub) is a separate system (based on Moodle technology) that allows Moodle sites to register their courses for listing there. More technically, the hub server is a Moodle plugin.

A default installation of this software will be running at hub.moodle.org, but anyone else can download it and set up their own hub for private or public uses. A hub can also be used as a Moodle site, even though the Moodle front page will be replaced by the hub front page.

Hubs can optionally register themselves in the Hub List so that they are easier to find and so they can become a "Trusted Hub".

A hub server has some config fields (saved into its database):

  • name (site name by default, changing the value here, do not change the site name)
  • description (front page summary as default value)
  • language (choose the language, set site language as default)
  • contact name (current user by default)
  • contact email
  • enable
  • password (only for private hub)
  • logo url (need to have a limited size of 150x150)
  • protected web search interface (TODO: MDL-24015)

Data structure

Most of the data structure can be found in the community hub technical specification.

User interface

Mockup: search course UI

If visiting the hub via the web, it will provide an interface for full searching and browsing.

The web interface can be protected from access. The hub at moodle.org will of course be open to all.

Mockup: search hub UI

The web interface allows users to:

  • search by keyword (descriptions, titles, tags, subject etc)
  • browse a list of courses by subject
  • go directly to a course (if marked for public use)
  • preview a course (if screenshots have been provided, or the original URL location)
  • download the course to desktop (only if an download url has been set)
  • If logged in to the Hub, users can also:
    • give a rating to the course
    • write a comment for the course - use comment 2.0 API


When displaying courses, you can see and sort by:

  • Title - Sortable
  • Description
  • Tags - Sortable (first tag retrieved by the request is considered)
  • Screenshot(s)
  • Cost (if any) - Sortable
  • Rating (10-point scale displayed as 5 stars, and only if you are logged in to moodle.org) - Sortable
  • Comments
  • Moodle site name
  • Date added to directory
  • Date last updated in directory
  • Audience (teachers, students, admins)
  • Teacher name(s) - Sortable

Web service interface

TODO: MDL-24031 A REST-based web services interface will be provided for other systems (eg Moodle sites) to use directly.

Web services can search on:

  • string search
  • array language
  • array cost
  • array Moodle url
  • Others?

Hub admin interface

The hub will have a Hub admin interface. Admin processes include:

  • Listing, approving and editing the sites registered with the hub
  • Listing, approving and editing the course descriptions, metadata etc.
  • Registering/updating the Hub with the Hub List
  • Configuring Hub behaviour and the appearance of the home page.

Course global search functionality

In order to quickly search a course on all public hubs, Moodle.org will have a table equivalent to the course 'directory' table with dew additional field as "public hub id", "site url", "site name"...

Site registration

Mockup: site registration UI

The existing site registration form in Moodle will be extended so that admins can:

  1. choose one or more Hubs to register with (hub.moodle.org and/or others in the Hub List, or directly to a particular Hub specified by URL)
  2. choose to enable cron to re-send statistics to the hub on a periodic basis. (TODO/TBD)
  3. choose to enable the hub to harvest courses on a periodic basis (TODO: not shown on image/TBD)

Community membership

The "Community" block allows people to find and subscribe to external courses that they want to be part of.

Visibility of the block and the features within it are controlled by roles, and contains:

  1. 'Bookmarks' of previously-selected (subscribed) external courses (to make revisiting easy) grouped by site, which can be edited/deleted etc
  2. A link to a search script - "Add new courses..."
  3. A search script to browse/search one or more Hubs (via web services to get the data, with the interface rendered by the local script). Users can select joinable courses from the list and they'll get added to the list in the block.

Generally the links will be just be an ordinary URL and the remote site will be responsible for authentication.

If the foreign site has an Mnet connection set up with the current site then login will be immediate.


Mockup: community block

community block database structure:

Name Type Description
id int Standard autoincrement
userid int foreign key - ID of the user
coursename varchar Name of the community course
coursedescription text Description of the community course - display by the tag link
courseurl varchar The full URL to the community course front page
image varchar community course logo url - it could be displayed as icon

Publish courses

Publish course: to publish or update the description of the current course in one or more Hubs

The Publish button only exists if the current user has the appropriate capabilities and if the current Moodle site has been registered with a Hub.

Mockup: course publishing

Choosing "Publish" goes to a script where you can chose from the registered Hubs and whether you want to publish the course as:

  • enrollable/advertise, so that others can come here and use the course where it is, and/or
  • downloadable/share, so that a Hub can offer this course for download to others

If the user wants to offer this course for download, then they are directed to the standard backup process to create and define the backup file (without users!). If the backup is successful the zip is stored in a standard place and then the user is returned to the publish script to continue. (If downloads are not required then this whole step is skipped).

It allows the user to set up full , and especially whether you want to advertise this course as being:

Now the script presents a form with metadata that this course will be published with on the chosen Hub(s) (this is also available in the course settings page). Metadata includes information such as description, licensing, categories, screenshots etc (see the Courses section above for more info).

After checking/updating the metadata, the script will push the data to the selected Hub.

If the checkbox to allow download was selected, then the URL to a course upload script in the current Moodle is included with the metadata. This URL contains a token (eg an MD5 stored in the course table) that only the Hub knows.

The course upload script (eg /local/hub/webservice/upload.php?id=55&token=XXXXX) will expect the cached .zip file for the given course.


Publish course settings

Some publish settings and info will also be available anytime via the course settings page under a "Publish" tab:

  • Which hubs has this course been published on, and when
  • Full metadata
  • Screenshots

Harvest courses

NOT IMPLEMENTED Note: site to hub communication is one way only, the following text may change.

Each hub will use cron to call every site that has registered a harvesting url on a periodic basis. This will be done at the same time as the link is checked to ensure the site is reachable, so the "time link was last checked" field in the site table also indicates when the site was last harvested.

The harvesting url will be an RSS feed which will list all the courses to be included in the hub and their metadata. This might be the feed of all visible courses on the site, or courses in a given category. TODO: should we allow them to enter multiple category feeds so they can say "arts", "business" and "languages" but not "science"?

Course list RSS feeds are an existing tracker item for Moodle 2.0 See http://tracker.moodle.org/browse/MDL-13248 This patch allows admins to pick which categories have individual feeds created and are included in the "all courses" feed. Each course becomes an <item> in the RSS feed as follows:

  • <category> the Moodle course category in which the course belongs
  • <title> the course fullname
  • <link> the course url
  • <pubdate> the date the course (or any of its resources and activities) last updated
  • <description> the course summary

The current tracker item will need to be extended to include appropriate course metadata in the RSS feed. There is a Dublin Core extension to RSS 2.0 which can be implemented.

TODO: If we choose an alternative metadata format we will need to locate or create an alternative RSS extension. There is a LOM extension but not from an official IEEE namespace.

We will need to declare our own namespace RSS extension to identify whether a course should be listed in the hub as downloadable and/or enrollable. This extension will add tags to the RSS feed as follows:

  • <moodlehub:downloadable>
  • <moodlehub:enrollable>

Both tags will take either "yes" or "no" values and will be set by course creators at the same time as they enter course metadata.

The hub will check the published date for each item in the RSS feed to identify whether it needs to update its records. TODO: if we use OAI-PMH for harvesting we can request courses updated since x see http://moodle.org/mod/forum/discuss.php?d=127488

If the course has been updated and is <moodlehub:downloadable> is yes, then the hub will request the site to create a new backup of the entire course (less user data).

See also