Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Registration: Difference between revisions

From MoodleDocs
No edit summary
Line 5: Line 5:
* Open table in the [https://docs.moodle.org/en/Development:Community_hub_-_technical_specification#Data_structure_2 hub_site_directory] table from the '''MOOCH''' database
* Open table in the [https://docs.moodle.org/en/Development:Community_hub_-_technical_specification#Data_structure_2 hub_site_directory] table from the '''MOOCH''' database
* For each entry in this table
* For each entry in this table
** If it has a siteidentifier field
** If it has a siteidentifier field and a corresponding entry in registry table exists
*** If a corresponding entry in registry table exists
*** Compare these two records below
**** If the MOOCH->timemodified > registry->timemodified then
** Else If it has a URL field and a corresponding entry in registry table exists
***** If the email address has changed, unsubscribe old and subscribe new to Sympa
*** Compare these two records below
***** Update the complete registry entry with new info
** Else If it has a host field and a corresponding entry in registry table exists
** Else use the URL
*** Compare these two records below
*** If a corresponding URL exists in registry table
 
**** If the MOOCH->timemodified > registry->timemodified then  
** If MOOCH->timemodified is larger/later than registry->timemodified then  
***** If the email address has changed, unsubscribe old and subscribe new to Sympa
*** If the email address is different:
***** Update the complete registry entry with new info
**** Unsubscribe registry->email from Sympa
** Else use the hostname
**** Subscribe MOOCH->email to Sympa
*** If a corresponding entry in registry table exists
*** Update the complete registry entry with new info
**** If the MOOCH->timemodified > registry->timemodified then
***** If the email address has changed, unsubscribe old and subscribe new to Sympa
***** Update the complete registry entry with new info
** Else it's a new one, so create a new entry in the registry table

Revision as of 08:46, 15 September 2010

Logic of the registration script

  • Open registry table on moodle.org (or wherever)
  • Open table in the hub_site_directory table from the MOOCH database
  • For each entry in this table
    • If it has a siteidentifier field and a corresponding entry in registry table exists
      • Compare these two records below
    • Else If it has a URL field and a corresponding entry in registry table exists
      • Compare these two records below
    • Else If it has a host field and a corresponding entry in registry table exists
      • Compare these two records below
    • If MOOCH->timemodified is larger/later than registry->timemodified then
      • If the email address is different:
        • Unsubscribe registry->email from Sympa
        • Subscribe MOOCH->email to Sympa
      • Update the complete registry entry with new info