Commit graph

28528 commits

Author SHA1 Message Date
Andrew Nicols
7b21ac7a0c Merge branch 'MDL-70902-311' of git://github.com/dravek/moodle into MOODLE_311_STABLE 2021-04-23 11:17:20 +08:00
Ferran Recio
cd97f217b6 MDL-70909 behat: context freeze and not freeze steps 2021-04-22 15:51:36 +02:00
Sara Arjona
7ccfb2410a Merge branch 'MDL-71136_311' of https://github.com/TomoTsuyuki/moodle into MOODLE_311_STABLE 2021-04-22 13:56:43 +02:00
Jun Pataleta
e774335f16 MDL-71144 completion: Deprecate get_completion_state callbacks
* *_get_completion_state() callback functions have been deprecated and
should no  longer be used. Plugins that define custom completion rules
must implement the mod_[modname]\completion\custom_completion class that
extends the \core_completion\activity_custom_completion base class.
2021-04-22 21:28:09 +10:00
Ferran Recio
150280bafa MDL-70909 core: add cannotmatchanyrows to capabilities join 2021-04-22 13:09:47 +02:00
Noel De Martin
5c1cf60ae4 MDL-71386 behat: Support for 3.9.5+ mobile app 2021-04-22 12:15:37 +02:00
Jun Pataleta
78672323e6 Merge branch 'MDL-71156-311' of git://github.com/lameze/moodle into MOODLE_311_STABLE 2021-04-22 11:53:27 +08:00
Simey Lameze
10018bbc39 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:39:46 +08:00
Andrew Nicols
2fb5cb74e9 Merge branch 'MDL-70412-311' of git://github.com/aanabit/moodle into MOODLE_311_STABLE 2021-04-22 10:08:22 +08:00
abgreeve
3f1727adcf Merge branch 'MDL-28452-311' of git://github.com/bmbrands/moodle into MOODLE_311_STABLE 2021-04-22 09:35:18 +08:00
Marina Glancy
6d107d48c9 MDL-71389 various: changes to unittests due to php8 changes:
- some engine error messages changed
- some warning levels changed
- the carriage return symbol randomly appears
- one phpunit assertion fails and not really representative of anything
2021-04-21 12:39:02 +02:00
Bas Brands
37f26f211f MDL-28452 core_user: migrate social profile fields
Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
2021-04-21 11:24:34 +02:00
Jun Pataleta
bcc9028f20 Merge branch 'MDL-71017-311-2' of git://github.com/marinaglancy/moodle into MOODLE_311_STABLE 2021-04-21 14:56:54 +08:00
abgreeve
dfda661753 Merge branch '311_MDL-71174' of git://github.com/danmarsden/moodle into MOODLE_311_STABLE 2021-04-21 11:02:13 +08:00
Marina Glancy
444a4a8c3e MDL-71017 oath2: configuration check fix and return types 2021-04-20 12:08:19 +02:00
David Matamoros
d73cd7c778 MDL-70902 libraries: upgrade to version 6.4.1 of TCPDF 2021-04-20 12:00:40 +02:00
David Matamoros
fc02628620 MDL-71017 tool_oauth2: Small fixes on Oauth 2 services UI and tests 2021-04-20 10:52:35 +02:00
Marina Glancy
720d74ebeb MDL-71017 oauth2: configure some oauth2 services for login only 2021-04-20 10:52:32 +02:00
Jun Pataleta
e3bd87cae7 Merge branch 'MDL-71364_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-04-20 09:24:44 +08:00
Víctor Déniz
3de3ebc4f3 Merge branch 'MDL-71087-311' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_311_STABLE 2021-04-19 23:44:38 +01:00
Eloy Lafuente (stronk7)
5e0772ed8b Merge branch 'MDL-69256-311' of git://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2021-04-20 00:04:56 +02:00
Víctor Déniz
42a4fea40c Merge branch 'MDL-71118-311' of git://github.com/lucaboesch/moodle into MOODLE_311_STABLE 2021-04-19 19:44:08 +01:00
Sara Arjona
5a2ae7ecde Merge branch 'MDL-66475-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-04-19 09:49:15 +02:00
Andrew Nicols
1e90af329d Merge branch 'MDL-71012-311' of https://github.com/jessansell/moodle into MOODLE_311_STABLE 2021-04-19 08:49:06 +08:00
Eloy Lafuente (stronk7)
b98005ec2a Merge branch 'MDL-71031_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-04-18 17:08:51 +02:00
Eloy Lafuente (stronk7)
51a5d523a1 MDL-71031 external: Minor tweaks towards coding style and external rules
- Some small namespace/use/MOODLE_INTERNAL/requires reorganization.
- Move file phpdocs to class phpdocs.
- Move external method names to be new "execute" default ones.
- Move unit tests to matching core_grades\external namespace.
- Add missing clean_returnvalue() calls.
2021-04-18 11:53:09 +02:00
Peter Burnett
74a86a9880 MDL-71031 webservices: Extended gradecategory creation API
This adds a new webservice that creates gradecategories as a batch,
and deprecates the old single creation call, which is superseded.
It also patches a few small issues in the single WS, for any integrations
currently relying on that webservice.
2021-04-18 11:53:03 +02:00
Eloy Lafuente (stronk7)
b086645bd7 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.
2021-04-17 12:32:35 +02:00
Luca Bösch
c5446c9cc7 MDL-71118 core: Add grade (verb) string.
AMOS BEGIN
 CPY [grade,core],[gradenoun,core]
 CPY [grade,core],[gradeverb,core]
