4 days agoweekly release 3.9.7+ MOODLE_39_STABLE
Sara Arjona [Tue, 11 May 2021 10:42:36 +0000 (12:42 +0200)]
weekly release 3.9.7+

4 days agoAutomatically generated installer lang files
AMOS bot [Tue, 11 May 2021 00:07:51 +0000 (00:07 +0000)]
Automatically generated installer lang files

6 days agoMDL-71060 Questions: Duplicates 'Current category' text.
Thong Bui [Sun, 9 May 2021 17:22:22 +0000 (00:22 +0700)]
MDL-71060 Questions: Duplicates 'Current category' text.

7 days agoMoodle release 3.9.7 v3.9.7
Eloy Lafuente (stronk7) [Sat, 8 May 2021 14:40:39 +0000 (16:40 +0200)]
Moodle release 3.9.7

8 days agoweekly release 3.9.6+
Eloy Lafuente (stronk7) [Fri, 7 May 2021 14:54:47 +0000 (16:54 +0200)]
weekly release 3.9.6+

8 days agoNOBUG: Fixed SVG browser compatibility
Eloy Lafuente (stronk7) [Fri, 7 May 2021 14:54:46 +0000 (16:54 +0200)]
NOBUG: Fixed SVG browser compatibility

8 days agoMDL-70622 mod_lti: Tighten redirect param typing
Mathew May [Thu, 22 Apr 2021 05:26:10 +0000 (13:26 +0800)]
MDL-70622 mod_lti: Tighten redirect param typing

8 days agoMDL-70622 mod_lti: Prevent xss on lti 1.3 authentication script
Adam Olley [Fri, 16 Apr 2021 04:28:28 +0000 (13:58 +0930)]
MDL-70622 mod_lti: Prevent xss on lti 1.3 authentication script

Without this, people can craft URLs that other users might use not realising
what they do - and as a XSS vulnerability, it could do any number of things the
clicking-user has access to do on the site.

Change-Id: I82adc71e8706d8929011b4b24523d5b62b8ccea1

9 days agoMDL-70110 mod_assign: make phpunit test DB order agnostic
Sara Arjona [Thu, 6 May 2021 17:05:25 +0000 (19:05 +0200)]
MDL-70110 mod_assign: make phpunit test DB order agnostic

9 days agoMDL-71395 core: fix bug in google lib wrapper
Marina Glancy [Thu, 6 May 2021 11:44:30 +0000 (13:44 +0200)]
MDL-71395 core: fix bug in google lib wrapper

because of changes in PHP8 the '' == 0 is no longer true and the error in the google api wrapper was discovered

9 days agoMDL-71395 block_tag_youtube: sometimes exception may have empty message
Marina Glancy [Wed, 21 Apr 2021 14:19:21 +0000 (16:19 +0200)]
MDL-71395 block_tag_youtube: sometimes exception may have empty message

9 days agoMDL-71491 repository_flickr: return more file data.
Paul Holden [Tue, 4 May 2021 19:08:56 +0000 (20:08 +0100)]
MDL-71491 repository_flickr: return more file data.

See also 643b0cca.

9 days agoMDL-71402 availability: fix group restriction button in mod form.
Paul Holden [Wed, 21 Apr 2021 22:58:32 +0000 (23:58 +0100)]
MDL-71402 availability: fix group restriction button in mod form.

 * The button to "Add group/grouping access restriction" under
   common module settings should only be present if corresponding
   availability plugins are enabled; and
 * Prevent the same button behaving as a submit button, which
   intercepted the user hitting return in the form and added a
   restriction without deliberate action taken by the user.

9 days agoAutomatically generated installer lang files
AMOS bot [Thu, 6 May 2021 00:07:53 +0000 (00:07 +0000)]
Automatically generated installer lang files

10 days agoMDL-71420 environment: Lower sodium requirement to recommended
Eloy Lafuente (stronk7) [Sat, 24 Apr 2021 19:38:54 +0000 (21:38 +0200)]
MDL-71420 environment: Lower sodium requirement to recommended

