1919 Commits

Author SHA1 Message Date
Mihail Geshoski
5f4bdefc54 MDL-61768 repository_googledocs: Deprecate unused methods
Deprecates methods from the repository_googledocs class which are
no longer used.
2021-04-15 12:40:32 +08:00
Mihail Geshoski
6528181e72 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:40:32 +08:00
Mihail Geshoski
54a850640d 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:40:32 +08:00
Mihail Geshoski
241e778ca7 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 11:06:11 +08:00
Tim Hunt
385ce8a5e1 MDL-71313 repositories: warn if get_instances context is wrong type 2021-04-12 20:30:43 +01:00
Eloy Lafuente (stronk7)
cfba0366db Merge branch 'MDL-70893-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:23:26 +01:00
Eloy Lafuente (stronk7)
81407f18ec 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:04:31 +01:00
Marina Glancy
465d1ef495 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:24:52 +01:00
Andrew Nicols
a84a55bd45 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:33:06 +08:00
Marina Glancy
440073ff20 MDL-64554 user: make private files editor modal/ajax form 2021-02-17 18:06:57 +01:00
Marina Glancy
0eada7a5f9 MDL-70893 various: optional function arguments must be in the end 2021-02-15 16:53:37 +01:00
Andrew Nicols
3b7a564e17 Merge branch 'MDL-70429-master' of git://github.com/sarjona/moodle 2021-02-08 12:02:11 +08:00
Sara Arjona
d80613f9de 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:08 +01:00
Andrew Nicols
bf6983107f Merge branch 'MDL-70048-master' of git://github.com/peterRd/moodle 2021-01-28 08:02:58 +08:00
Peter Dias
663c84ace6 MDL-70048 dropbox: Augmented unit tests to account for additional params 2021-01-28 07:31:07 +08:00
Peter Dias
44664d35e5 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:31:07 +08:00
Eloy Lafuente (stronk7)
77342b96fc 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:11:19 +01:00
Jake Dallimore
6fcd084f68 Merge branch 'MDL-70041-master' of git://github.com/mihailges/moodle 2020-10-29 11:48:58 +08:00
Mihail Geshoski
81d0642b6c MDL-70041 filepicker: Make sure the user has a recently used license 2020-10-28 11:48:33 +08:00
David Mudrák
e576fef1fa MDL-69998 lang: Fix reworded strings in Behat test scenarios 2020-10-27 11:32:10 +01:00
Helen Foster
dd7a1d60e2 MDL-69998 lang: Import fixed English strings (en_fix) 2020-10-27 11:32:10 +01:00
Eloy Lafuente (stronk7)
3a5641cb74 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:00 +02:00
Eloy Lafuente (stronk7)
f94195c320 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:45:59 +02:00
Eloy Lafuente (stronk7)
f6711bb394 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:45:59 +02:00
Sara Arjona
d09980a8b0 Merge branch 'MDL-69897' of https://github.com/paulholden/moodle into master 2020-10-19 18:14:45 +02:00
Paul Holden
9cbce6858f MDL-69897 repository: add heading to delete file modal. 2020-10-08 20:28:40 +01:00
Jake Dallimore
255a910c92 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:19:29 +08:00
Paul Holden
582bb534c9 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:44 +01:00
Mihail Geshoski
cb72d845f5 MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:54:26 +02:00
Thong Bui
fb75fd0396 MDL-68344 filepicker: File Picker focus lost on upload 2020-09-04 09:30:59 +07:00
Nathan Nguyen
8bbee0c8f0 MDL-33981 repository_equella: support internal copy 2020-08-24 09:54:34 +10:00
Eloy Lafuente (stronk7)
fbb0767536 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in master, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-18 00:47:15 +02: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
Mihail Geshoski
f3fc0266ca MDL-67813 core_filepicker: Handle ElementNotFoundException in behat step
Catches and handles ElementNotFoundException if thrown in the
i_should_see_elements_in_filepicker_repository() behat step in order to
enable the assertion that no elements exist in the repository content
area
2020-05-28 12:06:31 +08:00