AMOS END
2021-04-17 11:45:57 +02:00
Eloy Lafuente (stronk7)
8b9717935c Merge branch 'MDL-70099-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-04-17 09:40:28 +02:00
Jake Dallimore
a7061af4fb Merge branch 'MDL-71342-311-2' of git://github.com/junpataleta/moodle into MOODLE_311_STABLE 2021-04-16 08:06:22 +01:00
Andrew Nicols
6d6a57dda9 Merge branch 'MDL-71186-m311' of https://github.com/clransom/moodle into MOODLE_311_STABLE 2021-04-16 08:06:22 +01:00
Víctor Déniz
9976bacec2 Merge branch 'MDL-69331-311' of git://github.com/sarjona/moodle into MOODLE_311_STABLE 2021-04-16 08:06:21 +01:00
Sara Arjona
4fcc06b43e Merge branch 'MDL-70269_311' of https://github.com/timhunt/moodle into MOODLE_311_STABLE 2021-04-16 08:06:21 +01:00
Jun Pataleta
91170558ac MDL-71342 mod: Conditionally display activity info
* The activity information output component is still being displayed
even in the case when the activity does not have dates to show and
completion tracking is not enabled.
This also causes a horizontal line to be rendered in activity view pages
below the activity heading which does not serve much purpose when
there's no activity information to be shown.
The activity information output component should only be displayed
if there's completion information to show or if there are activty dates
to show. Otherwise, there's no need to render it.
2021-04-15 23:10:42 +08:00
Amaia Anabitarte
e58d63f078 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.
2021-04-15 16:57:23 +02:00
Katie Ransom
b4fdc7c1b0 MDL-71186 core_user: show custom user fields in group management screens 2021-04-15 15:30:54 +01:00
Sara Arjona
8a81d74244 MDL-69331 core_contentbank: Hide disabled H5P content-types
If a H5P content-type is disabled:
- The content bank won't display existing contents having it as a
main library.
- The content bank won't allow to create new contents using it.
2021-04-15 09:32:58 +02:00
Sara Arjona
dc77f13dab MDL-69331 core_h5p: Add enabled field to libraries
The "enabled" field has been added to the H5P libraries to let
admins decide whether a library should be used or not in the site.
2021-04-15 09:31:36 +02:00
Jake Dallimore
946d0ea0cf Merge branch 'MDL-70649-M311' of https://github.com/xuangui2018/moodle into MOODLE_311_STABLE 2021-04-15 08:39:08 +08:00
Xuan Gui
a32c076d0b MDL-70649 files: Alternative security helper
Augment all installed plugin's security helper if there is any.
Plugins function has to be defined as plugintype_pluginname_security_helper in pluginname/lib.php file.
2021-04-14 21:25:12 +10:00
Andrew Nicols
8e358c9983 Merge branch 'MDL-71169-311-execute' of git://github.com/mudrd8mz/moodle into MOODLE_311_STABLE 2021-04-14 08:35:38 +08:00
Eloy Lafuente (stronk7)
1f2fbfe331 Merge branch 'MDL-70722-311' of git://github.com/sarjona/moodle into MOODLE_311_STABLE 2021-04-13 22:39:36 +02:00
Víctor Déniz
c7e2a997a8 Merge branch 'MDL-71089-311' of git://github.com/roland04/moodle into MOODLE_311_STABLE 2021-04-13 19:40:09 +01:00
Mikel Martín
7c82ff41a3 MDL-71089 core: Add different Toast notification styling 'types' 2021-04-13 16:29:10 +02:00
Sara Arjona
933d98cd50 Merge branch 'MDL-71011_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-04-13 12:27:00 +02:00
Eloy Lafuente (stronk7)
9bd0f130ea MDL-71011 adodb: Update readme and thirdpartylibs
Small changes in readme and document the bump in xml
2021-04-12 18:50:59 +02:00
Eloy Lafuente (stronk7)
01c8cb9cda MDL-71011 php80: final private makes no sense, throwing warning
Ref: https://php.watch/versions/8.0/final-private-function#final-private

This applies #712 from upstream libraries.

Unrelated: I've also changed a occurrence of "private final"
by the correct (PSR-12) "final private" in the constructor
(the final&private combination is allowed in constructors)
in lib/classes/event/base.php, because it's the unique case
in core and phpcs was really insisting.
2021-04-12 18:50:59 +02:00
Eloy Lafuente (stronk7)
6baa6f0e25 MDL-71011 adodb: Bump to v5.21.0
Following the instructions @ readme_moodle.txt
2021-04-12 18:50:53 +02:00
Sara Arjona
840a9f43db Merge branch 'MDL-71264_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-04-12 16:40:10 +02:00