This also implements the functionality for SCORM packages, which may
have SVG images embedded within their content which require loading
directly (and are only created by users with appropriate risk flag).
This implementation will introduct changes to
the mod_quiz to implement the new qbank api
for view. Major changes are introduced in
the custom view and also all the legacy points
to the old qbank are changed to qbank plugins
where needed. It also deprecated and deletes
classes and scripts which were kept not to
break mod_quiz for the new api implementation.
Removes jQuery dependency from calling code that wants to listen
for these events. Maintains backwards compatibility with existing
code that does want to listen to jQuery-style events.
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).
The Flash Player was deprecated in 2017 and officially discontinued
on 31 December 2020, so media_swf player has been completely
removed from Moodle core.
As the message_jabber notification plugin has been removed from core,
the XMPPHP library (aka Jabber) is not required any more so it has
been completely removed from Moodle core too.
This implementation will introduce a qbank plugin "previewquestion"
which will view the preview question action in the question bank
actions by replacing the core classes, scripts and yui modules.
This plugin will also replace the preview option in the edit
question form. Having this plugin will give users the
flexibility of enabling or disabling this feature from
the question bank view.
This change will also allow other qbank plugins to add
elements or information in the preview question page
by implementing a callback. It also changes the pop
up to page redirect from base view page to make sure
any changes in preview reflects in the base view, for
example, comments added and the number of comments in
the comments colum changes while back from the preview
page. Other locations like edit and qtype plugins where
the preview is implemented, stays the same.
Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
This implementation will introduce a qbank plugin "managecategories"
which will add the question categories feature in the question bank view
by replacing the core classes. Having this plugin will give users
the flexibility of enabling or disabling the category tab.
The method allows to check if the user is fully ready to use the site or
whether there is an action (such as filling the missing profile field,
changing password or agreeing to the site policy) needed.
The legacy M.core.event.BLOCK_CONTENT_UPDATED event has been replaced with a
new core_block/events::blockContentUpdated native DOM event.
The new event can be triggered using the `notifyBlockContentUpdated`
event, and by providing the HTMLElement that was updated, for example:
```
import {notifyBlockContentUpdated} from 'core_block/events';
const someHandler = e => {
// ...
const updatedBlock = e.target.closest('.block');
notifyBlockContentUpdated(updatedBlock);
};
```
The new event can be listened to at any point in the DOM using the
following syntax:
```
import {eventTypes} from 'core_block/events';
const handler = e => {
// The block that was updated.
e.target;
// The id of the updated block.
e.detail.instanceId;
};
document.addEventListener(eventTypes.blockContentUpdated, handler);
```
A backward-compatabibility layer is included to ensure that any legacy
YUI event listener is still called with the same arguments.
This legacy bridges will be removed after Moodle 4.3.
The legacy M.core.event.FILTER_CONTENT_UPDATED event has been replaced with a
new core_filter/events::filterContentUpdated native DOM event.
The new event can be triggered using the `notifyFilterContentUpdated`
function, and by providing with an Array containing the HTMLElements
that were updated, for example:
```
import {notifyFilterContentUpdated} from 'core_filter/events';
const someHandler = e => {
// ...
const nodeList = Array.from(document.querySelectorAll('div'));
notifyFilterContentUpdated(nodeList);
};
```
The new event can be listened to at any point in the DOM using the
following syntax:
```
import {eventTypes} from 'core_filter/events';
const handler = e => {
// The list of HTMLElements in an Array.
e.detail.nodes;
};
document.addEventListener(eventTypes.filterContentUpdated, handler);
```
A backward-compatabibility layer is included to ensure that any legacy
YUI event listener, or jQuery event listener are still called with the
same arguments.
This legacy bridges will be removed after Moodle 4.3.