Note: You are currently viewing documentation for Moodle 3.4. Up-to-date documentation for the latest stable version of Moodle is likely available here: Community hub - technical specification.

Development:Community hub - technical specification: Difference between revisions

From MoodleDocs
No edit summary
Line 12: Line 12:


= Methods =
= Methods =
Following we explain the way we'll implement the operation
Following we explain the way we'll implement the operations


== Site/Hub Registration operations ==
== Site/Hub Registration operations ==
The site/hub enables the web service, enable a protocol, create a specific ws user, a specific ws role, and a specific token.  
#The site/hub enables the web service, enable a protocol, create a specific ws user, a specific ws role, and a specific token.  
It sends by POST the web service token to the hub server/hub directory.
#It sends by POST the web service token to the hub server/hub directory.
The hub server/hub directory enables the web service, enable a protocol, create a specific ws user, a specific ws role, and a specific token.  
#The hub server/hub directory enables the web service, enable a protocol, create a specific ws user, a specific ws role, and a specific token.  
It calls the web service function: confirm_registration($thisisyourtokentocallme).
#It calls the web service function: confirm_registration($thisisyourtokentocallme).
Finally the hub server/hub directory use web service to call get_info function for its first time
#Finally the hub server/hub directory use web service to call get_info function for its first time


== Course search (hub or global search) + hub list operations ==
== Course search (hub or global search) + hub list operations ==
When the hub server is set with the option  "Publish this hub so people can join it", it creates a ws token (same steps than previous chapter), we'll call this token a public token.
#When the hub server is set with the option  "Publish this hub so people can join it", it creates a ws token (same steps than previous chapter), we'll call this token a public token.
The site calls a php script on the hub server to retrieve the public token. Then the site calls the web service function search_courses()
#The site calls a php script on the hub server to retrieve the public token.  
#Then the site calls the web service function search_courses()


== Other operations (get_info) ==
== Other operations (get_info) ==
The site/hub server/directory should all have specific token to talk to each other.
The site/hub server/directory should all have specific token to talk to each other.

Revision as of 04:05, 22 March 2010

Operations

Following the different communication operations excepted between Moodle.org, hub servers and Moodle site.

Moodle site and Hub server

Moodlesite2hubserver.png

Moodle.org Hub directory and (Moodle.org) Hub server

Hubdirectory moodleorg2hubserver moodle.org.png

Moodle site and Moodle.org Hub directory

Moodlesite2moodleorg.png

Methods

Following we explain the way we'll implement the operations

Site/Hub Registration operations

  1. The site/hub enables the web service, enable a protocol, create a specific ws user, a specific ws role, and a specific token.
  2. It sends by POST the web service token to the hub server/hub directory.
  3. The hub server/hub directory enables the web service, enable a protocol, create a specific ws user, a specific ws role, and a specific token.
  4. It calls the web service function: confirm_registration($thisisyourtokentocallme).
  5. Finally the hub server/hub directory use web service to call get_info function for its first time

Course search (hub or global search) + hub list operations

  1. When the hub server is set with the option "Publish this hub so people can join it", it creates a ws token (same steps than previous chapter), we'll call this token a public token.
  2. The site calls a php script on the hub server to retrieve the public token.
  3. Then the site calls the web service function search_courses()

Other operations (get_info)

The site/hub server/directory should all have specific token to talk to each other.