1958 Commits

Author SHA1 Message Date
Stefan Hanauska
6586175de0 MDL-83377 repository_local: Missing options for searching 2024-12-16 06:26:54 +01:00
Andrew Nicols
55126be4ad
MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
Andrew Nicols
c6942c9bb7
MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-18 10:24:55 +08:00
Tim Hunt
db03f2a58e MDL-80689 filepicker: better reporting of incorrect file type
Before this change, file type errors were reported like system errors. Now,
they are reported in a plain dialoue, which is more like how it works for
drag-drop upload.

Also, before this, after an upload errors, you were left with a blank
filepicker dialogue. Now, the upload form is redisplayed.
2024-10-31 11:39:16 +00:00
Andrew Nicols
564de9d4a7
MDL-81308 core: Use a helper for consecutive invocation counts 2024-10-23 14:17:37 +08:00
Andrew Nicols
da7c5d98ec
MDL-81308 core: Update tests to not use withConsecutive 2024-10-23 14:17:36 +08:00
Tim Hunt
adf336cbf2 MDL-82177 file upload: default to path '/'when things go wrong
This 'fix' is basically a work-around, but one that is already used in
some places. Now it is used in all similar places.

Exactly what causes the current file path in a file manager to become
unset is still unclear to me, but it seems to be an obscure race
condition that is very hard to reproduce.

However, when it happens, currently we are effectively defaulting to
path '/undefined/'. Using '/' is never worse, and is infinitely better
in the case where the filepicker does not allow folders to be used
(which includes important cases like essay questions in a quiz, which
some people use for exams!). In that case, falling back to non-top-level
path leads to dataloss.

Also, this is all historic JavaScript which will get replaced in the
grand de-YUI-fication, so I think a pragmatic fix is justified here.
2024-07-30 15:07:02 +01:00
Andrew Nicols
32f1542b5e
MDL-82373 behat: Stop calling ensure_node_is_visible before click
W3C WebDriver Element::Click, Element::Clear, and Element::SendKeys all
state that the WebDriver implementation (chromedriver, geckodriver,
edgedriver) should scroll the element into view if it is not already
visible.

It is wrong for us to check if the element is visible or not before
calling these as it may not be but will during the click/clear/type
event.
2024-07-17 13:28:55 +08:00
Eloy Lafuente (stronk7)
091b458c52
MDL-81522 phpunit: Add missing void return type to all tests #2
This commit includes more changes, all them also adding the :void
return type to unit tests missing them.

The difference is that all these changes, while also detected
perfectly by the moodle.PHPUnit.TestReturnType sniff, were not
auto-fixed (like the previous commit ones), because all them
do include some "return" statement and, for safety, we don't
fix them.

All the cases have been visually inspected and confirmed that
the existing "return" statements always belong to anon
functions within the test body and not the test own return statement.
2024-06-11 12:18:05 +02:00
Eloy Lafuente (stronk7)
1093256560
MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
2024-06-11 12:18:04 +02:00
David Mudrák
61c5863b1a
MDL-81982 lang: Fix strings order
Fixes the strings order in files where CI has detected the wrong order
of modified strings.
2024-06-05 10:25:06 +08:00
Helen Foster
b12afc89e4
MDL-81982 lang: Import fixed English strings (en_fix) 2024-06-05 10:25:06 +08:00
Jun Pataleta
8b976e77ce MDL-81616 upgrade: add the 4.4.0 separation line to all upgrade scripts 2024-04-23 15:24:02 +10:00
Huong Nguyen
8e682899cc
Merge branch 'MDL-81549-main' of https://github.com/junpataleta/moodle 2024-04-17 10:33:28 +07:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Marina Glancy
cad4c4a9ab MDL-81569 repository_equela: do not hardcode list of roles in tests 2024-04-16 15:13:43 +01:00
Jake Dallimore
e5fca6909e MDL-81060 core: fix incorrect userquota usage in zip_packer
This change reverts much of MDL-74641, removing the erroneous userquota
checks from zip_packer. Now, during extraction, the zip_packer will exit
with an error status when it encounters a file which is larger than its
advertised size, and NOT when it determines the size of the extracted
files have exceeded the userquota (which only applies to private files
and which was used incorrectly here). It also reverts changes to the
draftfiles_ajax.php file, restoring the original (pre-MDL-74641) error
handling.
2024-04-08 09:08:24 +07:00
Ilya Tregubov
fedeefa784 Merge branch 'MDL-81406' of https://github.com/paulholden/moodle 2024-04-05 09:27:04 +08:00
Huong Nguyen
dfc198c928
Merge branch 'MDL-77838' of https://github.com/paulholden/moodle 2024-04-03 08:52:03 +07:00
Paul Holden
5c8e53478a
MDL-81406 repository_equella: correctly obtain/format profile fields. 2024-04-02 16:06:58 +01:00
Guillaume Barat
05c23b4c70 MDL-79959 repository: Add custom field picker for SSO identification. 2024-03-27 13:07:46 +10:00
Paul Holden
8023990caf
MDL-77838 repository: preserve empty dirs in download if selected. 2024-03-22 16:21:18 +00:00
Paul Holden
011619dbd3
MDL-71734 lang: final removal of deprecated 400 strings. 2024-03-21 09:44:15 +00:00
Eloy Lafuente (stronk7)
361dfe8145
MDL-75952 general: Since php81, refection->setAccessible() is no-op
Refereces:
- https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
- https://www.php.net/manual/en/reflectionproperty.setaccessible.php
- https://www.php.net/manual/en/reflectionmethod.setaccessible.php

