Commit Graph

49 Commits

Author SHA1 Message Date
Mark Johnson 3bc65933cf MDL-62488 filebrowser: Stop unit tests assuming number of categories 2018-05-17 16:01:26 +01:00
Jake Dallimore 54945fa728 MDL-35429 roles: teachers and managers can restore automated backups
Changes the default for the 'moodle/restore:viewautomatedfilearea'
cap from 'Not set' to 'Allow' for the teacher and manager role
archetypes.
2017-10-09 10:29:07 +08:00
Jake Dallimore 521d900f06 MDL-35429 restore: fixed downloading of automated backup files 2017-10-09 10:29:07 +08:00
Marina Glancy ed483bda8d MDL-35668 filebrowser: system context is similar to coursecat 2017-08-31 13:56:59 +08:00
Marina Glancy 84d815611c MDL-35668 filebrowser: perf improvements for courses
When searching for non-empty children first retrieve list of all non-empty
fileareas in modules and then check access for each of them. This will be
much faster than checking access for each module and then look for files
and areas inside this module.

Do the same with course file areas
2017-08-30 12:43:26 +08:00
Marina Glancy 10122f009e MDL-35668 filebrowser: small improvements to modules
- Store cm_info in file_info_context_module instead of object
- Use correct API calls to component_callback_exists
- Use human readable name of module type
2017-08-30 12:43:26 +08:00
Marina Glancy ade66228fa MDL-35668 filebrowser: cache enrolled courses 2017-08-30 12:43:26 +08:00
Marina Glancy 2d939622b8 MDL-35668 filebrowser: perf improvements to coursecat
- Preload contexts of subcategories and courses when retrieving their lists
- When there are enrolled courses in hidden subcategories retrieve them together with direct children courses
- Do not call browser->get_file_info - it retrieves the coursecat/course again, instead initialise the instance
of file_info_context_coursecat or file_info_context_course
2017-08-30 12:43:22 +08:00
Marina Glancy c524a6dce0 MDL-35668 filebrowser: unittests 2017-08-29 09:57:59 +08:00
Marina Glancy 07d4777816 MDL-33741 file_info: show courses in hidden categories
This also has a couple of bugfixes:
- file_info_context_system::get_children() was looking for courses with parent=0, it is impossible, block removed;
- file_info_context_coursecat::get_area_coursecat_description() was checking the wrong capability to view files in description
2016-08-01 09:12:36 +08:00
Mark Nelson 94f78b0d15 MDL-46927 core_files: fixed issue with system course restores
When clicking on 'Restore' next to a file in the 'Course
backup area' in the system context the message 'Sorry,
the requested file could not be found' was displayed.
This fix adds missing functionality to the class
'file_info_context_system' so that the file information
is correctly returned.
2015-06-01 23:08:40 -07:00
James Henestofel b8db22818a MDL-42068 Filepicker course listing use setting courselistshortname to show shortname and fullname 2013-10-04 13:09:10 -04:00
Petr Škoda 2f1e464a88 MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
Mark Nelson dd33f4af0a MDL-40462 libraries: deprecated get_course_context() 2013-07-11 13:28:45 +08:00
Rajesh Taneja 7f5b51c4e6 MDL-40404 Libraries: Deprecated get_parent_contextid() 2013-07-09 14:33:21 +08:00
Marina Glancy d1f8c1bd62 MDL-38708 Added course overview files (most often images) to courses 2013-04-02 11:08:21 +11:00
Dan Poltawski a1d9f433ec Merge branch 'w51_MDL-37301_m25_coursecatinfoas' of git://github.com/skodak/moodle 2013-01-08 10:26:44 +08:00
Petr Škoda dd9cd338cf MDL-37301 fix missing AS in select
This was breaking pg 8.3. Credit goes to Thomas Robb, thanks.
2012-12-26 22:25:24 +01:00
Petr Škoda 171215d465 MDL-37254 add missing AS keyword 2012-12-22 14:11:22 +01:00
Sam Hemelryk f7de90a74a MDL-33857 fixed up whitespace 2012-10-16 13:32:34 +08: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
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
Adrian Greeve b0c6dc1cac MDL-34465 - lib - Replacing get_context_instance with context_XXXX::instance (group 8) 2012-07-27 10:10:46 +08:00
Aparup Banerjee 7cacb2ef08 Merge branch 'wip-MDL-33297-master' of git://github.com/abgreeve/moodle 2012-06-21 17:34:57 +08:00
Adrian Greeve 35ca63c166 MDL-33297 - forum - workshop - glossary - data - Updated the check for files to allow students to see files they recently uploaded. 2012-06-20 10:49:18 +08:00
Marina Glancy 1778f310f3 MDL-33417 Show reference icon for files in filepicker 2012-06-19 11:15:51 +08:00
Marina Glancy 0b2bfbd1c6 MDL-33550 Correctly process situation when file reference source is missing
- do not die with fatal error if source file in moodle internal repository is missing;
- moved code duplication for moodle repositories into class repository (functions send_file, get_reference_details, get_file_by_reference, get_file_reference);
- update file status after repository::sync_external_file so we know that it is missing (or not missing anymore). Do not run this function more than once for file within one request;
- display readable name for Private Files and Server files with the new format;
- display broken icon in filemanager if we know that source is missing, display information (for admin) where it was located before: see repository::get_reference_details() and extending classes;
- removed unnecessary queries in stored_file::sync_external_file();
- syncronize files before displaying it's size in mod_resource, do not query  directly
2012-06-13 12:11:06 +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
Sam Hemelryk 849b9a6af7 MDL-33399 mixed: Fixed up calls to get_area_files that used empty sorts 2012-05-29 16:44:28 +12:00
Marina Glancy 9dbdf31f8c MDL-32867 Display a list of references pointing to the file in filemanager 2012-05-21 11:57:54 +08:00
David Mudrak 97b603c621 MDL-31901 fixed the name of user draft file serving handler
Files stored in user context, draft are must be served by draftfile.php,
not the pluginfile.php.
2012-05-21 11:57:53 +08:00
David Mudrak 0dbf6c88bb MDL-31901 file_info_stored now provides access to the wrapped stored_file's get_imageinfo() method 2012-05-21 11:57:53 +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
Eloy Lafuente (stronk7) 4ab641eeaa MDL-30973 Files API: Whitespace fixes 2012-03-01 00:56:23 +01:00
Dongsheng Cai d2b7803e5a MDL-30973 Files API, check and update DocBlock 2012-02-15 12:48:57 +08:00
Petr Skoda f6b07c4da5 MDL-27586 fix file_browser access control 2011-08-06 15:45:18 +02:00
Sam Hemelryk bac233d326 backup MDL-22184 Scheduled backups are now possible again through cron.
AMOS BEGIN
 MOV [move scheduledsetup,core_backup],[automatedsetup,core_backup]
 MOV [scheduledsettings,core_backup],[automatedsettings,core_backup]
 MOV [scheduledstorage,core_backup],[automatedstorage,core_backup]
 MOV [scheduledstoragehelp,core_backup],[automatedstoragehelp,core_backup]
 MOV [scheduledbackupsinactive,core],[automatedbackupsinactive,core_backup]
 MOV [scheduledbackupstatus,core],[automatedbackupstatus,core_backup]
 CPY [schedule,core],[automatedbackupschedule,core_backup]
 MOV [backupschedulehelp,core],[automatedbackupschedulehelp,core_backup]
