When debug_footer_html() was split from standard_footer_html()
in MDL-71965 the $SCRIPT global declaration was left behind.
This just moves it wherever it's needed.
There is no need to display activity navigation links within the
activity if the user can already navigate through the activities
using the course index. Therefore, this change will prevent displaying
the activity navigation links if the theme has implemented course
index and the selected course format uses course index.
Allows display_size to use a fixed unit for easy comparison of
multiple results, and fixed decimal places for the same reason.
Improves behaviour by using consistent decimal places and a
consistent space before the unit (the previous one only has a space
before 'bytes', not before 'KB').
Of existing uses, all the ones that displayed a 'maxbytes' type
configuration setting (which are likely to have an 'exact' size
and would be better shown as 512 KB rather than 512.0 KB) have been
changed to use 0 decimal places, to preserve previous behaviour.
All the uses which were showing an actual file or memory size have
been left as default (1 decimal place).
- Part of: MDL-69588
This changes the context header to switch the breadcrumbs to the
top in boost. It also changes the context header in the modules
to have the activity name instead of the course name, and adds
an icon for the activity.
* The activity information output component is still being displayed
even in the case when the activity does not have dates to show and
completion tracking is not enabled.
This also causes a horizontal line to be rendered in activity view pages
below the activity heading which does not serve much purpose when
there's no activity information to be shown.
The activity information output component should only be displayed
if there's completion information to show or if there are activty dates
to show. Otherwise, there's no need to render it.
The activity information output component displays information about
an activity module that can contain:
1. Activity dates
2. Completion information
a. A manual completion button; or
b. A list of automatic completion conditions and their statuses.
This patch also includes a new JS module called
core_course/manual_completion_toggle for toggling the
completion state of activities that support manual completion.
Both in unit tests, but also in other areas (say blocks, for example)
it's possible that page->url has not been set yet.
So, let's change current code to always check if we have something
(page->url) to compare.
Note the use of has_set_url() is needed, because page->url is magic
method and it doesn't work as expected. Hate magics!
In MDL-63040, it was decided that the page header for the dashboad page
should be removed.
However, Based on Success Criteria 1.3.1 and 2.4.6 from the WebAIM's
WCAG 2 Checklist, all pages should have an <h1> element.
So I put an sr-only heading on the dashboard and all other pages, where
no page header is shown.