28612 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
75dcac4716 Merge branch 'MDL-71463' of https://github.com/paulholden/moodle 2021-05-03 19:00:19 +02:00
David Mudrák
260c2bdb00 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.
2021-05-03 18:13:14 +02:00
Sara Arjona
b04d1c3041 Merge branch 'MDL-71163-master' of git://github.com/rezaies/moodle 2021-05-03 11:59:58 +02:00
Víctor Déniz
6d3107641d Merge branch 'MDL-71189-master-3' of git://github.com/mickhawkins/moodle 2021-05-03 08:08:34 +01:00
Michael Hawkins
f105612d7f MDL-71189 core_completion: Implementing custom completion sort ordering
This adds the requirement for activities supporting custom completion to
specify the order all completion conditions should be displayed for that
activity. It also implements the sorting that takes place.
2021-05-03 13:36:11 +08:00
Jake Dallimore
e5e5a06190 Merge branch 'MDL-52724-master' of git://github.com/merrill-oakland/moodle 2021-05-03 13:25:05 +08:00
Eloy Lafuente (stronk7)
e26b639281 Merge branch 'MDL-66431-master' of git://github.com/ilyatregubov/moodle 2021-05-02 19:12:47 +02:00
Víctor Déniz
bd8600e923 Merge branch 'MDL-70753-master' of https://github.com/sharidas/moodle 2021-05-02 19:11:10 +02:00
Ilya Tregubov
cf1cf222e7 MDL-66431 core: Fix behat tests.
Move activity creation to data generators. Only fixing those
tests failing due to removing usemodchooser preference.
2021-05-01 16:22:03 +02:00
Ilya Tregubov
430746d3a2 MDL-66431 core: Remove activity chooser user preference.
This commit removes activity chooser user preference and
course preference page. Separate dropdowns to activity and
resource is also removed.
2021-05-01 16:21:59 +02:00
Shamim Rezaie
7dbd7ee195 MDL-71163 mod_assign: remove duplicate available from and due date info 2021-04-30 17:13:56 +10:00
Jun Pataleta
6d24e7fb17 Merge branch 'MDL-71486-master' of git://github.com/HuongNV13/moodle 2021-04-30 11:07:57 +08:00
Sujith Haridasan
686bd2681e MDL-70753 report: Provide a separate page for course report
Provide page for the reports in the course administration.
The page has a drop down to navigate to different reports.
The navigation is remembered just like the grade reports in
the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-04-30 08:37:38 +05:30
Jun Pataleta
c646a8eaec Merge branch 'MDL-70947-master' of git://github.com/HuongNV13/moodle 2021-04-30 10:34:11 +08:00
Sara Arjona
3a07ee3191 Merge branch 'MDL-60331-master_take3' of git://github.com/lucaboesch/moodle 2021-04-29 17:49:43 +02:00
Paul Holden
586cc05bce MDL-71463 dml: escape square brackets for SQL Server LIKE operator. 2021-04-29 13:49:43 +01:00
Huong Nguyen
c6fb80b639 MDL-70947 File upload: Upload protection
Interacts badly with double-submit protection, and not all uploads protected
2021-04-29 15:28:19 +07:00
Huong Nguyen
3e2570611f MDL-71486 course: Notice when in site home/course page 2021-04-29 14:42:49 +07:00
Adrian Greeve
98edee3c4a Merge branch 'MDL-71235-master' of https://github.com/dcai/moodle 2021-04-29 14:42:35 +08:00
Andrew Nicols
b4baf69846 Merge branch 'MDL-70965-master' of git://github.com/marinaglancy/moodle 2021-04-29 13:49:59 +08:00
Dongsheng Cai
36bc7b07db MDL-71235 webservices: add activity completion data to web services 2021-04-29 13:52:32 +10:00
Andrew Nicols
72498d5f99 Merge branch 'MDL-56609' of https://github.com/stronk7/moodle 2021-04-29 09:34:18 +08:00
Adrian Greeve
d4673e3047 Merge branch 'MDL-71051-master-2' of git://github.com/marinaglancy/moodle 2021-04-29 09:27:07 +08:00
Luca Bösch
7dd58aac64 MDL-60331 questions: prevent double escaping question categories. 2021-04-28 17:30:46 +02:00
Marina Glancy
badf442ec7 MDL-70965 core_dml: php8 related changes:
1. pg_connection_status(false) fails on PHP8 because the argument is not a stream
2. skipeed the unittest that expected that pg_query() does not show an error if the resource is invalid
see also MDL-71482
2021-04-28 12:42:07 +02:00
Srdjan
ebf19a7085 MDL-70965 core_dml: read_slave - mock db handles as resources
So they comply with the type hints.
2021-04-28 12:38:32 +02:00
Sara Arjona
92cfa71cd0 Merge branch 'MDL-70763' of git://github.com/paulholden/moodle 2021-04-28 12:36:23 +02:00
Ruslan Kabalin
3bf770c801 MDL-71051 core_user: fix issues and address review issues 2021-04-28 11:47:26 +02:00
Marina Glancy
ef3d6a3d70 MDL-71051 core_user: use user profile generator in all tests 2021-04-28 11:47:21 +02:00
Marina Glancy
5682b9a585 MDL-71051 core_user: always use API when working with profile fields 2021-04-28 11:39:04 +02:00
Andrew Nicols
c53d6ffdbe Merge branch 'MDL-70909-master' of git://github.com/ferranrecio/moodle 2021-04-28 10:20:03 +08:00
Andrew Nicols
971d77854a Merge branch 'MDL-71386-master' of git://github.com/NoelDeMartin/moodle 2021-04-28 10:05:28 +08:00
Andrew Nicols
aa6c02a74c Merge branch 'MDL-71389-master' of git://github.com/marinaglancy/moodle 2021-04-28 09:14:48 +08:00
Eloy Lafuente (stronk7)
6f7abc859b 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.
2021-04-27 18:30:52 +02:00
Jun Pataleta
11df82e9f7 Merge branch 'MDL-71410-master' of git://github.com/rezaies/moodle 2021-04-27 12:36:24 +08:00
Shamim Rezaie
4ddc9fe0f4 MDL-71410 core: Prevent recursively calling getters 2021-04-27 14:32:26 +10:00
Víctor Déniz
83ccf95c9e Merge branch 'MDL-71441-master' of git://github.com/bmbrands/moodle 2021-04-26 23:50:22 +01:00
Bas Brands
5941083d1d MDL-71441 core_user: add profilefield social to standard plugins list 2021-04-26 14:43:24 +02:00
Sara Arjona
b8d4e8f251 Merge branch 'MDL-71370-master-test' of git://github.com/junpataleta/moodle 2021-04-26 09:50:40 +02:00
Shamim Rezaie
14e37590bb MDL-71410 core: Introduce override_customdata()
The get_custom_data() method now calls obtain_dynamic_data() because
$this->customdata can be dynamic now.
2021-04-26 05:28:36 +10:00
Jun Pataleta
fca42002f7 MDL-71370 course: Make showcompletionconditions nullable
* When completion tracking is not enabled for the course, it does not
make sense for the course's showcompletionconditions setting to
be set according to the default value indicated by the
"moodlecourse | showcompletionconditions" admin setting. Setting
showcompletionconditions as enabled when completion tracking is disabled
makes even less sense. So in such a case, we should not be setting a
default value for showcompletionconditions and allow it to be null.