As of PHP 8.1.0, calling this method has no effect; all methods are
invokable by default. So, let's remove all uses from core, they are
no-op.
2024-03-10 21:15:00 +01:00
Eloy Lafuente (stronk7)
29a541724f
MDL-65292 style: Fix all the function declaration ordering
This has been generated running the following Sniff,
part of the Moodle's CodeSniffer standard:
- PSR2.Methods.MethodDeclaration

It just ensures all the function declarations have
the correct order for:
- abstract and final.
- visibility (public, protected, private).
- static.

So, all the lines modified by this commit are function declarations
and the only changes are in the positions of those keywords.
2024-02-28 23:47:47 +01:00
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
meirzamoodle
9ba1423359 MDL-74641 repository: Handles increase bytes while extracting zip files
We should not rely solely on the provided size information.
Therefore the system needs to recalculate the size of each file in the zip file,
whether small or big.

The changes also cover the filemanager.js file if an error appears.
2024-02-07 02:34:19 +01:00
Huong Nguyen
cc02940ddb Merge branch 'MDL-73010' of https://github.com/paulholden/moodle 2024-02-01 10:49:28 +07:00
Ilya Tregubov
fdf5f5bc0a Merge branch 'MDL-80202' of https://github.com/paulholden/moodle 2024-02-01 10:38:47 +08:00
Ilya Tregubov
59cac76dc1 Merge branch 'MDL-79927' of https://github.com/paulholden/moodle 2024-01-25 09:53:21 +08:00
Paul Holden
cfd51dd63c
MDL-80202 repository_local: null check when recursing child nodes. 2024-01-22 10:19:39 +00:00
Ferran Recio
f4adbc8a11 MDL-79029 behat: replace deprecated behat steps 2024-01-22 11:12:28 +01:00
Paul Holden
49230c1938
MDL-73010 repository_filesystem: fix directory read comparison.
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2024-01-18 10:02:14 +00:00
Paul Holden
24f59a7d32
MDL-79927 files: scope toggleall checkboxes per filemanager instance.
Ensures that when multiple exist on the same page, each operates
independently of the others.
2024-01-04 13:22:33 +00:00
Huong Nguyen
9493b23e8d Merge branch 'MDL-74466' of https://github.com/paulholden/moodle 2023-12-13 09:28:24 +07:00
David Woloszyn
64a13123f3 MDL-79759 repository_url: Limit css imports and remove fragments
There are checks to urls that attempt to limit recurrsion when
parse_file is called. This is problematic for css import urls that
can call an indefinite amount of nested import urls. An import limit
has been introduced to address this. Fragments have also been removed.
2023-12-06 03:54:20 +01:00
Paul Holden
70323bc04f
MDL-74466 repository: avoid passing around sesskey when not required. 2023-12-04 09:22:27 +00:00
Andrew Nicols
525212f2d2
MDL-78496 core: Address phpcs issues with upgrade.php files 2023-11-19 21:20:53 +08:00
Andrew Nicols
545b36cd4a
MDL-78496 upgrade: remove all the < 4.1.0 upgrade steps
Also includes an upgrade step to prevent upgrading from any
version < 2021112802 (v4.1.0) as anti-cheating measure.
2023-11-17 23:25:36 +08:00
Mark Johnson
9af16bf2bd MDL-79617 repository_upload: Close session early in upload process 2023-10-23 15:31:48 +01:00
Jun Pataleta
9beff03a96
MDL-79626 upgrade: add the 4.3.0 separation line to all upgrade scripts 2023-10-10 10:44:17 +08:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
Huong Nguyen
08a669cba0
Merge branch 'MDL-79480' of https://github.com/paulholden/moodle 2023-09-27 11:10:35 +07:00
Paul Holden
c16587f52f
MDL-79480 repository_wikimedia: drop deprecated image size parameter. 2023-09-26 16:21:43 +01:00
Sara Arjona
cc9430929d
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:30:19 +02:00
Sara Arjona
ff844ab7bd
MDL-78993 theme: Remove $CFG->svgicons
The $CFG->svgicons setting was introduced in Moodle 2.4 due to incomplete
SVG support in certain web browsers.
The landscape has evolved significantly since then, and all modern browsers
now handle SVG files correctly.
The $CFG->svgicons settings has been removed and the supports_svg() method
has been updated with currently supported browsers (IE support was removed
in Moodle 3.10).
2023-09-12 15:28:03 +02:00
Jun Pataleta
be35034f1c
Merge branch 'MDL-76974' of https://github.com/paulholden/moodle 2023-08-28 17:03:27 +08:00
Sara Arjona
026f377993
MDL-78884 theme: Update references to $icon.png
The *.png files in pix/f folder have been removed, so their references
need to be updated to use the proper SVG file or a different icon, as
happened with logo_uri for oauth2 services.
2023-08-23 07:33:58 +02:00
Sara Arjona
7430208d56
MDL-78884 files: Deprecate size parameter for icons
The parameter $size of the following functions has been deprecated and is not used any more:
  - file_extension_icon
  - file_file_icon
  - file_folder_icon
  - file_mimetype_icon
  - mimeinfo_from_type
  - url_guess_icon

That way, the sized icons (xxxxxxx-yyy.png) can be removed and replaced by SVG, to make it easier
to keep them updated because once they are replaced, there will only be one single file for each
MIME icon.
2023-08-23 07:30:16 +02:00
Paul Holden
b30245b3e2
MDL-76974 javascript: convert remaining uses of old preferences API.
Implement component preference definition callbacks, update JS code
to use the `core_user/repository` module instead of the now deprecated
API.
2023-08-22 14:43:34 +01:00