The changes here are heterogeneous:
- Include stuff that is not available (other test has included it).
Sometimes local to a unit test, others in setupBeforeClass() or
globally, ... depends on every case.
- Rename some tests (namespaces, test name, ...) towards getting it
running.
- Amend small bits here and there.
Important note: I've left any "cosmetic" warning out from the
changes, only a few errors (like long array syntax) have been fixed.
The section header from the section template has been moved to the content template
so we don't close it from within the content template.
Nothing seems to use the content template, so there should not be any
differences in HTML output anywhere.
core_courseformat\external\get_state calls export_for_tempalte for each
course module, which in turn calls completion_info::is_tracked_user()
for the current user on the current course. The result of this call will
be the same for every course module, so does not need to be called what
may be several hundred times.
This change allows the result of is_tracked_user to be passed to the cm
state object, then calls it once and passes it to each cm's object. If
it is not passed in, it will be computed on demand as before.
There are inherent issues with task blocking which mean that it has
never worked properly. It is also very buggy and can lead to massive
performance issues with task processing.
It is almost impossible to deprecate this in a staged fashion because
various APIs use the methods and it is not possible to determine which
are API uses and which are other valid uses.
In reality there has been little-to-no uptake on the use of this feature
and it should just be removed.
* Decorative images should have an empty alt text and there's no need
to set a presentation role.
* Accessibility Behat tests added to cover the changes:
- block_starredcourses uses the core_course/no-courses template
- core_completion tests changes in core_course/activity instance and
core_course/editdefaultcompletion