10 days agoMDL-71517 mod_data: remove invalid form custom data access.
Paul Holden [Tue, 4 May 2021 14:25:57 +0000 (15:25 +0100)]
MDL-71517 mod_data: remove invalid form custom data access.

On PHP7.4, trying to access array offsets of NULL triggers a notice.

10 days agoMDL-71187 quizaccess_seb: Change "Launch Safe Exam Browser" to a href.
Luca Bösch [Tue, 4 May 2021 22:18:22 +0000 (00:18 +0200)]
MDL-71187 quizaccess_seb: Change "Launch Safe Exam Browser" to a href.

In order to allow for correct seb:// or sebs:// calls without browser
warnings of insecure links, it is not possible to send a get request
with an attached cmid parameter to the unknown seb:// or sebs://
URL via a form button.
We've got to use a <a href> link outside a form to circumvent
browsers warning of an insecure link and call Safe Exam Browser

10 days agoMDL-70181 database: Quote database object names
Leon Stringer [Thu, 12 Nov 2020 14:44:11 +0000 (14:44 +0000)]
MDL-70181 database: Quote database object names

Table names and database name now enclosed in backticks.
admin/cli/mysql_collation.php failed if $CFG->prefix was blank with
MySQL 8.0 because table 'groups' conflicted with a new reserved word.

Note that this quotes both mysql_collation.php and mysql_compressed_rows.php
but only the former was mal-functioning.

The case of mysql_compressed_rows.php is a little bit special because
not all tables are processed, only those having big rows. And the groups
table is not one of them. In any case, better add the quotes there for
any future case.

Also, when testing this patch
was discovered and will need to be fixed to make core 100% compliant
with MySQL 8.0 and MariaDB 10.6 and up.

10 days agoMDL-71460 hub: Use checkboxes instead of dropdowns
Peter Dias [Wed, 28 Apr 2021 02:04:07 +0000 (10:04 +0800)]
MDL-71460 hub: Use checkboxes instead of dropdowns

Change the yes/no dropdowns to a checkbox. Defaults to unchecked.

11 days agoMDL-71359 mod_forum: empty forums shouldn't export anything.
Paul Holden [Fri, 16 Apr 2021 19:49:23 +0000 (20:49 +0100)]
MDL-71359 mod_forum: empty forums shouldn't export anything.

11 days agoMDL-71408 h5plib_v124: Add required changes after lib upgrade
Sara Arjona [Wed, 28 Apr 2021 14:55:47 +0000 (16:55 +0200)]
MDL-71408 h5plib_v124: Add required changes after lib upgrade

- The mbstring extension is required since Moodle 3.9 onwards so
the upgrading steps have been removed because they are not
required any more.
- The pull-request for fixing some minor PHP7.4 problems has been
integrated so this patch is not required.

11 days agoMDL-71408 h5plib_v124: Upgrade H5P core library to 1.24.02
Sara Arjona [Wed, 28 Apr 2021 14:35:09 +0000 (16:35 +0200)]
MDL-71408 h5plib_v124: Upgrade H5P core library to 1.24.02

11 days agoMDL-70720 Quiz: Improve capability checks when fetching users' best grades
Huong Nguyen [Thu, 22 Apr 2021 04:01:09 +0000 (11:01 +0700)]
MDL-70720 Quiz: Improve capability checks when fetching users' best grades

11 days agoMDL-69028 repository: Put a rate limit on draft file uploads
Shamim Rezaie [Thu, 10 Sep 2020 01:57:34 +0000 (11:57 +1000)]
MDL-69028 repository: Put a rate limit on draft file uploads

11 days agoMDL-71130 quiz_grading: escape user idnumber on display.
Paul Holden [Tue, 16 Mar 2021 20:55:12 +0000 (20:55 +0000)]
MDL-71130 quiz_grading: escape user idnumber on display.

11 days agoMDL-70804 mnet: Use proper DML method to get records from the table
David Mudrák [Tue, 9 Feb 2021 14:29:11 +0000 (15:29 +0100)]
MDL-70804 mnet: Use proper DML method to get records from the table

