360 Commits

Author SHA1 Message Date
Marina Glancy
9a62f7799b MDL-32867 Working with external references in filemanager
- Files that are references to external resources have special shortcut icon in filemanager
- When user selects a REF file in filemanager, he can see the 'Original' of the file in the way that original repository wants to show it, it is loaded dynamically via AJAX request
- Files that are themselves the source of references of other files in the system have 'link' icon in filemanager. When user tries to remove/rename/overwrite SRC file he is warned that all ## existing references will be updated/converted to copies.
- Changed confirmation messages for deleting, moving/renaming of the folders
- confirmation dialog in filemanager is using YUI3 now
2012-05-21 11:57:53 +08:00
Marina Glancy
e709ddd29c MDL-31901: Allow FileManager to re-use FilePicker JS code for view modes:
- when loading core_filepicker we extend the Node element with functions necessary to display files list in different view modes;
- repository/filepicker.js is changed to use those functions;
- FileManager now has three different view modes (icon view, tree view and table view), JS code is re-used from FilePicker;
- files in FileManager no longer have context menu, they have one popup Widget with different actions instead;
- Added more templates for JS code to FileManager, use similar CSS class names as FilePicker;
- lib/filelib.php : fixed double slashes in path, return more data about files;
- lib/form/filemanager.php : pass information to FileManager about available licenses and default author;
- repository/draftfiles_ajax.php : return information about directory tree for file moving UI in FileManager, return formatted information;
- repository/lib.php : function repository::prepare_listing() now can work also with draftarea files listing;
2012-05-21 11:57:52 +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
Petr Skoda
33d9f44bc6 MDL-18763 add 512x512px user avatar support 2012-05-19 18:47:23 +02:00
Charles Fulton
66969d5004 MDL-32889 lib: escape filename in Content-Disposition header 2012-05-09 16:03:33 -04:00
Dan Poltawski
4d6206ce67 MDL-32628 lib/filelib.php: Set user profile image expires to 1 year
This is to reduce the performance impact of user profile images
requests. Pictures are now referenced by a revision counter so
any changes in picture will not be badly cached any longer.
2012-05-04 09:36:11 +08:00
Dan Poltawski
0dda790c05 Merge branch 'w18_MDL-32628_m23_avatarperf2' of git://github.com/skodak/moodle
Conflicts:
    lib/db/upgrade.php
	version.php
2012-05-04 09:28:41 +08:00
Petr Skoda
4d254790c4 MDL-32628 add revision for user avatar images
This should finally resolve all avatar caching issues and should also help with performance.
2012-04-30 23:36:47 +02:00
Petr Skoda
d5dd0540c2 MDL-26028 send_file performance improvements
Includes X-Sendfile support, ETags for stored_files and general cleanup.
2012-04-29 18:27:23 +02:00
Petr Skoda
99302c5e96 MDL-26028 cleanup all IE6 gzip hacks 2012-04-28 18:00:06 +02:00
David Mudrak
7a00d4385d MDL-32471 preview thumbnails support for other component types
This commit affects mostly qtypes. Other standard components either do
not have pluginfile handler or have been already updated to the new API.
2012-04-24 14:29:44 +02:00
David Mudrak
957fc845b6 MDL-32471 preview thumbnails support for blocks
block_xxx_pluginfile() now accepts the $options parameter that is to be passed
to the send_stored_file() function.
2012-04-24 14:01:53 +02:00
David Mudrak
261cbbacc1 MDL-32471 preview thumbnails support for activity modules
Activity module's xxx_pluginfile() now accepts the $options parameter
that is to be passed to the send_stored_file() function.
2012-04-24 12:09:45 +02:00
David Mudrak
82c224ee7a MDL-32471 send_stored_file() now supports the preview option
If for any reason the preview image can't be generated for the given
file (eg we do not support its mimetype yet), the function will send
404 Not Found HTTP header. This will be useful for the lazy loading of
the file thumbnails as the JavaScript will simply ignore such response
and will not replace the default icon for the file.

