Whenever the page_requirements_manager::js_fix_url()
is called with null url, it must throw an exception and emit 0 warnings.
It's covered by an explicit test:
test_js_fix_url_coding_exception with data set "Provide a null argument"
The json_decode function does not accept a null, which is the
traditional default for get_user_preferences. By passing a default of
am empty string we avoid issues in PHP 8.1.
With Moodle 4.1 and up, we have stopped to work with strftime(),
because it's deprecated for PHP 8.1 and up and, instead we are
using core_date::strftime() that performs the conversions using
the php-intl extension.
The original strftime() had a lot of OS-specific dependencies,
both about locale names and charsets used to provide the information.
Instead, the php-intl gets rid of all those OS-specific nightmares
and only uses ICU/Unicode locales and UTF-8.
Because of that, the old utf-8 => windows charset => utf-8
conversions aren't needed anymore. Hence, removing them.
We created a list of placeholder selectors in placeholderSelectors option.
The purpose of this list is to indicate the contents that are only shown
in the editor and not to the users, by that way, we can decide to apply or
not to apply rules, styles, etc... to these contents
PHP before version 8.1 automatically converted to int if the function
parameter (or array key) is expected to be int. PHP 8.1 shows notice in
this case
PHP before version 8.1 automatically converted stdClass or 'false' to arrays if
function parameter expects array (for example, "reset").
PHP 8.1 shows notices in these situations
At the moment, quiz_statistics\task\recalculate gives no useful
information about what it is doing, which makes it hard to investigate
if the task fails. This commit makes it more usefully verbose.
Also, following this change, one instance of this task will not
run for more than one hour at a time.
As part of this commit, I have added a new helper mtrace_exception.
to consistently log exceptions in scheduled tasks. It is sad to
add a new function to moodlelib.php, but that seemed the logical place.
Looking at other tasks, this method is badly needed. Many are just
logging the ->getMessage() which is normaly insufficient for proper
debugging. However, swiching all existing tasks to use the new function
will need to wait for a future MDL.
- Markdown is saved to the DB, no conversion to HTML to keep
ability to reedit the content without beaking it.
- Blockquote element is styled that it's distingishable from
normal text.
When the param string contains a left curly bracket as the first character,
the system will assume the string is a JSON string and will be parsed and returned as an object.
But in some cases, the string is not JSON and will return an error if the system parses it.
For example, a user might have used the course name with a left curly bracket as the first character.
Adding a double quote after the left curly bracket to differentiate between string and JSON string,
so it can be safe to parse the string.
This will find all data generators that can be used in behat via the
'the following "something" exist:' step, and display them in a select
list on the step definitions page.
When a generator is selected, it will fetch the required fields for that
generator and display them on the page.
jQuery submit events do not trigger the native submit event, and
therefore the TinyMCE submit listener is not called. This means that the
tinymce.triggerSave() function is not called, and the editor content is
not saved.
To work around this, if there is a form for the Node that the editor is
attached to, the jQuery submit event is listened to and the save event
called.
Unfortunately it is not possible to use a global jQuery submit listener
added to the document to save all editors on the page.
In some cases, this is too late because the bubbling process means that
a child node consumer may attempt to consume the data before the
delegated handler is called for the document.
Use the full result from download_file_content within the component
installer to ensure that spurious debugging is not emitted during
operation. Handle validation of the returned data consistently.