103 Commits

Author SHA1 Message Date
Andrew Nicols
5329506f22 MDL-34182 Repositories: Check for and warn on invalid output in the file picker 2013-12-13 14:10:05 +08:00
sam marshall
3ef7279f26 MDL-42084 Core: Change set_time_limit to core_php_time_limit::raise everywhere
Exceptions (places where set_time_limit is still left) are:

Third-party libraries:
  ADODB
  PHPMailer

Moodle core:
  PHPUnit - not relevant (CLI mode)
2013-11-06 16:40:01 +00:00
Sam Hemelryk
df1d3e9115 Merge branch 'wip-MDL-27684-master' of git://github.com/satrun77/moodle 2013-09-16 10:27:16 +12:00
Mohamed Alsharaf
dca16fd76f MDL-27684 repository: make require_login() throws exception instead of redirect 2013-09-13 16:01:55 +12:00
Dan Poltawski
033d1634cc MDL-29954 repository: remove dead code
Also remove repository_attach_id() which was never used and not useful.
2013-08-28 10:52:42 +08:00
Ankit Agarwal
0601e0eef6 MDL-40402 libraries: Replace get_system_context() with context_system::instance() in core 2013-07-04 15:41:06 +08:00
Andrew Robert Nicols
28037331fb MDL-33680 JavaScript: Use the correct Content-Type for AJAX scripts
The repository_ajax.php script was returning a text/plain Content-Type and
user/selector/search.php was setting the content-type when this should be
handled by with the definition of AJAX_SCRIPT.
2013-03-16 10:52:02 +00:00
Frederic Massart
39bb9b1f00 MDL-36472 files: Improved file area uploads error messages. 2013-01-31 15:09:44 +08:00
Dan Poltawski
0e35ba6ffc MDL-36357 cleanup - remove double semicolons 2012-11-15 09:51:26 +08:00
Frederic Massart
68acd1157e MDL-33766 files: Improved validation of areamaxbytes 2012-11-01 16:47:06 +08:00
Frederic Massart
21e3ea77a3 MDL-33766 files: Support for userquota/size limit in draft areas 2012-11-01 16:46:42 +08:00
Eloy Lafuente (stronk7)
69689b4c3e Merge branch 'wip-MDL-34290-master' of git://github.com/marinaglancy/moodle 2012-08-29 12:11:00 +02:00
Marina Glancy
437f5dc4cf MDL-34290 Auto synchronise newly created references when possible 2012-08-29 11:56:17 +08:00
Marina Glancy
75dd40b265 MDL-34290 repository_dropbox reference handling
- When Dropbox file is inserted by reference, the shared link is created and stored
- Added a function to fix old references (containing access_key/secret) with the proper ones
- Added support for external links in Dropbox (FILE_EXTERNAL), using the shared link API
- Make sure that repository::get_link() receives reference and not source (other repositories than Dropbox have those fields identical)
- Function get_file_by_reference respects request timeouts, downloads only images (for thumbnail generation),
- Function get_file respects request timeout
- do not use cache_file class (content is cached in moodle filepool if needed)
- added parameter for maximum size of files to cache
- added 'Manage' link for Filepicker
- added user name to
- added user name (if different from current) to 'Original' field
- added/corrected phpdocs
2012-08-29 11:56:16 +08:00
Marina Glancy
59cb759850 MDL-34290 repository API: do not confuse source and reference
make sure that repository function get_file_source_info receives as argument the source of the file,
and get_file receives a reference;
reference is a value of DB field files_reference.reference and result of get_file_reference(source).
Fix dropbox as the only repository that have different values in those fields;
also added information about user in dropbox reference and original
2012-08-29 11:56:14 +08:00
Ankit Agarwal
d197ea4300 MDL-34549 libraries: Replace get_context_instance_by_id() by context::instance_by_id() 2012-08-24 11:30:10 +08:00
Rajesh Taneja
960f437972 MDL-30792 Files API: Cleaner approach to get maxbytes size in filepicker 2012-08-03 11:20:55 +08:00
Rajesh Taneja
7030756a98 MDL-30792 Files API: maxbytes will be set by get_max_upload_file_size if less then 0 or greater then max moodle limit 2012-08-03 11:06:00 +08:00
Frederic Massart
21c08c63ca MDL-34458 Librairies: Replaced deprecated get_context_instance() 2012-07-24 16:58:17 +08:00
Marina Glancy
6dc82385ab MDL-33950 Correctly initialise repository and check access in js and non-js filepicker 2012-07-06 09:44:07 +08:00
Marina Glancy
1bd0174743 MDL-33950 check if source file is accessible in repository_ajax.php
- repository::copy_to_area() does not check access any more, and repository_recent::copy_to_area() is unnecessary
- added repository::file_is_accessible() that checks access to the picked file (regardless of accessibility of the file it is referencing to)
2012-07-06 09:44:07 +08:00
Marina Glancy
adbb904b9c MDL-33837 picking file from server files should not copy 'Main file' property 2012-07-02 14:11:39 +08:00
Marina Glancy
83d2700ec9 MDL-33832 Fixed filling of files.source field
- also supress the error on unserialise (because people already may have broken files.source field)
- also display details about unparseable JSON error
- make source field look the same across repositories
2012-06-20 16:09:37 +08:00
Dongsheng Cai
d6453211b6 MDL-33513: Make files->source field consistent 2012-06-15 14:51:07 +08:00
Dan Poltawski
414ce30812 Revert MDL-33513
This reverts commit b2cf2b807f7a7c8d1a02ebb52038c61cc63a1494.
This reverts commit 24b96f01702571989fa77a05c5cd11b9fedc2745.
This reverts commit 39c60294a6a027ae56f4b9eda159bb589b60c0c0.
This reverts commit 8a288971e25eaaa4c8cbd67e450cee0e12435d4e.
2012-06-14 13:57:45 +08:00
Dan Poltawski
54588ca214 Merge branch 'MDL-27156_file_cap' of git://github.com/andyjdavis/moodle 2012-06-14 12:00:18 +08:00
Dan Poltawski
cd925ac79b Merge branch 'dev_MDL-33513_files_source' of git://github.com/danpoltawski/moodle 2012-06-14 11:12:21 +08:00
Andrew Davis
8ac95c279c MDL-27156 repository: Added a new capability so that select users can bypass file size restrictions 2012-06-14 09:19:25 +07:00
Marina Glancy
c0e8f211d3 MDL-33452 It must not possible to create an alias to another alias
- if the downloaded file is an alias we pretend that we operate with its source
2012-06-12 11:03:54 +08:00
Dongsheng Cai
8a288971e2 MDL-33513: Make files->source field consistent 2012-06-10 17:47:00 +10:00
Marina Glancy
6546a73dbb MDL-33445 reverted file size check for files inserted by reference 2012-06-05 13:57:16 +08:00
Marina Glancy
9945ec5e13 MDL-33445 Added file size check to files inserted by reference 2012-06-05 09:26:26 +08:00
Marina Glancy
2dfa16ef8a MDL-33409 Newly copied files should take on the userid of the current user, and dates reset
- changed function repository::copy_to_area so it accepts more file attributes, pass changed attributes to it
- changed file_info::copy_to_storage and file_info_stored::copy_to_storage to accept more file attributes
- simplified file size check for moodle files in repository/repository_ajax.php
- removed unused code in repository/repository_ajax.php
2012-06-05 09:26:26 +08:00
Dan Poltawski
f8e74b20f9 MDL-28666 repository - Switch usefilereference to PARAM_BOOL 2012-05-21 18:21:31 +08:00
Marina Glancy
559276b153 MDL-32247,MDL-32831,MDL-32900 Use correct url building of file type icons
- function get_mimetypes_array() now contains also information about filetype groups and language strings
- use 'smart' human-readable mimetype description
- never determine filetype group based on filetype icon image! remove function mimeinfo_from_icon()
- get rid of class filetype_parser and file lib/filestorage/file_types.mm, replaced with functions file_get_typegroup(), file_extension_in_typegroup() and file_mimetype_in_typegroup()
- support multiple icon sizes, not only 16 and 32
- retrieve filetype icon only using proper functions file_..._icon() from lib/filelib.php throughout the code
- increase size of repository thumbnails to 90 and icons to 24 (will take effect when new icons exist)
2012-05-21 16:01:04 +08:00
Dongsheng Cai
4712676dfa MDL-28666, Fixed source field when download a file using filepicker 2012-05-21 11:57:56 +08:00
Marina Glancy
5bdf63cce0 MDL-14636: Support table view in Filepicker, provide more info about files
- Added table view in Filepicker where for each file we show Name, Last modified, Size and Type. Sortable by column
- Preprocess list of files returned from repositories to include formatted size, dates, type and also add filetype icon
- Make sure that local repositories (coursefiles, filesystem, local, recent, user) return information about file size, datemodified, datecreated, author, license
2012-05-21 11:57:51 +08:00
Marina Glancy
b5e7b6385e MDL-31901: Introducing renderers for filepicker:
- create repository renderer, implement functions for returning HTML templates used in filepicker
- let filepicker use HTML from templates
- move CSS for filemanager and filepicker to the separate css file in base theme
- use only YUI3 in filepicker (get rid of YUI2)
- add button for 'View details' in filepicker (though this view mode is still not ready)
2012-05-21 11:57:51 +08:00
Dongsheng Cai
6723372514 MDL-28666 Extends repository to support references
1. Allow repository to create references to external contents
2. Extends files API to handle file references
3. Generic file caching
4. Backup/restore file references
5. Download external contents if repository uninstalled
6. Allow filepicker to display iframe
7. PHPUnit test suits
2012-05-21 11:57:51 +08:00
Marina Glancy
a5159b864d MDL-32037: MDL-32037: After displaying error message filepicker could not send proper request to server
We need to make sure that code executed on error does not create more requests and
especially does not create the same request that resulted with error. So now by default
filepicker will clear the right side of the window if repository_ajax.php returned an
error.
Also fixed an 'invalidsesskey' error string.
2012-03-16 09:38:33 +08:00
Sam Hemelryk
5e255d5ad8 Merge branch 'MDL-27919' of git://github.com/jamiepratt/moodle 2011-10-31 17:18:13 +13:00
Ankit Kumar Agarwal
c0d60b3a3f MDL-26890 Forums check on filesize if the file is added to the forum from private area 2011-09-20 10:01:42 +05:30
Jamie Pratt
794cc7e1cf MDL-27919 Fixes 'undefined' message and similar problems when selecting a
recent file, server file or when renaming a file being uploaded with the same
name as a previous one.
2011-09-18 13:22:35 +07:00
Eloy Lafuente (stronk7)
0a4ca115b2 Merge branch 'w33_MDL-26796_m22_arrayparams' of git://github.com/skodak/moodle 2011-08-24 14:06:22 +02:00
Petr Skoda
18bd7573d6 MDL-26796 convert array parameter cleaning to new functions 2011-08-18 08:40:33 +02:00
Petr Skoda
23bfe0a448 MDL-19380 reimplement antivir scanning in repositories 2011-08-18 08:37:40 +02:00
Dongsheng Cai
f392caba15 MDL-26388, pop up a dialog when attaching a file already being used in draft area. 2011-05-02 10:11:19 +08:00
Petr Skoda
431ac39634 MDL-26623 fix file permissions
The permissions are now going to be verified as part of the weekly release process.
2011-03-01 12:26:49 +01:00
Dongsheng Cai
a7db0a260e MDL-25895, prevent repository_ajax.php being downloaded by IE when php file is associated with other programs 2011-01-17 13:56:57 +08:00
Petr Skoda
8a7703ce53 MDL-25973 add missing charset 2011-01-14 09:32:17 +01:00