The caller of the mdeploy.php utility is expected to create a file in
the data directory. The name of such file and the passphrase in it are
then sent to mdeploy.php as a part of the request. The submitted and
stored values are then compared.
This class represents the communication bridge from Moodle UI to the
(standalone) mdeploy.php utility. It consists of various helper methods
useful when dealing with user interface, update confirmation etc.
The class is implemented as a singleton. This allows us easily
transfer required data from top level scripts (like /admin/index.php)
into the rendering methods deep in the stack without the need to change
the API of many methods on the way.
The expected behaviour is as follows:
* If the recently fetched data is older than 48 hours, it is considered
as outdated and the new fetch is executed
* else, if the recently fetched data is younger than 24 hours, it is
considered as fresh enough and no fetch is executed
* else, if the current time is after 01:00 AM plus a certain offset
(which is randomly generated for each site), the fetch is
executed.