Two new scheduled tasks, show_started_courses_task and
hide_ended_courses_task have been added, to automatically change
the course visibility when the start/end course date match the
current one.
They are disabled by default, to keep the current behaviour.
When admins enable any of them, they are executed once per
day by default (around midnight).
These scheduled tasks are based on the "CUL Course Visibility Update"
third-party plugin created by Tim Gagen and refactored and currently
maintained by Amanda Doughty:
https://moodle.org/plugins/local_culcourse_visibility
Thanks!! :-)
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
Adding @runTestsInSeparateProcesses and removing setUp() and tearDown() at the
component_test.php, so the test will run in a separate process making sure that
whatever changes happen to the in-memory version of the component class in its thread,
therefore does not impact other tests and makes it more safe.
New functions:
* `core_user::get_profile_picture` for retrieving user picture.
* `core_user::get_profile_url` for retrieving profile url.
* `core_user::get_fullname` for retrieving user full name.
Note: the context is not used as this stage. It will be used by "User Disguises" plugin, which will be implemented later.
This test cannot be made to work while there are no hooks to test.
When we add our first hooks, we can add these tests back and provide a
fake implementation for them in an isolated test run.
Course date registration data reports correctly.
MDL-77306 added a count of how many courses there are
without start and end dates. However, all courses have
a start date, it is only the end date that is optional.
This patch fixes the data collection and makes the lang
string describing it clearer.
Create a new subsystem for communication and create
associated experimental settings to safely use the
new subsystem.
Originally implemented as MDL-76699.
Co-Authored-By: Huong Nguyen <huongnv13@gmail.com>
When we deprecate the use of a file, we often include tests which ensure
that the legacy behaviour is maintained. There are also legacy uses
in the community where people would like to use the deprecated API for a
period.
The issue that we face is that, if the deprecated file is included once,
then it will be included for all other, unrelated, tests. This means
that other tests may not detect cases where the deprecated file was
included.
We can solve these cases by running the test that performs the inclusion
in a deprecated process. This means that the inclusion is only performed
in that isolated process, and other unrelated tests do not include the
file.
However, we also then need to detect which files which are including the
file and which we do not know about.
This change introduces:
- an override to the TestCase::setInIsolation method to define a
constant when the test is running in isolation
- a new function that a file can call when it is included, to make sure
that the test process was isolated, where there is any test.