1942 Commits

Author SHA1 Message Date
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
Jun Pataleta
ea40779753
Merge branch 'MDL-78896-master-enfix' of https://github.com/vmdef/moodle 2023-08-08 15:29:03 +08:00
Helen Foster
34a8e644f2 MDL-78896 lang: Import fixed English strings (en_fix) 2023-08-07 11:21:41 +01:00
Andrew Nicols
56260354b1
MDL-77174 filemanager: Switch from YUI dialogue to utility modal 2023-07-31 10:57:09 +08:00
Paul Holden
2974f5aeb6
MDL-50272 repository: deprecate base class get_file_size method. 2023-07-04 16:54:28 +01:00
David Woloszyn
802ff3e2e3 MDL-75913 behat: Use alternatives to Atto in tests 2023-06-19 16:35:46 +10:00
Ilya Tregubov
9611669cae
Merge branch 'MDL-70152-master' of https://github.com/andelacruz/moodle 2023-06-14 13:24:06 +08:00
Andrew Nicols
8d1a2c960a
MDL-78019 core: Whitespace fixes 2023-06-01 10:20:06 +08:00
Angelia Dela Cruz
c95ef35b60 MDL-70152 behat: Forum behat generators use UI
Behat cleanup and optimisation
2023-05-29 10:32:20 +08:00
Anupama Sarjoshi
b4b9248b78 MDL-78019 core: Logs to record user file deleted from draft area 2023-05-26 17:45:36 +01:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08:00
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Sara Arjona
bdc106e840 Merge branch 'MDL-76859-master' of https://github.com/sarjona/moodle 2023-04-13 16:24:20 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Petr Skoda
43b56a90d9 MDL-76859 h5p: Fix behat failures
- Only resize if the H5P EmbedCommunicator is defined (otherwise, it was causing a
JS error)
- An unnecessary image has been removed from the greeting-card.h5p fixture package.
That way, the text will always be displayed (even if the iframe is still not
resized). Instead of replacing the original greeting-card-887.h5p file, I've
renamed it to greeting-card.h5p, to remove these ugly and unnecessary numbers
at the end of the file name).
2023-04-12 12:26:23 +02:00
Ilya Tregubov
5b8c1ffd84 Merge branch 'MDL-77406' of https://github.com/AnupamaSarjoshi/moodle 2023-03-31 09:47:23 +08:00
Andrew Nicols
cd48ee93c3 MDL-76866 repository_contentbank: Mark step as using atto editor 2023-03-29 20:33:47 +08:00