500 Commits

Author SHA1 Message Date
Shamim Rezaie
9c11ceac1f MDL-69028 repository: Put a rate limit on draft file uploads 2021-05-04 17:23:11 +02: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
Sara Arjona
134c45e9ee Merge branch 'MDL-69355-master-filebuffer' of git://github.com/mudrd8mz/moodle into master 2020-10-05 18:33:34 +02:00
David Mudrák
801ee23427 MDL-69050 lang: Improve the wording of the comments
Stop using the terms whitelist/blacklist when used to allow/deny things.
2020-09-24 19:41:58 +02:00
David Mudrák
dbaeeeb0ec MDL-69050 lang: Fix variables and methods names in curl_security_helper
The code has been using terms that were found exclusive and potentially
derogatory. Fixing the terms and making the variables and methods
consistent with the related admin settings.
2020-09-24 19:41:57 +02:00
David Mudrák
af30f18a19 MDL-69355 file: Do not attempt to set headers after output started
It was found out that in certain situations there may be some content
in to output handlers buffers. Let's allow that to happen given that:

* default handler's buffer is not sent as a part of the file and an
  error is reported into the server log.
* other handlers' buffer is sent with the assumption that it is required
  for the correct serving of the file.
2020-09-17 17:37:43 +02:00
Sara Arjona
c6bd7bd0ab MDL-61215 core_files: add new optimised_image group
Currently, PHP getimagesize method doesn't support SVG images.
As some features, such as badges, processs and optimise the images
before using them, a new filetype group has been created to exclude
SVG from there: optimised_image.
SVG can't be removed from web_image because then users won't be
able to add SVG images to their courses using labels, pages...
2020-08-14 17:06:23 +02:00
Brendan Heywood
5bf5a7aaeb MDL-68342 files: Add a faster xsendfile method to avoid db lookups 2020-04-27 16:11:34 +10:00
Amaia Anabitarte
33b8ca26f9 MDL-67786 core_contentbank: New content bank contenttype plugin type
Co-authored by: Ferran Recio <ferran@moodle.com>
2020-04-15 23:45:08 +02:00
Brendan Heywood
1fef1de592 MDL-58281 files: Correctly handle missing files in readfile_accel 2019-12-30 17:18:49 +11:00
Brendan Heywood
d46dba32d4 MDL-65693 files: Honor http HEAD requests for files 2019-11-30 16:02:23 +11:00
sam marshall
225eb7b27e MDL-66679 Forms: Submit button remains disabled after file download
When you download a file directly from a Moodle form submit button,
the submit button disables when you click it, but you remain on that
page so we need to re-enable the button.

This commit causes it to re-enable once the file download finishes,
setting a temporary cookie to indicate this to the JavaScript code.

It also adds a method to disable the system on a given form by
setting data-double-submit-protection="off".
2019-10-30 16:36:28 +00:00
Brendan Heywood
d6f5fbb720 MDL-66493 filelib: readstring_accel should never use xsendfile 2019-10-24 21:30:46 +11:00
Eloy Lafuente (stronk7)
25494613f4 Merge branch 'MDL-66304' of https://github.com/golenkovm/moodle 2019-10-14 10:53:24 +02:00
Brendan Heywood
3bc082dd07 MDL-66166 core_useragent: Update MoodleBot UA and treat as web crawler 2019-09-30 23:30:20 +10:00
Mikhail Golenkov
1a15925240 MDL-66304 files: Allow xsendfile support in alternative file system. 2019-09-30 09:00:57 +10:00
Juan Leyva
418a86c660 MDL-66468 file: Return text content when using IGNORE_FILE_MERGE 2019-08-22 13:10:39 +01:00
Matteo Scaramuccia
69a1afd9b9 MDL-65686 setuplib: Fix missing round brackets 2019-05-30 22:41:37 +02:00
Juan Leyva
26e778d1b7 MDL-60680 file: Support any user id when creating tokens for files.
$includetoken parameter type has been changed. Now supports:
   boolean: False indicates to not include the token, true indicates to generate a token for the current user ($USER).
   integer: Indicates to generate a token for the user whose id is the integer value.
2019-04-23 13:16:15 +02:00
Marina Glancy
beff3806d6 MDL-10965 courses: capability to browse course list 2019-04-10 12:35:28 +02:00
Eloy Lafuente (stronk7)
73dd6dea3f Merge branch 'MDL-65038_master' of https://github.com/maksudr/moodle 2019-04-04 20:30:40 +02:00
Juan Leyva
e0695f8764 MDL-64658 files: Support constant to avoid file merging
... in file_save_draft_area_files
2019-03-25 14:57:18 +01:00
maksudr
2ae0c9c7bc MDL-65038 core_files: Fix typo in function mock_response 2019-03-20 20:56:23 +00:00
Mark Nelson
80b6fb7a79 MDL-27520 core_grades: make constant names clearer
Also using them in more locations.
2018-10-17 15:57:27 +08:00
Mark Nelson
c9f6ca1142 MDL-27520 core: allow retrieval of files from grade files areas
Also added 'history' filearea for the history report where files
will be copied to if the site has enabled this feature.

