1152 Commits

Author SHA1 Message Date
Dan Poltawski
e9641de10d Merge branch 'w43_MDL-35771_m24_zindex' of git://github.com/skodak/moodle 2012-11-07 11:22:26 +08:00
Dan Poltawski
aed58a3da8 Merge branch 'MDL-35990-master' of git://github.com/FMCorz/moodle 2012-10-29 14:32:11 +08:00
Petr Škoda
e13b330d49 MDL-35771 lower the index values in file related code to prevent dragging problems in YUI 2012-10-21 14:37:10 +08:00
Dan Poltawski
ac088b1c21 Merge branch 'w42_MDL-35904_m24_mainadmin' of git://github.com/skodak/moodle 2012-10-16 14:50:30 +08:00
Frederic Massart
e56de3a4d1 MDL-35990 repository: Added MOODLE_INTERNAL check and removed config inclusion 2012-10-16 14:01:29 +08:00
Matteo Scaramuccia
c67f1a342c MDL-35990 Repository Library should not include the main config.php file 2012-10-16 13:54:23 +08:00
Sam Hemelryk
2bbf03ce3b Merge branch 'wip-MDL-33857-master' of git://github.com/marinaglancy/moodle 2012-10-16 13:31:44 +08:00
Sam Hemelryk
a7aa82b3ac Merge branch 'MDL-35664-master' of git://github.com/FMCorz/moodle 2012-10-16 10:42:51 +08:00
Frederic Massart
8136753abf MDL-35892 repository: prepare_listing recursively prepares the data 2012-10-15 09:46:04 +08:00
Frederic Massart
7dab27b313 MDL-35664 filepicker: Filepicker knows about the current path and uses it 2012-10-15 09:46:03 +08:00
Petr Škoda
550790153a MDL-35904 send notifications from main admin and improve coding style 2012-10-13 09:52:45 +02:00
Marina Glancy
43aadf0401 MDL-33857 Increase performance of queries for Server files repository (small improvements) 2012-10-10 15:21:27 +08:00
Marina Glancy
b8de262139 MDL-33857 Increase performance of queries for Server files repository
- file_info class now has new methods get_non_empty_children and count_non_empty_children; added default implementation;
- all core classes extending file_info have their implementation of those methods;
- class repository_local_file used for caching get_children() results is removed;
- class repository_local rewritten to use new methods from file_info;
- added caching of retrieved modules in file_browser::get_file_info_context_module() - this query is slow and executed multiple times on big servers
2012-10-10 15:21:26 +08:00
Davo Smith
91813c1b4b MDL-35288 drag and drop upload - adjust error message text when attempting to upload a folder 2012-10-03 08:46:55 +01:00
Marina Glancy
006bbbdf34 MDL-35542 Fixed a bug when trying to directly link to a file from Dropbox 2012-09-20 15:37:48 +08:00
Rossiani Wijaya
a3433213a1 MDL-29872 Dropbox repository: add message handler to filepicker header and add message to logout from dropbox. When user clicked on logout button from dropbox repository, it will also logging them out from dropbox site through a popup window 2012-09-07 15:42:43 +08:00
Eloy Lafuente (stronk7)
92b75df804 Merge branch 'MDL-34945-master' of git://github.com/FMCorz/moodle 2012-09-06 20:11:53 +02:00
Eloy Lafuente (stronk7)
0e08f394f5 Merge branch 'MDL-35034-master' of git://github.com/FMCorz/moodle 2012-09-06 02:01:11 +02:00
Frederic Massart
b2245b7e8a MDL-34633 Repository: Flickr supports small images 2012-09-03 14:21:53 +08:00
Frederic Massart
87294fa346 MDL-35101 Repository: Public Flickr fails when the picture has no license 2012-09-03 14:20:45 +08:00
Frederic Massart
ec7e998f4b MDL-35034 Repository: Google Docs does not fail when download is restricted 2012-09-03 14:12:43 +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
63d8ccef81 MDL-34290 repository_filesystem: do not store files in moodle filepool unless images 2012-08-29 11:56:19 +08:00
Dan Poltawski
7e3f70bed7 MDL-34290 using moodleform cast to int in dropbox repository settings 2012-08-29 11:56:18 +08:00
Marina Glancy
7bb7bd2e79 MDL-34290 Added timeout to googledocs request to download a file 2012-08-29 11:56:18 +08:00
Marina Glancy
437f5dc4cf MDL-34290 Auto synchronise newly created references when possible 2012-08-29 11:56:17 +08:00
Marina Glancy
f4fe646b71 MDL-34665 Dropbox displays thumbnails and return info about file size and date last modified 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
fa746096cf MDL-34290 repository_equella: do not download files when not needed
repository_equella::get_file_by_reference respects request timeouts, downloads only images (for thumbnail generation),
does not use cache_file class (content is cached in moodle filepool if needed);
also repository_equella has counter of unsuccessfull connect attempts and do not perform any more if 3 failed
(within one request)
2012-08-29 11:56:15 +08:00
Marina Glancy
f24b0f69ee MDL-34290 repository_boxnet, boxlib use request timeouts
boxlib receives additional argument as request timeout
repository_boxnet::get_file_by_reference respects request timeouts and downloads file into moodle only if it is image
also some improvements to repository_boxnet source display functions;
also do not cache result of request in retrieving of listing, user is unable to see the new files he added to box.
2012-08-29 11:56:15 +08:00
Marina Glancy
bc6f241ca2 MDL-34290 repository API: add repository function to import referenced file
it must be independed from sync_external_file because sync often does not actually download contents, it is used just to retrieve
the size of the file. Besides the timeouts for get_file and sync requests are very different.

