28617 Commits

Author SHA1 Message Date
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
abgreeve
8a53fe7f6b Merge branch 'MDL-28452-master' of git://github.com/bmbrands/moodle 2021-04-22 09:38:50 +08:00
Jun Pataleta
d0963c711f 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 09:48:50 +10:00
Marina Glancy
263c39ba21 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:38:46 +02:00
Bas Brands
f9e1c2587a 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:22:25 +02:00
Jun Pataleta
610b339c6e Merge branch 'MDL-71017-master-2' of git://github.com/marinaglancy/moodle 2021-04-21 14:58:06 +08:00
abgreeve
dac0c020ef Merge branch 'MDL-71174' of git://github.com/danmarsden/moodle 2021-04-21 11:01:05 +08:00
Marina Glancy
57a444d31f MDL-71017 oath2: configuration check fix and return types 2021-04-20 12:07:54 +02:00
David Matamoros
3b1de08da5 MDL-70902 libraries: upgrade to version 6.4.1 of TCPDF 2021-04-20 11:53:54 +02:00
David Matamoros
5a6f05c605 MDL-71017 tool_oauth2: Small fixes on Oauth 2 services UI and tests 2021-04-20 10:50:44 +02:00
Marina Glancy
0152fdbdff MDL-71017 oauth2: configure some oauth2 services for login only 2021-04-20 10:50:40 +02:00
Jun Pataleta
0d92e1bc11 Merge branch 'MDL-71364' of https://github.com/stronk7/moodle 2021-04-20 09:24:52 +08:00
Víctor Déniz
ab6f97292d Merge branch 'MDL-71087-master' of https://github.com/NashTechOpenUniversity/moodle 2021-04-19 23:44:06 +01:00
Eloy Lafuente (stronk7)
ea2fd1ace6 Merge branch 'MDL-69256-master' of git://github.com/andrewnicols/moodle 2021-04-20 00:04:48 +02:00
Víctor Déniz
f7dd6b26b7 Merge branch 'MDL-71118-master' of git://github.com/lucaboesch/moodle 2021-04-19 19:43:32 +01:00
Sara Arjona
545996577e Merge branch 'MDL-66475' of git://github.com/paulholden/moodle 2021-04-19 09:49:09 +02:00
Andrew Nicols
d649ec2837 Merge branch 'MDL_71012_master' of https://github.com/jessansell/moodle 2021-04-19 08:47:50 +08:00
Eloy Lafuente (stronk7)
64ae826093 Merge branch 'MDL-71031' of https://github.com/stronk7/moodle 2021-04-18 17:08:43 +02:00
Eloy Lafuente (stronk7)
be927f0327 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:52:14 +02:00
Peter Burnett
71ffad7ea6 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:52:07 +02:00
Eloy Lafuente (stronk7)
10a4932e25 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:31:23 +02:00
Luca Bösch
aee27d0a9b 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:46:09 +02:00
Eloy Lafuente (stronk7)
b60fbb9cd4 Merge branch 'MDL-70099' of git://github.com/paulholden/moodle 2021-04-17 09:40:19 +02:00
Jake Dallimore
829b8b70c8 Merge branch 'MDL-71342-master-2' of git://github.com/junpataleta/moodle 2021-04-16 07:57:01 +01:00
Andrew Nicols
1528661e68 Merge branch 'MDL-71186-master' of https://github.com/clransom/moodle 2021-04-16 07:57:01 +01:00
Víctor Déniz
95e9ccea79 Merge branch 'MDL-69331-master' of git://github.com/sarjona/moodle 2021-04-16 07:57:01 +01:00
Sara Arjona
0d29672cd7 Merge branch 'MDL-70269' of https://github.com/timhunt/moodle 2021-04-16 07:57:00 +01:00
Jun Pataleta
daa9992215 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:03 +08:00
Amaia Anabitarte
9798fb06c8 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
d916cd77ca MDL-71186 core_user: show custom user fields in group management screens 2021-04-15 15:28:17 +01:00
Sara Arjona
39fa45e299 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:16:32 +02:00
Sara Arjona
d3d3b3bdc0 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:03:56 +02:00
Jake Dallimore
c8a8dc6a52 Merge branch 'MDL-70649-alternative-security-helper' of https://github.com/xuangui2018/moodle 2021-04-15 08:38:48 +08:00
Xuan Gui
ed046b8eb1 MDL-70649 files: Alternative security helper
Augument 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:21:35 +10:00
Jake Dallimore
195abe8ab1 Merge branch 'MDL-70207-master' of git://github.com/peterRd/moodle 2021-04-14 09:07:21 +08:00
Andrew Nicols
c10791cab9 Merge branch 'MDL-71169-master-execute' of git://github.com/mudrd8mz/moodle 2021-04-14 08:35:07 +08:00
Eloy Lafuente (stronk7)
392fc8ead0 Merge branch 'MDL-70722-master' of git://github.com/sarjona/moodle 2021-04-13 22:39:27 +02:00
Víctor Déniz
cfcad45150 Merge branch 'MDL-71089-master' of git://github.com/roland04/moodle 2021-04-13 19:45:03 +01:00
Mikel Martín
5fade7fcc6 MDL-71089 core: Add different Toast notification styling 'types' 2021-04-13 16:28:35 +02:00
Sara Arjona
fd2740d592 Merge branch 'MDL-71011' of https://github.com/stronk7/moodle 2021-04-13 12:26:57 +02:00
Eloy Lafuente (stronk7)
297156a72a MDL-71011 adodb: Update readme and thirdpartylibs
Small changes in readme and document the bump in xml
2021-04-12 18:49:38 +02:00
Eloy Lafuente (stronk7)
59a8b7182b 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:49:38 +02:00
Eloy Lafuente (stronk7)
91969d1e04 MDL-71011 adodb: Bump to v5.21.0
Following the instructions @ readme_moodle.txt
2021-04-12 18:49:30 +02:00
Sara Arjona
a521c2d985 Merge branch 'MDL-71264' of https://github.com/stronk7/moodle 2021-04-12 16:40:04 +02:00
Adrian Greeve
d24df2a201 Merge branch 'MDL-70821-master-5' of git://github.com/junpataleta/moodle 2021-04-12 14:45:59 +08:00
Jun Pataleta
32b76b34d8 MDL-70821 course: Remove old manual completion toggling
Remove the old ways of toggling manual completion via completion.js
and the ajax part of togglecompletion.php.
2021-04-12 11:41:37 +08:00