Development:Registration: Difference between revisions
From MoodleDocs
No edit summary |
|||
Line 16: | Line 16: | ||
** If the email address is different: | ** If the email address is different: | ||
*** Unsubscribe registry->email from Sympa | *** Unsubscribe registry->email from Sympa | ||
*** Subscribe MOOCH->email | *** If MOOCH->emailalert is true => Subscribe MOOCH->contactemail to Sympa | ||
** Else if MOOCH->alertemail is different than registry->emailalert | |||
*** if MOOCH->alertemail is true => Subscribe registry->emai to Sympa | |||
*** if MOOCH->alertemail is false => Unsubscribe registry->email from Sympa | |||
** Update the complete registry entry with new info | ** Update the complete registry entry with new info |
Revision as of 09:11, 15 September 2010
Logic of the registration script
Main logic:
- 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 and update records
- Else If it has a URL field and a corresponding entry in registry table exists
- Compare and update records
- Else
- Add the MOOCH record as a new record in registry
- If it has a siteidentifier field and a corresponding entry in registry table exists
Function Compare_and_update_records:
- If MOOCH->timemodified is larger/later than registry->timemodified then
- If the email address is different:
- Unsubscribe registry->email from Sympa
- If MOOCH->emailalert is true => Subscribe MOOCH->contactemail to Sympa
- Else if MOOCH->alertemail is different than registry->emailalert
- if MOOCH->alertemail is true => Subscribe registry->emai to Sympa
- if MOOCH->alertemail is false => Unsubscribe registry->email from Sympa
- Update the complete registry entry with new info
- If the email address is different: