Including in this commit:
- Modify the UI to make the section dropzone more visible
- Prevent the direct image dragging in Chrome, Safari by improving the check
For legacy reasons, the course renderings uses a format setting to know
if the page is multiple sections per page or a single section per page.
This format specific dependency is not solved using a get_course_display
format method any plugin can extend.
For the three unit tests that are going to be modified in future
commit, I first changed them to use a namespace and class name
matching filename, as per current standard.
Moodle announced that support for IE would be dropped back in August
2020 with Moodle 3.9 but not active steps were taken at that time. That
decision was made in MDLSITE-6109 and this particular step was meant to
be taken in Moodle 3.10.
This is the first step taken to actively drop support for IE.
This commit also bumps the browser support pattern from 0.25% to 0.3%.
The percentage here includes any browser where at least this percentage
of users worldwide may be using a browser. In this case it causes
support for Android 4.3-4.4 to be dropped, which relate to Android
KitKat (released 2013).
This combination of changes means that all of the supported browsers in
our compatibility list support modern features including async,
for...of, classes, native Promises, and more which has a huge impact on
the ease of debugging code, and drastically reduces the minified file
size because a number of native Polyfills included by Babel are no
longer included.
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.
Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.
Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.
The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.
Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.
This issue is a followup for changes made in forum. And hence
addresses the following issues spotted for forum:
1. Bring back the "Forums" header in the search page.
2. Remove the stale function forum_update_subscriptions_button
3. Fix the redirection to activity tab when subscription is
changed, in the subscription tab.
Now content and course index sections have special mutations to store
the collapsed preferences. This way the backend implementation is
independent of the frontend one and can use caches or other kind of
optimizations of necessary.
Orignally, the lock icon in the course index and the course content
represents different things and it was confusing for users. Now both
section and cm state data calculate the hasRestrictions attribute the
same way as the course content lock icons.
The first week is only highlighted if course starts today or
later. So, the course will be created with startdate on
yesterday to guarantee it always passes.
Move the section visible logic to the format base class. This way format
plugins can decide whenever a section is visible or not instead of using
format custom settings from core.
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 versioning changes will require some major changes
in the backup and restore of question bank and its
elements. This change introduces those changes to make
it compatible with the new world of versioning in question
bank. This commit also removes quiz_slots fields and
quiz_slot_tags table.
This commit will also introduce the versioning db
structure and some major changes to the quiz
and quiz attempts for the question, random
question and the view.
This commit implements the behat changes for versioning
in core question and associated locations.
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_get_user_navigation_options() is called on each request
from the add_course_essentials() method, to initialise the basic
navigation options that are available or not for the current user.
This information is not always displayed in boost (for
instance, in a module page), but it might be required by some blocks,
like Navigation.
However, this block is hidden by default in boost since MDL-73347,
so at any point we should check if it's possible to change the way
this navigations options is loaded, to only get this information
when it's strictly required.
If there are no course badges, students shouldn't have a link to a
page saying there are no badges available.
This patch is for displaying the Badges in the secondary navigation
only if the user can manage badges or there is, at least, one
badge available to the current user.
Previously, the timeline block courses view included all courses in
alphabetical order, whether they contained any events matching the
relevant filters or not. This could be tedious and misleading if there
were many courses with no events appearing before a course which did
have matching events. Now, courses are only included if they contain
events matching the currently set time filter and search term. When
those values are modified, the block will be refreshed and fetch
results for the current values, and also takes these into
consideration when determining whether to display the show more courses
button.