This improves the code and avoids the risk of SQL injection through the
malicious XML-RPC request from the MNet peer.

11 days agoMDL-71425 lang: Fix reworded strings in tests
David Mudrák [Tue, 4 May 2021 11:04:31 +0000 (13:04 +0200)]
MDL-71425 lang: Fix reworded strings in tests

11 days agoMDL-71425 lang: Import fixed English strings (en_fix)
Helen Foster [Tue, 4 May 2021 14:59:04 +0000 (16:59 +0200)]
MDL-71425 lang: Import fixed English strings (en_fix)

11 days agoMDL-70786 report_loglive: respect fullname setting.
Luca Bösch [Sat, 6 Feb 2021 16:54:22 +0000 (17:54 +0100)]
MDL-70786 report_loglive: respect fullname setting.

11 days agoMDL-70786 report_log: respect fullname setting.
Luca Bösch [Sat, 6 Feb 2021 14:47:04 +0000 (15:47 +0100)]
MDL-70786 report_log: respect fullname setting.

11 days agoMDL-70786 report_completion: respect fullname setting.
Luca Bösch [Wed, 3 Feb 2021 21:34:57 +0000 (22:34 +0100)]
MDL-70786 report_completion: respect fullname setting.

11 days agoMDL-70786 report_competency: respect fullname setting.
Luca Bösch [Sat, 6 Feb 2021 11:47:25 +0000 (12:47 +0100)]
MDL-70786 report_competency: respect fullname setting.

11 days agoMDL-70786 report_progress: respect fullname setting.
Luca Bösch [Sat, 6 Feb 2021 12:08:52 +0000 (13:08 +0100)]
MDL-70786 report_progress: respect fullname setting.

11 days agoMDL-71268 graphics: Use new Moodle logo for RSS feeds by Moodle
Luca Bösch [Mon, 5 Apr 2021 09:31:07 +0000 (11:31 +0200)]
MDL-71268 graphics: Use new Moodle logo for RSS feeds by Moodle

11 days agoweekly release 3.9.6+
Sara Arjona [Tue, 4 May 2021 11:27:53 +0000 (13:27 +0200)]
weekly release 3.9.6+

11 days agoAutomatically generated installer lang files
AMOS bot [Tue, 4 May 2021 00:07:53 +0000 (00:07 +0000)]
Automatically generated installer lang files

12 days agoMDL-71463 dml: escape square brackets for SQL Server LIKE operator.
Paul Holden [Wed, 28 Apr 2021 20:36:07 +0000 (21:36 +0100)]
MDL-71463 dml: escape square brackets for SQL Server LIKE operator.

12 days agoMDL-70864 files: Fix zip_packer extracting files with trailing dots
David Mudrák [Mon, 19 Apr 2021 19:17:56 +0000 (21:17 +0200)]
MDL-70864 files: Fix zip_packer extracting files with trailing dots

File and folder names cannot end with dots on Windows. So replace the
trailing dots with underscore consistently with how some other zip tools
(such as 7-zip) handle this case.

12 days agoMDL-71390 core: raise max_input_vars requirement for Moodle 3.11
Marina Glancy [Wed, 21 Apr 2021 09:49:57 +0000 (11:49 +0200)]
MDL-71390 core: raise max_input_vars requirement for Moodle 3.11

12 days agoMDL-71440 mod_assign: New capability for viewing the submission summary
Mihail Geshoski [Thu, 29 Apr 2021 03:35:59 +0000 (11:35 +0800)]
MDL-71440 mod_assign: New capability for viewing the submission summary

Creates a new capability mod/assign:viewownsubmissionsummary which will
be required in order to display the submission summary to the user in
the assignment page.

2 weeks agoweekly release 3.9.6+
Víctor Déniz [Fri, 30 Apr 2021 11:54:26 +0000 (12:54 +0100)]
weekly release 3.9.6+