We will also be storing files in the module context, not course,
so that check was removed.
2018-10-17 13:15:45 +08:00
Andrew Nicols
2e8d476165 MDL-36754 core_files: Add back missing baseurl line 2018-08-14 15:54:12 +08:00
Andrew Nicols
91f1f28233 MDL-36754 core_files: Support tokens when rewriting text
Support use of a token for access to pluginfile.php when rewriting text
content.

This is primarily intended for notifications where the user is unlikely
to be logged into Moodle when receiving the notification.
2018-08-14 06:57:32 +08:00
Jun Pataleta
c353ad20c3 MDL-45170 core: Integration review fixes
* Pass $forcehttps parameter to call extract_draft_file_urls_from_text()
 call in \core_weblib_testcase::test_extract_draft_file_urls_from_text()
* Style fixes
2018-08-08 16:17:32 +08:00
Charles Fulton
7d7d3b1731 MDL-45170 files: check other draftfile areas when processing 2018-08-08 16:15:23 +08:00
Adrian Greeve
f38766e166 MDL-62849 files lib: Add method to return all files.
Added a function which returns all the files from all directories
in the draftarea.
2018-07-17 10:25:11 +08:00
Jake Dallimore
4d5046b0eb MDL-51419 core_files: Support for utf8 in file names in MS Edge 2018-06-22 10:29:23 +08:00
Eloy Lafuente (stronk7)
6663f615ed Merge branch 'wip-MDL-60161-master-test' of git://github.com/abgreeve/moodle 2017-12-18 16:09:51 +01:00
Adrian Greeve
48a9856da8 MDL-52100 filelib: Files that are oversized are checked with user.
Files that are oversized could have been uploaded by a user who
can ignore the file size limits. These files should not be deleted
in these situations.
2017-12-18 13:12:22 +08:00
Carson Tam
7d4a3d1d07 MDL-60161 class curl in filelib: Cleaned up doc block. 2017-12-13 11:07:58 +08:00
Carson Tam
a2b66c7833 MDL-60161 class curl in filelib: Avoid duplicate params in http header 2017-12-13 11:07:58 +08:00
Sara Arjona
6820f36bda MDL-57569 core_files: Fix to let show generated f3 image 2017-11-24 11:48:32 +01:00
John Okely
672f483670 MDL-42834 admin: Removal of httpswwwroot 2017-10-23 12:25:36 +08:00
Eloy Lafuente (stronk7)
39dce3073f Merge branch 'MDL-60320' of git://github.com/aolley/moodle 2017-10-17 00:05:54 +02:00
Adam Olley
d12ac53512 MDL-60320 icons: Use PNG icons as the preview thumbnails
Without this change, Moodle fails to provide any data when requesting a
thumbnail for a non-image file as its looking to provide a SVG file that
doesn't exist.
2017-10-10 09:57:17 +10:30
Jake Dallimore
521d900f06 MDL-35429 restore: fixed downloading of automated backup files 2017-10-09 10:29:07 +08:00
Jake Dallimore
7a170fad85 MDL-35290 files: File manager reports files which can't be read 2017-08-29 11:15:30 +08:00
Jake Dallimore
f3c2afd0e8 MDL-36985 core_files: added option to remove draft files on save
text areas can now specify $options['removeorphaneddrafts'] when saving
their data using file_postupdate_standard_editor(). If set to true,
this option clears all user drafts which are not referenced in the text
2017-08-22 13:15:30 +08:00
Marina Glancy
66347456ec MDL-59377 course: when module intro is visible display embedded files
Even when course module is not available the intro text can still be visible on the
course page. In this case the availability restriction is displayed to the student
but link to the activity is not available
2017-07-17 13:42:08 +08:00
Simey Lameze
1fad6ff3f5 MDL-59008 mod_resource: add option to serve external files embed 2017-07-03 10:19:33 +08:00
Juan Leyva
bef201c7e0 MDL-58712 core_user: Do not count the root directory 2017-06-22 16:09:58 +02:00
Juan Leyva
0237571004 MDL-58712 core_user: New function for retrieving file area info 2017-06-13 11:22:33 +01:00
Damyon Wiese
32f01c546c MDL-58280 fileconverter_googledrive: Fix cibot complaints 2017-04-20 10:49:17 +08:00
Damyon Wiese
9fe3363301 MDL-58280 fileconverter_googledrive: Is born. 2017-04-20 10:49:17 +08:00
Damyon Wiese
d5bb9f1ffc MDL-58334 repositories: Offline downloads
Support an optional param for offline downloads for repositories supporting external links (googledrive and skydrive).

Part of MDL-58220
2017-04-03 13:43:25 +08:00
Damyon Wiese
141ee541ca MDL-58219 repository: Change how controlled links work
Files are copied to the system user as soon as they are uploaded. Write access is then controlled when
serving links to the file.

Part of MDL-58220
2017-04-03 13:41:19 +08:00