The course index lock icon depends on the state hasrestrictions
attributes on both section and course module. The lock icon
should be consistent with the content availability information
and it was not. With this patch the hasrestrictions attribute
uses a similar logic than the course content.
The current manual completion button triggers an event to alert the page
of any completion change. This event is capture in the course page by
the core_courseformat/local/content module but it was ignored when this
happens in an activity page. Now the activity header has its own
component to capture this event and support possible future reactive
actions.
The course index uses collapsible to simulate a tree. To ensure the
resulting HTML follows the WCAG tree implementation, the tree widget
cannot be a nav element but a div one.
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)
Also, change some relative paths and comments to point to new
locations.
1) Namespace must match the one being covered.
2) the @covers annotation was wrong, missing class name(s). At the
end I've used the coversDefaultClass annotation that allows to
specify a whole namespace, useful in this case to get the 3
existing (course, section, cm) classes covered.
Adapt the current course editing libraries to modify also
the course state data. This way, any UI component that
watches the course structure can react to the changes.
The course index is the first UI component that implements the new
drawers and the reactive components. The course index uses the course
state to present the current course structure and changes whenever
that structure change.