2 weeks agoMDL-71343 core_h5p: Convert all line-endings to UNIX format
Rajneel Totaram [Thu, 29 Apr 2021 11:40:10 +0000 (23:40 +1200)]
MDL-71343 core_h5p: Convert all line-endings to UNIX format

2 weeks agoMDL-71343 core_h5p: Add unit test for helper::parse_js_array
Andrew Nicols [Thu, 29 Apr 2021 06:56:23 +0000 (14:56 +0800)]
MDL-71343 core_h5p: Add unit test for helper::parse_js_array

Signed-off-by: Rajneel Totaram <>
2 weeks agoMDL-69956 forum: throw exception when advanced grading is not ready
Dongsheng Cai [Thu, 8 Apr 2021 12:38:42 +0000 (22:38 +1000)]
MDL-69956 forum: throw exception when advanced grading is not ready

2 weeks agoMDL-71274 analytics: Don't generate insight for hidden courses
Amaia Anabitarte [Wed, 7 Apr 2021 15:07:22 +0000 (17:07 +0200)]
MDL-71274 analytics: Don't generate insight for hidden courses

Hidden courses can be used for training
but we do not want to generate insights for them
because students do not have access to hidden courses.
This was fixed in MDL-66806 for "Students at risk" model.
Fixed for "Students who have not accessed the course recently" in this issue.

2 weeks agoMDL-71481 repository_flickr_public: return more file data.
Paul Holden [Thu, 29 Apr 2021 07:24:15 +0000 (08:24 +0100)]
MDL-71481 repository_flickr_public: return more file data.

A HTTP HEAD request is required to get the image filesize.
The remaining data can be obtained from existing calls to
the Flickr API.

2 weeks agoMDL-71016 gradeexport_xml: ensure user/grade idnumbers are encoded.
Paul Holden [Mon, 1 Mar 2021 21:47:01 +0000 (21:47 +0000)]
MDL-71016 gradeexport_xml: ensure user/grade idnumbers are encoded.

2 weeks agoMDL-60331 questions: prevent double escaping question categories.
Luca Bösch [Wed, 31 Mar 2021 13:33:57 +0000 (15:33 +0200)]
MDL-60331 questions: prevent double escaping question categories.

2 weeks agoMDL-70110 assign: add group submission attemptnumber test
Septatrix [Sat, 17 Apr 2021 10:49:15 +0000 (12:49 +0200)]
MDL-70110 assign: add group submission attemptnumber test

2 weeks agoMDL-70909 mod_h5pactivity: Whitespace fix
Andrew Nicols [Wed, 28 Apr 2021 02:25:36 +0000 (10:25 +0800)]
MDL-70909 mod_h5pactivity: Whitespace fix

2 weeks agoMDL-56609 phpunit: Fix bogus expectation on DST changes day
Eloy Lafuente (stronk7) [Sun, 28 Mar 2021 12:01:22 +0000 (14:01 +0200)]
MDL-56609 phpunit: Fix bogus expectation on DST changes day

Current test works ok every day of the year but the day of
DST begin changes (last Sunday of March currently).

That day, 01:00 Europe/London simply doesn't exist, because
the time is moved forward by 60 minutes.

Hence the expectation for the next cron execution is not 1 "normal"
day (24h) but 1 less hour.

Note this only happens for the current test on DST begins, the
opposite change (DST ends), happening the last Sunday of October
is not affected, because, at all effects, 01:00 is a perfectly normal
and existing hour.

2 weeks agoMDL-71244 enrol_manual: Add bootstrap classes to buttons
Luca Bösch [Tue, 30 Mar 2021 14:49:17 +0000 (16:49 +0200)]
MDL-71244 enrol_manual: Add bootstrap classes to buttons

2 weeks agoMDL-70909 mod_h5pactivity: fix reports on freeze context
Ferran Recio [Tue, 16 Feb 2021 16:09:31 +0000 (17:09 +0100)]
MDL-70909 mod_h5pactivity: fix reports on freeze context

