The repository_skydrive has been removed from core. Methods for
importing files from skydrive to onedrive repository have been
deprecated and will be completely removed in Moodle 4.4.
For historical reasons repositories need to call add_file_to_pool
to sync file records. However now that a before_file_created hook
has been added additional information is needed by add_file_to_pool.
Ideally add_file_to_pool and friends will become private/protected,
so we need to remove all uses of it in core.
This patch adds some new methods to the file class to allow syncing
to be managed internally by the file and the file_storage class.
The SDK that this plugin was designed around is not compatible with recent
versions of Alfresco so the decisio has been made to move the repository to
the plugins database.
This commits removes stuff from different upgradelib files, used
exclusively by the already deleted upgrade steps. Given such
exclusivity it was not needed to proceed with a 2-phase deprecation
as far as the functions were 100% internal to upgrade.
This is the list of deleted functions, all them docummented in their
corresponding upgrade.txt files:
- repository_picasa_admin_upgrade_notification();
- repository_googledocs_admin_upgrade_notification();
- repository_boxnet_admin_upgrade_notification();
- repository_alfresco_admin_security_key_notice();
- qtype_essay_convert_to_html();
- portfolio_picasa_admin_upgrade_notification();
- portfolio_googledocs_admin_upgrade_notification();
- portfolio_boxnet_admin_upgrade_notification();
- mod_book_migrate_moddata_dir_to_legacy();
- mod_book_migrate_all_areas();
- mod_book_migrate_area();
- mod_assignment_pending_upgrades_notification();
- upgrade_mysql_fix_unsigned_and_lob_columns();
- upgrade_course_completion_remove_duplicates();
- upgrade_save_orphaned_questions();
- upgrade_rename_old_backup_files_using_shortname();
- upgrade_mssql_nvarcharmax();
- upgrade_mssql_varbinarymax();
- upgrade_fix_missing_root_folders();
- upgrade_course_modules_sequences();
- upgrade_grade_item_fix_sortorder();
- upgrade_availability_item();
The repository API defaults has a function, prepare_file, which is
responsible for creating a unique file to be used during the current
request.
This is usually used in the repository's get_file() function to store the
file before it is used elsewhere in the API to save the file to the
filestorage API.
It is also sometimes used to temporarily store credentials for the lifetime
of the session.
In all cases, this file is only expected to exist for the duration of the
session.
Switching to use of a per-request directory using make_request_directory()
ensures that the tempdir does not grow without control.
This commit also adds an upgrade step to remove all old temp directories
created by any repository currently installed.
Too many functions, too different parameters, unnecessary DB queries.
All repositories developed for Moodle 2.3-2.5 will continue to work.
Also get rid of DB field files_reference.lifetime, it is not used by
anybody except repository itself.
Fields files.referencelastsync and files.referencelifetime just waste the space and actually duplicate the fields
files_reference.lifetime and files_reference.lastsync
Previously, even when a specific setting had to be returned, this method
would return an empty array. Now, the behaviour is the same whether
some options or none are set: if the requested setting is not found
null is returned.