Extracted code from sync_users() into separate functions
in order to enable ad-hoc sheduling, and chunking.
Co-authored-by: David Woloszyn <david.woloszyn@moodle.com>
Before applying a preset, the settings are displayed and, in some cases,
the Current/New value columns were empty.
This patch fixes it and guarantees this information is updated properly
every time the set_value() method is called.
Sheduled tasks for syncing users with external sources for auth_ldap
and auth_cas. Using task is simplier than setting separate cron
job for running cli script. Task are disabled by default.