2 weeks agoMDL-70909 behat: context freeze and not freeze steps
Ferran Recio [Mon, 19 Apr 2021 10:01:36 +0000 (12:01 +0200)]
MDL-70909 behat: context freeze and not freeze steps

2 weeks agoMDL-70909 core: add cannotmatchanyrows to capabilities join
Ferran Recio [Tue, 16 Feb 2021 16:08:51 +0000 (17:08 +0100)]
MDL-70909 core: add cannotmatchanyrows to capabilities join

2 weeks agoweekly release 3.9.6+
Sara Arjona [Tue, 27 Apr 2021 13:14:56 +0000 (15:14 +0200)]
weekly release 3.9.6+

2 weeks agoMDL-71434 mod_data: add form control class to template textarea.
Paul Holden [Sun, 25 Apr 2021 17:28:48 +0000 (18:28 +0100)]
MDL-71434 mod_data: add form control class to template textarea.

3 weeks agoMDL-70110 assign: fixed ws get_submissions for groups
Tim Schroeder [Tue, 3 Nov 2020 10:53:32 +0000 (11:53 +0100)]
MDL-70110 assign: fixed ws get_submissions for groups

3 weeks agoMDL-71416 report_log: user context header should show users name.
Paul Holden [Fri, 23 Apr 2021 11:47:55 +0000 (12:47 +0100)]
MDL-71416 report_log: user context header should show users name.

Co-Authored-By: Luca Bösch <>
3 weeks agoweekly release 3.9.6+
Sara Arjona [Fri, 23 Apr 2021 08:47:01 +0000 (10:47 +0200)]
weekly release 3.9.6+

3 weeks agoMDL-71171 customfield_text: ensure we set defaults properly
Mark Nelson [Mon, 22 Mar 2021 14:55:20 +0000 (22:55 +0800)]
MDL-71171 customfield_text: ensure we set defaults properly

3 weeks agoMDL-66673 groups: Stop notice when messaging system is disabled
ScottVerbeek [Fri, 19 Feb 2021 00:28:54 +0000 (10:28 +1000)]
MDL-66673 groups: Stop notice when messaging system is disabled

3 weeks agoMDL-71386 behat: Support for 3.9.5+ mobile app
Noel De Martin [Tue, 20 Apr 2021 15:26:27 +0000 (17:26 +0200)]
MDL-71386 behat: Support for 3.9.5+ mobile app

3 weeks agoMDL-71200 mod_folder: ensure "Download folder" option is backed up.
Paul Holden [Fri, 26 Mar 2021 11:03:26 +0000 (11:03 +0000)]
MDL-71200 mod_folder: ensure "Download folder" option is backed up.

3 weeks agoMDL-70979 search: validate external user search parameters.
Paul Holden [Mon, 22 Feb 2021 20:02:40 +0000 (20:02 +0000)]
MDL-70979 search: validate external user search parameters.

Clean return value in unit test for same.

3 weeks agoMDL-71400 assignfeedback_offline: Fix message after worksheet upload
Mihail Geshoski [Thu, 22 Apr 2021 04:21:04 +0000 (12:21 +0800)]
MDL-71400 assignfeedback_offline: Fix message after worksheet upload

3 weeks agoMDL-71156 core: machinery to recover orphaned calendar events
Simey Lameze [Fri, 16 Apr 2021 03:42:33 +0000 (11:42 +0800)]
MDL-71156 core: machinery to recover orphaned calendar events

The machinery to fix orphaned calendar events that were broken by MDL-67494.

The solution consists of:

1) Upgrade step that checks if this site has executed the problematic upgrade steps and
   if positive, it will schedule a new run for calendar_fix_orphaned_events adhoc task.

2) Adhoc task that will self-spawn calling the recovery machinery, running until
   all the orphaned calendar events are fixed. It also sets the maximum runtime of
   60 seconds. It is also possible to override that number by specifing the desired
   number setting the ->calendareventsmaxseconds in your config.php

