Commit graph

1820 commits

Author SHA1 Message Date
Marina Glancy
720d74ebeb MDL-71017 oauth2: configure some oauth2 services for login only 2021-04-20 10:52:32 +02: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
Mihail Geshoski
17bf8a2ef3 MDL-61768 repository_googledocs: Deprecate unused methods
Deprecates methods from the repository_googledocs class which are
no longer used.
2021-04-15 12:43:00 +08:00
Mihail Geshoski
598a072922 MDL-61768 repository_googledocs: Add unit tests
Adds unit tests for the newly introduced methods related to the content
browsing and searching functionallity across drives.
2021-04-15 12:43:00 +08:00
Mihail Geshoski
bded723306 MDL-61768 repository_googledocs: Support shared drives
Enables the Google Drive repository to support browsing and searching
for content from the existing shared drives.
2021-04-15 12:42:58 +08:00
Mihail Geshoski
2950a9a024 MDL-61768 repository_googledocs: Rest API function to list shared drives
Adds a new rest API function in the googledocs repository which would
return the existing shared drives.
2021-04-15 12:41:41 +08:00
Eloy Lafuente (stronk7)
6f2b5817d6 Merge branch 'MDL-70893-311' of git://github.com/marinaglancy/moodle into MOODLE_311_STABLE 2021-03-18 00:23:36 +01:00
Eloy Lafuente (stronk7)
2d693cda7a MDL-71036 phpunit: Mock->setMethods() silently deprecated
The current ->setMethods() has been silently (won't emit any
warning) in PHPUnit 9. And will stop working (current plans)
in PHPUnit 10.

Basically the now deprecated method has been split into:

- onlyMethods(): To point to existing methods in the mocked artifact.
- addMethods(): To point to non existing (yet) methods in the mocked
  artifact.

In practice that means that all our current setMethods() calls can be
converted to onlyMethods() (existing) and done. The addMethods() is
mostly useful on development phases, not final testing.

Finally note that <null> isn't accepted anymore as parameter to
double all the methods. Instead empty array [] must be used.

Link: https://github.com/sebastianbergmann/phpunit/issues/3770
2021-03-11 23:07:31 +01:00
Marina Glancy
f2adb56be0 MDL-70921 repository: filter function can not accept argument by ref
PHP8.0 shows error that filter function accepts value by reference
The nested filtering was never working but also this function was never called on a tree with sub-levels,
so this logic is now removed
2021-02-25 18:25:05 +01:00
Andrew Nicols
ba42ad4aa1 MDL-64554 user: Fix use of Private files page on classic
The "Private files" link does not exist in the site navigation when
using the classic theme, so it is not possible to test the dedicated
page via Behat at this time.
2021-02-19 09:34:40 +08:00
Marina Glancy
4868d7b93e MDL-64554 user: make private files editor modal/ajax form 2021-02-17 18:09:42 +01:00
Marina Glancy
d2d0cffd1d MDL-70893 various: optional function arguments must be in the end 2021-02-15 16:54:01 +01:00
Andrew Nicols
ee74321fa5 Merge branch 'MDL-70429-311' of git://github.com/sarjona/moodle into MOODLE_311_STABLE 2021-02-08 12:27:31 +08:00
Sara Arjona
4a29cae1fb MDL-70429 repository_contentbank: set default returntype
Credits for Alexander Bias, for sharing the patch!

The content bank was designed for making easier to reuse content.
So "Link to the file" should be the default option when using the
contentbank repository, in order to let teachers modify their
content in the content bank and update automatically it everywhere
is used.
2021-01-28 16:45:50 +01:00
Peter Dias
384d1874ac MDL-70048 dropbox: Augmented unit tests to account for additional params 2021-01-28 07:32:20 +08:00
Peter Dias
0cc373fca6 MDL-70048 dropbox: Update the dropbox search URL.
- Update fetch_dropbox_data to allow different result nodes and version
- Update search to the new URL with new params
- Update the get entities function to account for the change in structure.
2021-01-28 07:32:20 +08:00
Eloy Lafuente (stronk7)
5aed7f4217 MDL-69308 upgrade: remove all the < 3.6.0 upgrade steps
This just deletes all the upgrade steps previous to 3.6.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2018120300 (v3.6.0) as anti-cheating measure.

Note that in this case, there wasn't any case of upgradelib
functions being used, hence we haven't to deprecate/remove
anything in codebase. When there is such a need, that is done
in separate commits (one for each function) and documented here.

See MDL-65809 commits for an example removing/deprecating a
good number of functions.
2021-01-13 19:28:39 +01:00
Eloy Lafuente (stronk7)
4aa83d92bf MDL-70146 upgrade: add 3.10.0 separation line to all upgrade scripts 2020-11-07 23:26:09 +01:00
Eloy Lafuente (stronk7)
b0a1b4ce8b MDL-70089 versions: bump all versions and requires near release
version = 2020110900 release version
requires= 2020110300 current beta+ (week6roll1) version