In the future, a fallback thumbnail generator can be implemented that
would generate some sort of default preview for all files (eg using
the mimetype icon like some desktop OS do).
2012-04-24 12:09:45 +02:00
David Mudrak
796495fed2 MDL-32471 changing the interface of the send_stored_file() 2012-04-24 12:09:44 +02:00
David Mudrak
b071498f1b MDL-32471 pluginfile.php accepts optional parameter 'preview' 2012-04-24 12:09:44 +02:00
Dan Marsden
dbdc735559 MDL-32147 - use correct 404 for server type 2012-03-23 10:01:04 +13:00
Dongsheng Cai
d2b7803e5a MDL-30973 Files API, check and update DocBlock 2012-02-15 12:48:57 +08:00
Petr Skoda
b85b25ebb8 MDL-31006 fix various notices in PHP54
PHP54 compatibility
2012-01-18 01:03:20 +01:00
Petr Skoda
58a435f6cf MDL-31171 fix blog attachment serving in BLOG_USER_LEVEL 2012-01-15 19:11:16 +01:00
Eloy Lafuente
90911c4ff9 MDL-29844 Administration: Added new config for users to login for viewing profile image 2012-01-03 11:53:49 +08:00
Dongsheng Cai
ec0d6ea2a9 MDL-28646 Web service: core_course_get_contents()
1. Implement core_course_get_contents web service
2. Implement callbacks in folder, resource, page and url modules
3. Implement download script for web service
2011-11-28 16:22:38 +08:00
Tom Lanyon
365bec4c06 MDL-28701 Change all uses of $CFG->dataroot/cache to $CFG->cachedir 2011-09-10 10:35:46 +02:00
Tom Lanyon
7aa06e6ded MDL-28701 Change all uses of $CFG->dataroot/temp to $CFG->tempdir 2011-09-10 10:35:39 +02: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
ffa5e3ddae MDL-28708 minor unrelated cleanup and elimination of dead code 2011-08-19 17:26:28 +02:00
Tony Levi
f73c6bad2c MDL-28708: Send 304 Not Modified response when browser If-Modified-Since header is after file mtime 2011-08-19 17:14:54 +02:00
Petr Skoda
18bd7573d6 MDL-26796 convert array parameter cleaning to new functions 2011-08-18 08:40:33 +02:00
Eloy Lafuente (stronk7)
32dc8ecd16 MDL-27896 filters/editor - fix whitespace 2011-08-16 01:57:51 +02:00
Rajesh Taneja
f9157eb798 MDL-27896 editor - added sanity check to pick wrong context passed to editor creation 2011-08-12 11:33:21 +08:00
Petr Skoda
98eaf27e3c MDL-28280 remove obsolete unmaintained $CFG->usesid 2011-07-10 13:44:41 +02:00
Sam Hemelryk
5f1c825dfa Merged MDL-27251 Fixed up whitespace, Fixed broken string, reworded new strings 2011-05-03 10:51:06 +08:00
Aparup Banerjee
60b5a2fec7 MDL-27251 Files API - added timeout re-calculation as an optional argument. added setting for minimum Kbps for large files fetched from internet where the passed in timeout maybe too low.
allowed turning off the http HEAD request timeout calculation with zero (or negative) bitrate

	This was added in to allow servers that have a problem with
	HEAD requests to carry on with the given timeout without re-calculations.
	See PULL-651 for the discussion.

	the optional argument to force recalculation of timeout has been forced within scorm/locallib.php

	timeout re-calculation only increments timeout.