3) CLI script that will look for all the calendar events which userids
   where broken by a wrong upgrade step, affecting to Moodle 3.9.5
   and up.

   It performs checks to both:
     a) Detect if the site was affected (ran the wrong upgrade step).
     b) Look for orphaned calendar events, categorising them as:
       - standard: site / category / course / group / user events
       - subscription: events created via subscriptions.
       - action: normal action events, created to show common important dates.
       - override: user and group override events, particular, that some activities support.
       - custom: other events, not being any of the above, common or particular.

   By specifying it (--fix) try to recover as many broken events (missing userid) as
   possible. Standard, subscription, action, override events in core are fully supported but
   override or custom events should be fixed by each plugin as far as there isn't any standard
   API (plugin-wise) to launch a rebuild of the calendar events.

4) Unit tests and helper functions to generate calendar events. We have decided to
   keep the tests simple, testing only true and false and not using data generators because
   the code is purely to recover the calendar events and won't turn into an API or something
   and also due to the urgency of this issue.
   The helpers have been created in calendar/tests/helpers.php since there are no data generators
   for calendar.

3 weeks agoweekly release 3.9.6+
Sara Arjona [Tue, 20 Apr 2021 13:51:17 +0000 (15:51 +0200)]
weekly release 3.9.6+

3 weeks agoMDL-70970 quizaccess_seb: consistent property array sorting by key.
Paul Holden [Tue, 20 Apr 2021 11:06:03 +0000 (12:06 +0100)]
MDL-70970 quizaccess_seb: consistent property array sorting by key.

In PHP8.0 using `ksort` was producing incorrect results by sorting
keys differing only in case in the wrong order. This change makes
sorting consistent between PHP versions.

Co-Authored-By: Tim Hunt <>
3 weeks agoMDL-71376 mod_quiz: fix undefined object reference
Rajneel Totaram [Tue, 20 Apr 2021 08:14:53 +0000 (20:14 +1200)]
MDL-71376 mod_quiz: fix undefined object reference

3 weeks agoAutomatically generated installer lang files
AMOS bot [Tue, 20 Apr 2021 00:07:48 +0000 (00:07 +0000)]
Automatically generated installer lang files

3 weeks agoMDL-68747 mod_quiz: force LTR for quiz grading overview chart
Dongsheng Cai [Wed, 14 Apr 2021 12:44:43 +0000 (22:44 +1000)]
MDL-68747 mod_quiz: force LTR for quiz grading overview chart

3 weeks agoMDL-71127 mod_quiz: fix thrown exception for invalid question columns.
Paul Holden [Tue, 16 Mar 2021 18:45:39 +0000 (18:45 +0000)]
MDL-71127 mod_quiz: fix thrown exception for invalid question columns.

3 weeks agoMDL-71168 report_participation: fix select all users checkbox.
Paul Holden [Mon, 22 Mar 2021 21:54:22 +0000 (21:54 +0000)]
MDL-71168 report_participation: fix select all users checkbox.

3 weeks agoAutomatically generated installer lang files
AMOS bot [Sun, 18 Apr 2021 00:07:44 +0000 (00:07 +0000)]
Automatically generated installer lang files

3 weeks agoMDL-71365 grunt: fix ignores missing LF @ EOF
Eloy Lafuente (stronk7) [Sat, 17 Apr 2021 22:16:39 +0000 (00:16 +0200)]
MDL-71365 grunt: fix ignores missing LF @ EOF

4 weeks agoMDL-71364 behat: fix randomness causes by "now" advancing
Eloy Lafuente (stronk7) [Fri, 16 Apr 2021 22:45:55 +0000 (00:45 +0200)]
MDL-71364 behat: fix randomness causes by "now" advancing

Some recent tests do set a date time element
to ##now## or tomorrow and, immediately after that
the look if, effectively, ##now## and #tomorrow#
have been set (with minutes resolution).

Problem is that, between the field is set and the field
is verified, it can happen that the time advances to
next minute (from H:M:59 to H:M+1:00) and then the
assertion fails.

To avoid this, we could have lowered the resolution to be
hours... but that doesn't solve the problem just makes it
to happen less often.