* When the course is edited and completion tracking is enabled, this
also would set the "Show completion conditions" field to default to the
value set in the "moodlecourse | showcompletionconditions" admin
setting.
2021-04-24 19:07:42 +08:00
Sara Arjona
12f64a02c9 Merge branch 'MDL-71144-master' of git://github.com/rezaies/moodle 2021-04-23 13:16:01 +02:00
Andrew Nicols
33173e7223 Merge branch 'MDL-70902-master' of git://github.com/dravek/moodle 2021-04-23 11:12:15 +08:00
Ferran Recio
201a37e6aa MDL-70909 behat: context freeze and not freeze steps 2021-04-22 15:50:55 +02:00
Sara Arjona
841df2a216 Merge branch 'MDL-71136_master' of https://github.com/TomoTsuyuki/moodle 2021-04-22 13:56:37 +02:00
Ferran Recio
45048b8796 MDL-70909 core: add cannotmatchanyrows to capabilities join 2021-04-22 13:16:35 +02:00
Noel De Martin
168f28fa75 MDL-71386 behat: Support for 3.9.5+ mobile app 2021-04-22 12:14:18 +02:00
Jun Pataleta
e853e6b7db Merge branch 'MDL-71156-master' of git://github.com/lameze/moodle 2021-04-22 11:51:59 +08:00
Simey Lameze
5b0282847e 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.
2021-04-22 10:28:52 +08:00
Andrew Nicols
5104159fcc Merge branch 'MDL-70412-master' of git://github.com/aanabit/moodle 2021-04-22 10:10:38 +08:00