2011-04-27 10:49:40 +08:00
Tim Hunt
c08643da97 MDL-26887 Refactor file_save_draft_area_files to separate out the file_rewrite_urls_to_pluginfile bit. 2011-03-18 16:41:29 +00:00
Petr Skoda
fcd2cbaf1f MDL-26697 multiple media filtering fixes and improvements
Bug fixes:
    * fixed broken flash resizing via URL
    * upgraded Flowplayer
    * fixed invalid context in format_text()
    * all media related CSS moved from themes to filter and resources
    * fixed automatic pdf resizing in resources

Changes:
    * reworked filter_mediaplugin system settings - grouped by player type instead of individual extensions, added more information
    * improved regex url matching
    * removed old unused players, Eolas fix and UFO embedding
    * image embedding moved to filter_urltolink
    * new Flowplayer embedding API
    * accessibility and compatibility tweaks in Flowplayer
    * SWF embedding now works only in trusted texts, it is now enabled by default (works everywhere if "Allow EMBED and OBJECT tags" enabled)
    * new default video width and height

New features:
    * automatic Flash video resizing using information from video metadata
    * Flash HD video support (*.f4v)
    * Flash video embedding with HTML5 fallback - compatible with iOS and other mobile devices
    * Vimeo embedding
    * no-cookie YouTube site supported
    * HTML 5 audio and video with multiple source URLs and QuickTime fallback
    * more video and audio extensions in filelib.php
    * MP3 player colours customisable via CSS in themes
    * nomediaplugin class in a tag prevents media embedding
2011-03-12 17:42:52 +01:00
Eloy Lafuente (stronk7)
102cb3c1a6 Merge branch 'w07_MDL-26294_20_byteserving' of git://github.com/skodak/moodle 2011-02-14 02:08:06 +01:00
Petr Skoda
dd3b7e7dfc MDL-26294 fix byteserving regression
Credit goes to James Mitchell.
2011-02-12 20:39:53 +01:00
Petr Skoda
9337cf32ca MDL-26329 fix incorrect draft url rewriting when slasharguments off
tinymce editor encodes '/' in the ?file= parameter, we have to decode %2F before doing our standard @@PLUGINFILE@@ processing.
2011-02-12 09:43:14 +01:00
Petr Skoda
893fe4b6b2 MDL-26069 detect missing file postprocessing 2011-01-29 17:50:12 +01:00
Petr Skoda
c4cef1fe39 MDL-25314 weaker misconfiguration detection
seems like there are too many problems in buffer flushing in different PHP/browser configurations; flushing the buffers after all headers are sent, this is the safest way
2010-11-20 11:39:11 +00:00
Petr Skoda
116ee3e433 MDL-25314 coding style improvement 2010-11-20 03:56:34 +00:00
Petr Skoda
596c71156d MDL-25314 some more header diagnostics when preparing to send file 2010-11-20 03:55:53 +00:00
Petr Skoda
6e65fcd9b9 trying to work around gzip issue 2010-11-19 08:51:49 +00:00
Petr Skoda
cbad562eee MDL-25314 improved prevention of output buffering + detection of misconfigured servers
Scripts that do not want buffered output just define NO_OUTPUT_BUFFERING before including config.php.
The fileserving code now checks if the headers are already sent which detects misconfigured servers.
2010-11-19 03:40:43 +00:00
Petr Skoda
2f65797837 do not send stored file if nothing to send given 2010-10-18 11:39:57 +00:00
David Mudrak
d9ba4bd6ad MDL-24636 File API: Fixed calculation of the number of current files when merging with the draft area 2010-10-12 14:56:01 +00:00
Petr Skoda
6bdfef5da9 MDL-24321 switching to standard stdClass() 2010-09-21 08:54:01 +00:00
Petr Skoda
365a594107 MDL-24321 switching to stdClass in /lib/ 2010-09-21 08:07:44 +00:00
Rossiani Wijaya
ce5dc36e38 MDL-19927 - add media plugins support for ogg and ogv files. 2010-09-20 09:47:54 +00:00
Petr Skoda
eab8ed9fb7 fixed a few spelling errors in /admin/ 2010-09-17 10:27:26 +00:00