525 Commits

Author SHA1 Message Date
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
Damyon Wiese
72fd103add MDL-58219 cibot: Fixes
Fixes for cibot warnings.

Part of MDL-58220
2017-04-03 13:41:19 +08:00
Damyon Wiese
151b0f9409 MDL-58132 repositories: Controlled link file type
This introduces a new "controlled link" file type where the file is not
stored in Moodle - but Moodle will control the access permissions on the file.

Plugins can "freeze" a filearea which means Moodle will take ownership of all the remote
files of this type.

When accessing a file, if the "filebrowser" infomation indicates the current user can write to the file, they
will be granted temporary write access.

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
989e14fea0 MDL-58128 googledocs: Support reference files.
Add options so the admin can control the types of files this repository can support (and the default).

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
299112498b MDL-58090 oauth2: Coding style
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
931c023468 MDL-58090 oauth2: Add unit tests
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
8445556b4c MDL-58090 oauth2: Move code from subclasses to config
Allow the behaviour of each oauth service to be customised by config instead of
subclasses.

Part of MDL-58220
2017-04-03 13:39:44 +08:00
Damyon Wiese
60237253a2 MDL-58090 oauth2: Store a list of oauth2 services
Build an admin page where OAuth 2 services can be installed and configured.

Part of MDL-58220
2017-04-03 13:39:02 +08:00
Damyon Wiese
3c8850711f MDL-40759 icons: filepicker
Use font awesome svg icons for files in the file picker. Move the old icons to bootstrapbase.
2017-03-17 15:52:17 +08:00
Damyon Wiese
663640f5b3 MDL-40759 icons: convert uses of pix_url to pix_icon
Also change filepicker to use scaled svgs instead of sets of custom pngs. The svgs are taken from font-awesome.
2017-03-17 15:52:17 +08:00
Matteo Scaramuccia
bf4f857acf MDL-58027 files: Restored missing htmlentities() call 2017-03-13 22:24:33 +01:00
Matteo Scaramuccia
203c5bce27 MDL-57789 files: Reviewed lifetime value 2017-02-25 23:42:37 +01:00
Matteo Scaramuccia
ed0a1cd708 MDL-57789 files: Use immutable Cache-Control extension. 2017-02-25 23:42:35 +01:00
Matteo Scaramuccia
f2de8226a8 MDL-57789 files: Used if-then instead of ternary operators 2017-02-25 23:36:07 +01:00
Matteo Scaramuccia
7338ce0182 MDL-57789 files: Let send_stored_file() rely on send_file(). 2017-02-25 23:36:04 +01:00
Davo Smith
fda954f470 MDL-47198 filelib: fix curl handling headers with no value 2016-12-16 13:19:48 +00:00
Jake Dallimore
605bab84ce MDL-48498 core_files: Add security helper to curl class
Allow injection of security_helper objects into curl, but default
to a core helper tied to http security settings values.
2016-11-08 15:11:15 +08:00
Frederic Massart
19efee14e2
MDL-55445 files: Helper functions related to serving and caching
The function send_content_uncached() is meant to be used when serving
content which should not be cached by browsers/proxies. You will
use this in development mode, or when the request is malformed
but you need to return some fallback content which shouldn't be stored
under the URL it was requested from.

The function file_safe_save_content() should only be used for content
not stored in the file API. Good candidates for this are resource
which fit well in the localcache. The function tries to write the
content in the most atomic way as possible to prevent incomplete
writes or concurrent writes.
2016-08-17 10:26:10 +08:00
Frederic Massart
0eb97bfa13
MDL-55445 files: Support for cacheability in send_file() 2016-08-15 10:54:29 +08:00
Marina Glancy
b195a5b331 MDL-33741 file_info: check capability when serving file in coursecat description 2016-08-01 09:12:18 +08:00
Adrian Greeve
f6f0ba2d45 MDL-55126 files: Deprecate get_records_csv and put_records_csv.
Initial deprecation of the above functions.
2016-07-13 14:22:46 +08:00
Andrew Nicols
71f81adce9 Merge branch 'MDL-54869-master' of git://github.com/jleyva/moodle 2016-07-07 10:30:17 +08:00
Andrew Nicols
ff3778bf97 MDL-29738 file: Remove unused stylesheet functionality
This functionality was commented out in
78946b9bdb1299a21f00b88d81c73ad8700c951e for MDL-20204 back in 2009.
Since then it has been wasting cycles performing utterly pointless
preg_match and preg_replace calls.

The decision has been made to deprecate it in stables, and remove it in
3.2.
2016-07-05 19:31:22 +08:00
Juan Leyva
460897052e MDL-54869 files: Create new required functions
This was a complex change requiring three new functions:
file_merge_files_from_draft_area_into_filearea - To just add files from a draft area into a real one (just adding or updating, not deleting)
file_merge_draft_area_into_draft_area - To merge files from two draft areas, used by the latest for creating a draft area with all the original files plus the new ones.
file_overwrite_existing_draftfile - Required to update existing files not losing metadata or references.

The whole process is the following:

    User uploads a file (upload.php)
    Client gets a new draftid A containing the file only (return of upload.php)
    Client requests to merge that draftid in the user's private files (core_user_add_user_private_files)
    Server prepares a new UNUSED draftid B from existing area
    Server merges A into B
    Server saves the draft B into the final area
2016-07-05 09:01:34 +01:00
Juan Leyva
d089e4984d MDL-54869 files: Fix file_save_draft_area_files documentation 2016-07-05 08:40:06 +01:00
Matteo Scaramuccia
bc219382b7 MDL-53837 assign: Fix executable check for 'unoconv.py' on Windows. 2016-04-17 22:35:13 +02:00