AMOS END
2010-11-10 06:07:43 +00:00
jerome mouneyrac 6d153e67b4 webservice MDL-18655 add new capability moodle/user:viewalldetails allowing to see all user information. This capability is set up copying the current moodle/user:update assignations 2010-11-05 06:55:43 +00:00
Petr Skoda ac6f1a82f9 MDL-24321 switching to stdClass 2010-09-21 07:57:42 +00:00
Petr Skoda 08b4939be9 improved coding style, removing unused globals 2010-09-18 10:28:12 +00:00
Petr Skoda 0c3314ff16 fixed phpdocs and fatal error in delete method 2010-09-18 10:24:35 +00:00
Petr Skoda 16741cac51 MDL-24144 hiding of empty folders in repository/local 2010-09-12 12:29:32 +00:00
Petr Skoda 1bbdde1352 MDL-23613 fixed uses of format_string() in filebrowser 2010-08-02 13:05:49 +00:00
Petr Skoda 8b32a7aa1f MDL-23306 fixed broken area backup and potential recursion issues in standard mod areas 2010-07-18 09:05:13 +00:00
Petr Skoda 4299f38115 MDL-23156 fixed one more regression in legacy files 2010-07-09 21:08:02 +00:00
Petr Skoda d4848e8d6c MDL-23156 incorrect itemid test in legacy browser 2010-07-09 08:13:23 +00:00
Petr Skoda 64f93798d4 MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment 2010-07-03 13:37:13 +00:00