So, instead of that... we are setting the 2 now and tomorrow
cases to be "today noon" and "tomorrow noon" (12:00:00) so
we ensure they won't be ever in the risk of jumping of minute.

4 weeks agoweekly release 3.9.6+
Sara Arjona [Fri, 16 Apr 2021 15:03:31 +0000 (17:03 +0200)]
weekly release 3.9.6+

4 weeks agoMDL-70412 groups: Improving create_group data generator
Amaia Anabitarte [Thu, 26 Nov 2020 08:29:43 +0000 (09:29 +0100)]
MDL-70412 groups: Improving create_group data generator

Increasing the size of the name for generated groups
to ensure we don't have problems with ordering.

4 weeks agoMDL-65553 core_analytics: Don't allow to flag predictions several times
Amaia Anabitarte [Tue, 16 Feb 2021 12:17:51 +0000 (13:17 +0100)]
MDL-65553 core_analytics: Don't allow to flag predictions several times

Even if a prediction is hidden from the report once is flagged,
it can be flagged several times if the user visits detailed view via URL.
We remove the checkbox to select a prediction and flag it
once it has already been flagged.

4 weeks agoAutomatically generated installer lang files
AMOS bot [Thu, 15 Apr 2021 00:07:59 +0000 (00:07 +0000)]
Automatically generated installer lang files

4 weeks agoMDL-71338 tool_usertours: correct Content-Type on tour export.
Paul Holden [Wed, 14 Apr 2021 20:07:43 +0000 (21:07 +0100)]
MDL-71338 tool_usertours: correct Content-Type on tour export.

Replace existing code with standard file serving mechanism, in
turn correcting the previously incorrect Content-Type header.

4 weeks agoMDL-70446 search_solr: File indexing can fail due to multipart upload
sam marshall [Thu, 10 Dec 2020 12:02:41 +0000 (12:02 +0000)]
MDL-70446 search_solr: File indexing can fail due to multipart upload

Due to Solr bug SOLR-15039, uploading files for indexing can fail if
it uses multipart upload. This changes it to use direct binary upload.

Unfortunately, the direct binary version in PHP curl only supports a
string, so we have to load the file into memory. I added extra code to
restrict the size of files indexed to (memory limit - 100MB), which is
usually 284MB unless configured differently because cron runs under

4 weeks agoMDL-70616 gradingform_rubric: Filters not applied to rubric name
Iñigo Zendegi [Wed, 14 Apr 2021 09:15:11 +0000 (11:15 +0200)]
MDL-70616 gradingform_rubric: Filters not applied to rubric name

4 weeks agoMDL-71119 core_badges: Add more information to errors
Sara Arjona [Wed, 14 Apr 2021 08:52:34 +0000 (10:52 +0200)]
MDL-71119 core_badges: Add more information to errors

Some errors raised when calling external services were ignored.
Displaying this information helps to debug and find the real reasons
why some action, like connecting to an external backpack, can't be

4 weeks agoMDL-71119 core_badges: Use basicauth and remove urlencode
Sara Arjona [Tue, 16 Mar 2021 11:43:39 +0000 (12:43 +0100)]
MDL-71119 core_badges: Use basicauth and remove urlencode

Basic authorization header is required to get token. Besides, client
id and secret shouldn't call urlencode.

4 weeks agoMDL-71119 core_badges: Initialise scopes param in backpack-connect.php
Sara Arjona [Tue, 16 Mar 2021 11:32:20 +0000 (12:32 +0100)]
MDL-71119 core_badges: Initialise scopes param in backpack-connect.php

The scopes parameter should be passed when creating the OAuth2 badges
client. As it is an optional parameter, when it's empty, it will
be initilised with the supported scopes for the backpack issuer.

It will happen, for instance, when a call is done to oauth2callback.php
because, as defined in RFC6749, OAuth2 authorization response only
supports code and state.

4 weeks agoMDL-70772 mod_forum: check for valid usernode before making active.
Paul Holden [Tue, 2 Feb 2021 19:36:49 +0000 (19:36 +0000)]
MDL-70772 mod_forum: check for valid usernode before making active.

