-
Bug
-
Resolution: Fixed
-
Blocker
-
2.3, 2.4
-
None
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MOODLE_23_STABLE
-
wip-
MDL-34290-master -
In the end of the day this issue grew quite large:
- Synchronisation for aliases shouldfast be very . We don't need to download the file in the most cases. We try to download images though because we need them in our filepool to generate thumbnails.
- There should be a timeout less than php script exection time for requests used in get_file/send_file
- In order to add timeout classes curl, oauth_helper, dropbox have been changed
- Get rid of cache_file and caching in curl, it is uncontrollable.
- When one file referencing an external file is synchronised, all other aliases to the same external file should also be synchronised (at the moment they remain frozen). Also attempt to auto synchronise newly created references
- Functions copy_to_area and get_file should receive as argument not the 'source' returned by repository listing but $reference = repository::get_file_reference($source). Because 'source' is not stored for aliases. In the most cases they are the same except Dropbox.
Dropbox aliases simply did not work if they were picked by another user - added new function to repository API to import the referenced file into the moodle filepool because files synchronisation does not guarantee this any more.
Dropbox repository improvements (except listed above):
- All references to external files must be created using 'shares' functionality of Dropbox API. The unique permanent link is created by dropbox for each file and we store this URL.
- existing links are converted to new style on the next synchronisation
- there is a parameter for dropbox repository that tells what is the maximum size of the files to cache in our filepool (default 1M). Files smaller than this limit are retrieved during synchronisation and in cron. For bigger files we just synchronise the file size.
- this branch also contains commit for
MDL-34665- displaying thumbnails and file size for browsing dropbox repository - Original for Dropbox files now contains information about user
- Added a 'manage' link for Dropbox
Also small improvements:
- Updated some phpdocs, especially in repository class
- In Equella repository I count number of failed attempts to access the server and after the 3rd do not synchronise files within this request any more.
- Re-wrote function repository::prepare_file to use the standard functions
- In Filesystem repository lowered the sync lifetime (no requests required here, we can do it almost realtime) and added missing function for displaying 'Original'
initial description:
At the moment functions such as stored_file::get_filesize() for external aliases invoke the file synchronisation which results in executing code in repository plugin before displaying the filearea contents. Errors in 3rd party code may significantly affect the core functionality
It looked fine at the beginning but resulted with the following situation:
http://tracker.moodle.org/browse/MDL-33700?focusedCommentId=168124#comment-168124
in this case the external repository website is down and synchronisation function waits forever and the whole php script dies because of timeout. In this particular case Equella plugin developers can set timeout in CURL request but we need to prevent such situations in repository API.
After discussion we decided that still the external repository functions should be called but all CURL requests must have a small timeout.
Besides if filesize can be retrieved without downloading the file we should just retrieve filesize.
cache_file class is excessive
- caused a regression
-
MDL-38091 Error on overwriting My private files with Oracle & SQL*Server
- Closed
-
MDL-35376 Shortcut/alias not working for Private file repo
- Closed
- Discovered while testing
-
MDL-35139 Can't navigate through the box.net directory structure with JS disabled
- Closed
- has a non-specific relationship to
-
MDL-35729 Let repository plugin generate file preview for external files
- Closed
- has been marked as being related by
-
MDL-33416 Get rid of referencelastsync and referencelifetime from the {files} table
- Closed
-
MDL-34185 File system repository linking does not work in 2.3
- Closed
-
MDL-33700 Equella plugin improvements
- Closed
-
MDL-53849 Configurable refresh time for filesystem repository file synchronization
- Closed
- will help resolve
-
MDL-34665 Dropbox should display thumbnails and return info about file size and date last modified
- Closed
-
MDL-33695 Process situation when source file from dropbox has been deleted
- Closed
-
MDL-33989 Improve Dropbox caching of file serving
- Closed