Andrew Nicols 298c13ac3b
MDL-80838 core: Add PSR-20/Clock support
This commit adds the PSR-20 ClockInterface to core, with a
moodle-specific extension to the Interface at `\core\clock`, and a
standard clock at `\core\system_clock`.

Further clocks are provided as `\incrementing_clock` and `\frozen_clock`
which are available to unit tests using:

- `$this->mock_clock_with_incrementing(?int $starttime = null);`
- `$this->mock_clock_with_frozen(?int $time = null);`

For the incrementing clock, every call to fetch the time will bump the
current time by one second.

For the frozen clock the time will not change, but can be modified with:
- `$clock->set_to(int $time);`; and
- `$clock->bump(int $seconds = 1);`
2024-04-02 10:24:54 +08:00
2024-03-26 12:31:36 +01:00

Moodle

The Moodle Logo

Moodle is the World's Open Source Learning Platform, widely used around the world by countless universities, schools, companies, and all manner of organisations and individuals.

Moodle is designed to allow educators, administrators and learners to create personalised learning environments with a single robust, secure and integrated system.

Documentation

Community

moodle.org is the central hub for the Moodle Community, with spaces for educators, administrators and developers to meet and work together.

You may also be interested in:

Installation and hosting

Moodle is Free, and Open Source software. You can easily download Moodle and run it on your own web server, however you may prefer to work with one of our experienced Moodle Partners.

Moodle also offers hosting through both MoodleCloud, and our partner network.

License

Moodle is provided freely as open source software, under version 3 of the GNU General Public License. For more information on our license see

Description
No description provided
Readme 1.2 GiB
Languages
PHP 78.1%
JavaScript 14.6%
Gherkin 3.5%
CSS 1.7%
Mustache 1.6%
Other 0.4%