Note that, because we are under parallel development period,
this is being done in the branch that is going to be released
(MOODLE_310_STABLE already existing) for Moodle 3.10.0 and
not in master, that is the one getting the bump under normal
(non-parallel) periods.
2020-11-03 19:34:52 +01:00
Jake Dallimore
859578b0d5 Merge branch 'MDL-70041-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-10-29 11:49:20 +08:00
Mihail Geshoski
35364e22fc MDL-70041 filepicker: Make sure the user has a recently used license 2020-10-28 12:06:34 +08:00
David Mudrák
05679468c5 MDL-69998 lang: Fix reworded strings in Behat test scenarios 2020-10-27 11:20:03 +01:00
Helen Foster
0a64b2ed99 MDL-69998 lang: Import fixed English strings (en_fix) 2020-10-27 11:20:03 +01:00
Eloy Lafuente (stronk7)
46606b3ddd MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7)
a6674bf8a4 MDL-67673 phpunit: Remove deprecated assertInternalType()
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

assertInternalType() is deprecated and will be removed in
PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(),
assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(),
assertIsResource(), assertIsString(), assertIsScalar(),
assertIsCallable(), or assertIsIterable() instead.
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7)
d81a94807b MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:46:04 +02:00
Sara Arjona
33c7881448 Merge branch 'MDL-69897-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-19 18:14:54 +02:00
Paul Holden
31efbf2e0e MDL-69897 repository: add heading to delete file modal. 2020-10-08 20:29:48 +01:00
Jake Dallimore
57bb99edd4 MDL-59510 core_oauth2: autorefresh google drive, nextcloud and onedrive
Request additional offline access, allowing the repository to sign in
automatically each time, including across different user sessions, until
either the refresh token is invalidated or the user logs out of the
repository.
2020-10-05 09:17:14 +08:00
Paul Holden
833ab0ea9f MDL-37802 repository: return error if unzipping files fails.
For instance, when a user tried to unzip a password protected zip
archive using the file manager.
2020-09-25 09:33:54 +01:00
Mihail Geshoski
e2a11dc2aa MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:54:33 +02:00
Thong Bui
2301f9bfaa MDL-68344 filepicker: File Picker focus lost on upload 2020-09-08 08:45:09 +02:00
Nathan Nguyen
f809bca508 MDL-33981 repository_equella: support internal copy 2020-08-31 10:39:49 +08:00
Eloy Lafuente (stronk7)
b764343e5a MDL-69044 upgrade: add 3.9.0 separation line to all upgrade scripts 2020-06-14 13:08:09 +02:00
Eloy Lafuente (stronk7)
39885e35f4 Merge branch 'MDL-68954-master' of git://github.com/mihailges/moodle 2020-06-10 23:53:35 +02:00
Jake Dallimore
337e2e2b23 Merge branch 'MDL-68973' of https://github.com/stronk7/moodle 2020-06-10 16:13:57 +08:00
Helen Foster
1ab405f4a2 MDL-68972 lang: Import fixed English strings (en_fix) 2020-06-09 20:56:34 +02:00
Eloy Lafuente (stronk7)
115cc0214f MDL-68973 versions: bump all versions and requires near release
version = 2020061500 release version
requires= 2020060900 current rc1 (week7roll1) version
2020-06-09 16:23:09 +02:00
Mihail Geshoski
e8017491d1 MDL-68954 repository_flickr_public: Return only photo media 2020-06-09 12:36:59 +08:00
Mihail Geshoski
e58db3a8fd MDL-68954 repository_flickr_public: Handle when photo cannot be found 2020-06-09 12:34:25 +08:00
Ferran Recio
346c51690c MDL-68873 core_h5p: fix editor H5P file update 2020-06-08 10:44:23 +08:00
Helen Foster
98c882132d MDL-68888 lang: Import fixed English strings (en_fix)
Significant string changes: userdata, userdata_help, keptroles,
keptroles_help in core_backup - Clearer wording about how the settings
work.
2020-06-05 08:33:55 +02:00
Adrian Greeve
ce67b300a4 Merge branch 'MDL-68723-master' of git://github.com/mihailges/moodle 2020-06-02 08:38:35 +08:00
Jun Pataleta
96dc92f099 Merge branch 'MDL-68353-master' of git://github.com/rezaies/moodle 2020-05-29 22:26:03 +08:00
Shamim Rezaie
dce43c7677 MDL-68353 test: Update existing tests to work with file elements 2020-05-29 14:50:35 +10:00
Shamim Rezaie
58994fe8bb MDL-68353 test: Update filemanager/filepicker xpath selector 2020-05-29 14:50:35 +10:00
Sara Arjona
936bc084fd Merge branch 'MDL-68854-master' of git://github.com/vmdef/moodle 2020-05-28 18:11:35 +02:00
Víctor Déniz Falcón
d4af0f4a74 MDL-68854 repository_contentbank: add size to content nodes 2020-05-28 13:30:38 +01:00
Víctor Déniz Falcón
db1fb23ce2 Merge branch 'MDL-67813-master-1' of git://github.com/mihailges/moodle 2020-05-28 13:00:16 +01:00
Mihail Geshoski
5cf21a3c27 MDL-67813 repository_contentbank: Add behat tests 2020-05-28 12:06:32 +08:00