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.
MDL-75596 added an "Insert an activity or resource before ..." button
that allows adding an activity or a resource before or after another
activity in a course. This renders the button in the DOM (although
hidden and shown only on mouseover) when there's at least one activity
in the course.
In this issue, the button's label was renamed to "Add an activity or
resource before ..." and it now obscures the normal "Add an activity or
resource" button at the bottom of the course section from being
interacted on when running Behat tests.
This failure happens in the create_activity.feature file as it creates
two DB activities in a single scenario – one when "usecomments" is
turned on and one when it's turned off. Given this limitation, a
workaround is to split the "Teacher cannot enable comments if they are
disabled at site level" scenario into two scenarios with the first one
testing when "usecomments" is on while the second scenario testing when
"usecomments" is turned off.
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
Allow users to see their own private messages even if they don't have
mod/forum:readprivatereplies capability
Add behat test to avoid MDL-67109 issue.
Co-authored-by: Martin Putzlocher <mputzi@users.noreply.github.com>
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.