Also add option to send_stored_file() to ignore reference and send cached contents
2012-08-29 11:56:15 +08:00
Marina Glancy
96221c605a MDL-34290 repository_filesystem add original info function and reduce ref lifetime 2012-08-29 11:56:15 +08:00
Marina Glancy
72a5655566 MDL-34290 repository API: add timeout to get_file and throw exception
- get_file should have a request timeout and throw an exception with the details (i.e. timeout reached) if download can
not be completed
- corrected phpdocs
2012-08-29 11:56:14 +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
Marina Glancy
2d222a3243 MDL-34290 repository API: allow get_file_by_reference return only filesize
we want to allow repositories to perform quick synchronisation, without downloading the file. In this case they return
only filesize, without the contenthash
2012-08-29 11:56:07 +08:00
Ankit Agarwal
5fbe2118bc MDL-34549 libraries: Changing strictness of context::instance_by_id() when required 2012-08-24 11:30:35 +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
Frederic Massart
2c86955027 MDL-34945 Repository: Creating an instance requires the user to have the permission to view it 2012-08-24 10:55:22 +08:00
Sam Hemelryk
0bb0f086ac Merge branch 'MDL-33640_master' of git://github.com/MaxThrax/moodle 2012-08-15 11:48:40 +12:00
Dan Poltawski
06c548c783 Merge branch 'w33_MDL-34741_m24_yui2in3' of git://github.com/skodak/moodle 2012-08-14 15:33:10 +08:00
Marina Glancy
7355640aed MDL-34748 repository_filesystem: Sort files by title by default 2012-08-13 11:58:58 +08:00
Petr Škoda
3b715c5f80 MDL-34741 use 2in3 in file picker 2012-08-11 20:40:03 +02:00
Paul Nicholls
ec3eaa2c38 MDL-33640 - change $templatesinitialized to an array; improve naming and automate use of template
* $templatesinitialized is now an array, so that subsequent calls to initialise_filepicker which request different repositories will include those (and only those) templates which it requires but have not yet been included
* The get_template method has also been renamed to get_upload_template (and the template to "uploadform_" followed by the repository type), since it only applies to upload forms
* If a plugin provides a get_upload_template method, the template it returns will now automatically be used instead of the standard uploadform template when generating an upload form
2012-08-09 09:47:40 +12:00
Paul Nicholls
013cf2878c MDL-33640 - Add ability to use custom filepicker templates
Allow repository plugins to register a template by defining a get_template() method, coupled with the ability to request the template be used by create_upload_form() instead of the standard 'uploadform' template.  The template is automatically registered using the plugin's name, and core templates will override any which clash; this also means that a theme can override these templates in a custom renderer if it wants to.
2012-08-08 13:50:47 +12:00
Eloy Lafuente (stronk7)
4137eb46a9 Merge branch 'wip-mdl-30792' of git://github.com/rajeshtaneja/moodle 2012-08-08 01:00:12 +02:00
Aparup Banerjee
20c3e25343 Merge branch 'MDL-34715-master' of git://github.com/FMCorz/moodle 2012-08-07 10:40:22 +08:00
Frederic Massart
3e512abbe4 MDL-22663 Repository: WebDAV supports Digest authentication 2012-08-03 14:03:54 +08:00
Frederic Massart
d09c62c4e1 MDL-22663 Repository: WebDAV supports SSL and chunked data 2012-08-03 13:51:56 +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