Commit Graph

33 Commits

Author SHA1 Message Date
Marina Glancy ed7e6a7356 MDL-33857 Increase performance of queries for Server files repository (small improvements) 2012-09-20 15:49:01 +08:00
Marina Glancy c84b70456a 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-09-11 10:48:13 +08:00
Marina Glancy 1778f310f3 MDL-33417 Show reference icon for files in filepicker 2012-06-19 11:15:51 +08:00
Marina Glancy be920f9acf MDL-33420 Enable references in Server files repository 2012-06-13 09:03:41 +08:00
Marina Glancy 9213f5476f MDL-33324 fixed bugs with icons in filepicker/filemanager treeview
- in treeview the icons for parent folders did not appear
- in treeview after refreshing (expanding subtrees) the image previews were replaced back to filetype icons
- also fixed a mistype in icon url in repository_local
2012-05-24 14:10:40 +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
David Mudrak 3333e7e20c MDL-33093 invalidate the thumbnail in the local browser's cache on update
This adds &oid= parameter to the URL of file preview images. The
parameter is supposed to be ignored by draftfile.php and pluginfile.php.
It just holds some unique identification of the original file's
revision. Currently, we use the timestamp of the most recent
modification of the original file.
2012-05-21 11:57:56 +08:00
David Mudrak dfad252c9e MDL-31901 repositories serving images from the filepool now provide preview details 2012-05-21 11:57:53 +08:00
Marina Glancy acd78d9d82 MDL-31901: removed accidentally commited testing code 2012-05-21 11:57:52 +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
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
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
Dan Poltawski 727dac2f34 Merge branch 'wip-MDL-27236-master' of git://github.com/marinaglancy/moodle 2012-03-21 14:51:40 +08:00
Marina Glancy e2652f1a31 MDL-27236: Server files, improve tree view
- Removed 'Private files' from 'Server files' repository;
- Show only non-empty directories (taking into account filetype filter);
- If there is only one non-empty filearea within a module, do not show it and skip the extra subdirectory level;
- If the user is not admin (does not have 'moodle/course:update' capability in system context), do not show course categories, just list available courses;
- Also when retrieving the course files capability to managefiles is checked before retrieving the modules list for performance tuning on sites with a lot of courses
2012-03-21 13:55:22 +08:00
Petr Skoda 58eb9b9f2a MDL-32094 fix E_STRICT problems in repository API 2012-03-18 18:31:32 +01:00
Petr Skoda aff24313be MDL-29401 introduce new frankenstyle PARAM types
New PARAM_COMPONENT, PARAM_AREA and PARAM_PLUGIN + fixing of hopefully all current incorrect parameter types. This should help with diagnosing of incorrectly named 3rd party plugins too.
2011-09-25 09:59:55 +02:00
Dan Poltawski 22fb538603 MDL-28605 repsitory/local - Prevent server running out of memory
Removing useless code..
2011-08-15 19:57:46 +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
Petr Skoda 16741cac51 MDL-24144 hiding of empty folders in repository/local 2010-09-12 12:29:32 +00:00
Dongsheng Cai f892da72a5 MDL-13766, stop using shorttitle in repository plugin 2010-09-09 07:36:20 +00:00
Petr Skoda d078f6d38e standardized PHPDocs package info 2010-09-06 11:29:21 +00:00
Petr Skoda ede7252234 MDL-23784 finally getting rid of all legacy .gif and .png extensions, yay! fixing issues with incorrect & in JS code 2010-08-12 20:37:24 +00:00
Petr Skoda 3136dc16fd MDL-23619 fixed wrong param cleaning + other fixing 2010-08-02 15:47:42 +00:00
Petr Skoda cba9ed29b2 MDL-23591 adding missing $fs 2010-07-30 14:49:50 +00:00
Dongsheng Cai a5adfa2658 MDL-23072, properly localised repository instance name 2010-07-27 09:03:54 +00:00
Dongsheng Cai 1311e4dd00 MDL-23268, throw error message instead of deleting existing file 2010-07-27 03:10:59 +00:00
Petr Skoda 3b61c7e6ea MDL-22991 improved copy_to_area api 2010-07-26 19:17:51 +00:00
Dongsheng Cai eed6f2e784 "MDL-23295, added navigation" 2010-07-20 04:54:57 +00:00
Dongsheng Cai be85f7ab94 "MDL-23307, server file plugin display current course files by default" 2010-07-19 17:44:23 +00:00
Dongsheng Cai 16f61c701e MDL-22991, fixed file api calls 2010-07-06 07:15:08 +00:00
Dongsheng Cai 955b6e09b8 MDL-22991, validate data that was encoded in base64 2010-07-06 05:33:43 +00:00
Dongsheng Cai e35194bec4 MDL-22982
1. rename repository.class to lib.php
2. fixed repository_callback.php
3. repository_ajax use moodle default exception handler
4. improve file_get_user_used_space performance
2010-07-05 07:27:49 +00:00