4 weeks agoAutomatically generated installer lang files
AMOS bot [Wed, 14 Apr 2021 00:07:53 +0000 (00:07 +0000)]
Automatically generated installer lang files

4 weeks agoMDL-71154 ci: Prevent upstream branches and tags to be built
Eloy Lafuente (stronk7) [Sun, 21 Mar 2021 18:05:22 +0000 (19:05 +0100)]
MDL-71154 ci: Prevent upstream branches and tags to be built

Both for travis and GHA:

- master and MOODLE_XXX_STABLE branches
- any vX.Y.Z tag

won't lead to a build anymore.

4 weeks agoweekly release 3.9.6+
Eloy Lafuente (stronk7) [Tue, 13 Apr 2021 08:26:35 +0000 (10:26 +0200)]
weekly release 3.9.6+

4 weeks agoMDL-71313 repositories: warn if get_instances context is wrong type
Tim Hunt [Mon, 12 Apr 2021 19:30:43 +0000 (20:30 +0100)]
MDL-71313 repositories: warn if get_instances context is wrong type

5 weeks agoMDL-69102 phpunit: Add test to cover ALL cohort criteria
Eloy Lafuente (stronk7) [Thu, 8 Apr 2021 17:19:09 +0000 (19:19 +0200)]
MDL-69102 phpunit: Add test to cover ALL cohort criteria

That way we can check that the expectations are
working ok for every database. Previously only the
ANY case was being tested.

Also, convert them to course badges and check, via
review_all_criteria() that the SQL structures returned
by award_criteria_cohort->get_completed_criteria_sql()
doesn't fail and return the expected counters.

5 weeks agoMDL-71303 core: HTML not escaped in block skip link
Issam Taboubi [Fri, 9 Apr 2021 21:10:19 +0000 (17:10 -0400)]
MDL-71303 core: HTML not escaped in block skip link

5 weeks agoAutomatically generated installer lang files
AMOS bot [Fri, 9 Apr 2021 00:07:54 +0000 (00:07 +0000)]
Automatically generated installer lang files

5 weeks agoMDL-52724 editor_atto: Scrub atto html for invalid ol, ul, and li tags
Eric Merrill [Thu, 8 Apr 2021 19:20:24 +0000 (15:20 -0400)]
MDL-52724 editor_atto: Scrub atto html for invalid ol, ul, and li tags

Try to correct broken ul/ol/li tags, as they have an outsized impact
on course layout. Uses basic regex and loops to track open and closed

Also adds a deep clean option to the HTML cleaner, that runs less
frequent, more intensive cleanings. This is because normally _cleanHTML
gets called after each keystroke, which could cause problems with
large content on weak systems.

Behat changes are a fix for setting multiline strings in Atto, and
creating a multiline match step.

5 weeks agoMDL-71107 core_contentbank: Behat test. Authoring when copying a course
Amaia Anabitarte [Tue, 16 Mar 2021 12:18:10 +0000 (13:18 +0100)]
MDL-71107 core_contentbank: Behat test. Authoring when copying a course

5 weeks agoMDL-71107 core_contentbank: Fill content author when copying a course
Amaia Anabitarte [Mon, 15 Mar 2021 12:45:42 +0000 (13:45 +0100)]
MDL-71107 core_contentbank: Fill content author when copying a course

'usercreated' and 'usermodified' fields can not be always mapped.
We are filling those fields with 'old' users when working on the same
site, or with current user when working on a different instance.

5 weeks agoMDL-70049 assign: count_submissions_need_grading call when can't grade
Alex Rowe [Tue, 9 Feb 2021 01:25:46 +0000 (12:25 +1100)]
MDL-70049 assign: count_submissions_need_grading call when can't grade

5 weeks agoMDL-70595 core: Updated security.txt expiry
Michael Hawkins [Tue, 6 Apr 2021 05:01:19 +0000 (13:01 +0800)]
MDL-70595 core: Updated security.txt expiry