107423 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
357f784091 MDL-76537 behat: Month and day names are lang-dependent correct utf-8
Just verify that calendars are always displayed with correct UTF-8
and in the language the user is currently using.
2023-01-13 09:57:28 +01:00
Eloy Lafuente (stronk7)
7827edc78d MDL-76537 core: Fix date_format_string() to work with php-intl
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.
2023-01-13 09:57:28 +01:00
Jun Pataleta
5dbac075be weekly release 4.2dev 2023-01-13 10:52:09 +08:00
Paul Holden
e72f47cbfc Merge branch 'MDL-76739-master-fix' of https://github.com/junpataleta/moodle 2023-01-12 12:09:15 +00:00
Jun Pataleta
4c36405d3a Merge branch 'MDL-76649-master-fix' of https://github.com/junpataleta/moodle 2023-01-12 17:09:58 +08:00
Jun Pataleta
25ff4c441b MDL-76739 mod_data: Split comments test into two
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.
2023-01-12 17:05:55 +08:00
Jun Pataleta
71b3f9c39f MDL-76649 mod_quiz: Use correct quizid attribute from attempt 2023-01-12 15:17:35 +08:00
Andrew Nicols
769397fd9d Merge branch 'MDL-76820-master' of https://github.com/cameron1729/moodle 2023-01-12 12:09:11 +08:00
Jun Pataleta
e0d857f39f Merge branch 'MDL-76649' of https://github.com/timhunt/moodle 2023-01-12 12:06:35 +08:00
Jun Pataleta
f23d02a0ca Merge branch 'MDL-76474-master-2' of https://github.com/HuongNV13/moodle 2023-01-12 11:55:29 +08:00
Huong Nguyen
6dd6248e41 MDL-76474 tiny_h5p: Prevent H5P Formatter placeholder to be assessed 2023-01-12 10:51:03 +07:00
Huong Nguyen
d21b6d194a MDL-76474 tiny_accessibilitychecker: Prevent placeholders to be assessed 2023-01-12 10:51:03 +07:00
Huong Nguyen
c4c85a8f1c MDL-76474 editor_tiny: Implement placeholder selector list
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
2023-01-12 10:51:02 +07:00
Michael Hawkins
71564e3e70 MDL-76861 blog: Ensure correct escaping applied to search string 2023-01-12 11:42:51 +08:00
Jake Dallimore
230ac291c8 MDL-76862 user: Unit test for setting user home page preferences 2023-01-12 11:35:10 +08:00
Paul Holden
2dfc273752 MDL-76862 user: ensure user can only update own preferred start page. 2023-01-12 11:35:10 +08:00
Andrew Nicols
f516200459 Merge branch 'MDL-76839' of https://github.com/paulholden/moodle 2023-01-12 10:56:33 +08:00
Cameron Ball
c9769197cd MDL-76820 core_search: Reset manager::$coursedeleting between tests 2023-01-12 10:43:29 +08:00
Jun Pataleta
2a29bead81 Merge branch 'MDL-76739-master-test' of https://github.com/junpataleta/moodle 2023-01-12 10:17:08 +08:00
Jun Pataleta
5166c729b4 MDL-76739 behat: Replace occurrences of "surname" in Behat tests
Replace occurrences of "surname" in Behat tests with "last name"
2023-01-12 09:53:41 +08:00
David Mudrák
50ba9dc72c MDL-76739 lang: Use the fixed strings in the tests, too 2023-01-12 09:17:27 +08:00
Helen Foster
975a127325 MDL-76739 lang: Import fixed English strings (en_fix) 2023-01-12 09:17:27 +08:00
Ilya Tregubov
be1c1485ad Merge branch 'MDL-76607-master' of https://github.com/davewoloszyn/moodle 2023-01-11 19:11:49 +07:00
Andrew Nicols
c81fbbfec9 Merge branch '66924-view-own-private-reply-master' of https://github.com/DSI-Universite-Rennes2/moodle 2023-01-11 15:52:41 +08:00
Tim Hunt
3b23ff6fec MDL-76810 redirect handling: ensure return URLs are properly sanitised 2023-01-11 11:42:28 +08:00
Andrew Nicols
6f1c9d3b53 Merge branch 'MDL-76614' of https://github.com/timhunt/moodle 2023-01-11 10:32:42 +08:00
Andrew Nicols
9e21e8a807 Merge branch 'MDL-76356' of https://github.com/stronk7/moodle 2023-01-11 10:26:20 +08:00
Jake Dallimore
98a23389b6 Merge branch 'MDL-76597-master-2' of https://github.com/junpataleta/moodle 2023-01-11 10:12:20 +08:00
Paul Holden
362818ff36 Merge branch 'MDL-76811-master' of https://github.com/andrewnicols/moodle 2023-01-10 16:40:05 +00:00
Paul Holden
6bd76e2a4d Merge branch 'MDL-76803-master' of https://github.com/junpataleta/moodle 2023-01-10 16:24:09 +00:00
Paul Holden
37f68b7522 Merge branch 'MDL-76653-master' of https://github.com/lameze/moodle 2023-01-10 15:29:15 +00:00
Marina Glancy
b1c97381b4 MDL-76356 various: avoid implicit conversion to int
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
2023-01-10 15:27:11 +01:00
Paul Holden
1bf87e87a4 MDL-76839 mod_data: correct external test class coverage notation. 2023-01-10 12:59:06 +00:00
Paul Holden
4250414279 Merge branch 'MDL-76833-master' of https://github.com/andrewnicols/moodle 2023-01-10 12:29:17 +00:00
Marina Glancy
594a8c5ab7 MDL-76356 various: avoid implicit conversion to arrays
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
2023-01-10 12:16:52 +01:00
Jun Pataleta
2924075480 MDL-76803 lang: Update usages of reworded email display options 2023-01-10 16:01:18 +08:00
Andrew Nicols
7519620572 MDL-76833 core: Bump phpunit/php-code-coverage version
This includes a bug fix for a display issue with code coverage reporting
in phpunit's HTML output report.
2023-01-10 12:09:01 +08:00
Andrew Nicols
35eb66d9dc MDL-76811 mod_data: Remove duplicate tests 2023-01-10 11:39:40 +08:00
Andrew Nicols
cec147f428 MDL-76811 mod_data: Stop testing template creation on field creation
The default template is no longer created when creating the fields with
the generator, so we should stop testing that it is.
2023-01-10 11:39:40 +08:00
Andrew Nicols
103b17c761 MDL-76811 mod_data: Generator test cleanup 2023-01-10 11:39:39 +08:00
Jun Pataleta
3385715f52 MDL-76803 lang: Make email display options more concise 2023-01-10 11:04:03 +08:00
Simey Lameze
4d2b1f26a7 MDL-76653 behat: add coverage for SCORM availability 2023-01-10 10:26:20 +08:00
Jun Pataleta
1a7a646ca2 Merge branch 'MDL-76061-master' of https://github.com/PhMemmel/moodle 2023-01-10 09:41:37 +08:00
Tim Hunt
7e4972a4a8 fixup! MDL-76614 quiz: deprecate class moodle_quiz_exception 2023-01-09 17:48:26 +00:00
Philipp Memmel
b84005ef9f MDL-76061 core_calendar: Fix changing event type from 'user' 2023-01-09 14:49:50 +01:00
Julien Boulen
b87ead3384 MDL-66924 mod_forum: Allow users to see their own private messages
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>
2023-01-09 14:41:01 +01:00
Tim Hunt
192f993906 MDL-76649 quiz statistics task: output more useful trace info
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.
2023-01-09 13:26:41 +00:00
Paul Holden
025985ff61 Merge branch 'MDL-75532-master' of https://github.com/snake/moodle 2023-01-09 11:50:58 +00:00
Jun Pataleta
6bbe2ebf06 Merge branch 'MDL-76785' of https://github.com/paulholden/moodle 2023-01-09 19:38:36 +08:00
Jun Pataleta
db2ee34986 Merge branch 'MDL-76506' of https://github.com/jrchamp/moodle 2023-01-09 19:34:07 +08:00