First draft of a solution, which fetches all of the data for every user once per day, instead of fetching it for each user when they log on
changed version requirements back, so already-installed plugins can be upgraded
Added option to run from CLI for Moodle versions before 2.7
Removed the Task functionality and modified the script to fit the new API
Fixed encoding errors, string split errors and cleaned the code a little
The json is now wellformed utf-8 before a decode is attempted.