2012-06-25 15:48:57 +08:00
|
|
|
This files describes API changes in /repository/ repository system,
|
|
|
|
information provided here is intended especially for developers. Full
|
|
|
|
details of the repository API are available on Moodle docs:
|
|
|
|
http://docs.moodle.org/dev/Repository_API
|
|
|
|
|
2021-08-10 17:37:59 +02:00
|
|
|
=== 4.0 ===
|
2021-10-08 12:58:46 +02:00
|
|
|
* The repository_boxnet has been completely removed.
|
2021-08-10 17:37:59 +02:00
|
|
|
* The repository_picasa has been completely removed (Picasa is discontinued since 2016).
|
2021-09-20 15:47:51 +02:00
|
|
|
* The skydrive repository has been completely removed from core. It has been moved to the plugins database repository, so
|
|
|
|
it can still be installed as a third-party plugin.
|
2021-09-20 16:45:41 +02:00
|
|
|
* Methods can_import_skydrive_files() and import_skydrive_files have been deprecated from repository_onedrive. The feature For
|
|
|
|
importing files from repository_skydrive to repository_onedrive will be completely removed in Moodle 4.4.
|
2021-08-10 17:37:59 +02:00
|
|
|
|
2021-03-03 16:49:24 +08:00
|
|
|
=== 3.11 ===
|
|
|
|
* The Google Drive repository now includes a new rest API function 'shared_drives_list', which can be used to fetch
|
|
|
|
a list of existing shared drives.
|
2021-03-18 09:38:43 +08:00
|
|
|
* The Google Drive repository now supports browsing and searching for content from shared drives.
|
2021-03-18 14:03:20 +08:00
|
|
|
* The method build_breadcrumb() in repository/googledocs/lib.php has been deprecated, please use get_navigation()
|
|
|
|
from the googledocs repository content classes instead.
|
|
|
|
* The method build_node_path() in repository/googledocs/lib.php has been deprecated, please use
|
|
|
|
\repository_googledocs\helper::build_node_path() instead.
|
|
|
|
* The method explode_node_path() in repository/googledocs/lib.php has been deprecated, please use
|
|
|
|
\repository_googledocs\helper::explode_node_path() instead.
|
|
|
|
* The function query() in repository/googledocs/lib.php is deprecated, please use get_content_nodes() from the
|
|
|
|
googledocs repository content classes instead.
|
2021-03-03 16:49:24 +08:00
|
|
|
|
2017-08-07 15:27:46 +08:00
|
|
|
=== 3.4 ===
|
|
|
|
Repositories should no longer directly call file_system#add_file_to_pool or file_system#add_string_to_pool
|
|
|
|
instead they should call the stored_file method, set_synchronised_content_from_file or set_synchronised_content_from_string
|
|
|
|
|
2017-03-30 13:16:30 +08:00
|
|
|
=== 3.3 ===
|
|
|
|
The skydrive repository is deprecated - please migrate to the newer onedrive repository.
|
|
|
|
|
2016-06-23 12:29:13 +08:00
|
|
|
=== 3.2 ===
|
|
|
|
|
|
|
|
* The method repository::uses_post_requests() has been deprecated and must not be used anymore.
|
2016-07-11 14:50:09 +08:00
|
|
|
* The alfresco repository has been moved to the plugins database. It was
|
|
|
|
using an older version of the Alfresco SDK which is not compatible with recent versions of Alfresco.
|
2016-06-23 12:29:13 +08:00
|
|
|
|
2016-02-08 00:23:01 +01:00
|
|
|
=== 3.1 ===
|
|
|
|
|
|
|
|
* The following functions, previously used (exclusively) by upgrade steps are not available
|
|
|
|
anymore because of the upgrade cleanup performed for this version. See MDL-51580 for more info:
|
|
|
|
- repository_picasa_admin_upgrade_notification()
|
|
|
|
- repository_googledocs_admin_upgrade_notification()
|
|
|
|
- repository_boxnet_admin_upgrade_notification()
|
|
|
|
- repository_alfresco_admin_security_key_notice()
|
2016-01-29 12:12:48 +08:00
|
|
|
* The prepare_file() function will now return a file in a per-request directory which will
|
|
|
|
be automatically cleaned at the end of the request.
|
|
|
|
No modifications should be required as a result of this change.
|
2016-02-08 00:23:01 +01:00
|
|
|
|
2014-06-25 14:46:13 +08:00
|
|
|
=== 2.8 ===
|
|
|
|
|
|
|
|
* Repositories working with Moodle files must replace serialize() with json_encode() in the
|
|
|
|
attribute 'source' returned by get_listing(). If repository overrides file_is_accessible(),
|
|
|
|
get_file_reference() or get_file_source_info() they need to be changed too. See MDL-45616.
|
|
|
|
|
2013-07-09 16:57:37 +08:00
|
|
|
=== 2.6 ===
|
|
|
|
|
|
|
|
* get_option() now always return null when the first parameter ($config) is not empty, and
|
|
|
|
no value was found for this $config. Previously this could sometimes return an empty array().
|
2013-09-13 19:37:26 +10:00
|
|
|
|
2013-08-23 12:36:02 +08:00
|
|
|
* The function repository_attach_id() was removed, it was never used and was not useful.
|
2013-09-13 19:37:26 +10:00
|
|
|
|
2013-09-04 18:46:35 +12:00
|
|
|
* New functions send_relative_file() and supports_relative_file() to allow sending relative linked
|
|
|
|
files - see filesystem repository for example.
|
2013-09-13 19:37:26 +10:00
|
|
|
|
|
|
|
* DB fields files.referencelifetime, files.referencelastsync and files_reference.lifetime
|
|
|
|
are deleted. The last synchronization time is stored only in files_reference.lastsync
|
|
|
|
and lifetime is not stored in DB any more, each repository must decide for itself
|
|
|
|
when to synchronize the file in function repository::sync_reference().
|
|
|
|
|
|
|
|
* The following methods in class repository are deprecated: sync_external_file(),
|
|
|
|
get_file_by_reference(), get_reference_file_lifetime(), sync_individual_file() and
|
|
|
|
reset_caches(). Instead there is one method repository::sync_reference() - this simplifies
|
|
|
|
the repositories API and reduces the number of DB queries.
|
2013-07-09 16:57:37 +08:00
|
|
|
|
2013-10-11 14:34:15 +08:00
|
|
|
* Deprecated const GETFILE_TIMEOUT, SYNCFILE_TIMEOUT and SYNCIMAGE_TIMEOUT and replaced them with
|
|
|
|
config variables repositorygetfiletimeout, repositorysyncfiletimeout and repositorysyncimagetimeout.
|
|
|
|
|
2013-02-14 11:24:01 +08:00
|
|
|
=== 2.5 ===
|
|
|
|
|
|
|
|
* repository::append_suffix() has been deprecated, use repository::get_unused_filename() if you need
|
|
|
|
to get a file name which has not yet been used in the draft area.
|
|
|
|
|
2013-02-04 14:58:46 +08:00
|
|
|
* contains_private_data() is a new method to determine if a user 'logged in as' another user
|
|
|
|
can access the content of the repository. The default is to return True (no access).
|
|
|
|
|
|
|
|
* get_typename() returns the type of repository: dropbox, googledocs, etc...
|
|
|
|
|
2013-02-27 08:43:17 +08:00
|
|
|
* can_be_edited_by_user() encapsulates all the tests to make sure that the current user
|
|
|
|
has the rights to edit the instance of this repository.
|
|
|
|
|
2013-04-16 12:45:06 +10:00
|
|
|
* repository::get_instances() (used by filepicker and texteditor to populate the
|
|
|
|
list of available repositories) now calls repository constructor specifying the
|
|
|
|
context where repository will be used.
|
|
|
|
When checking permissions inside repository class use:
|
|
|
|
$this->instance->contextid - to find the context where repository was created;
|
|
|
|
$this->context - to find the current context where repository is used.
|
|
|
|
This also means that the same repository instance may now have different names when
|
|
|
|
called from different contexts.
|
|
|
|
Avoid calling repository::get_instance(), use repository::get_repository_by_id() instead.
|
|
|
|
|
2012-11-02 13:54:29 +08:00
|
|
|
=== 2.4 ===
|
|
|
|
|
|
|
|
* copy_to_area() can receive a new parameter called $areamaxbytes which controls the maximum
|
|
|
|
size of the area the files will be stored in.
|
|
|
|
|
|
|
|
* the repositories using the upload() method should implement a check for $areamaxbytes,
|
|
|
|
see repository/upload/lib.php upload() and process_upload() for an example on how handling it.
|
|
|
|
|
2012-06-25 15:48:57 +08:00
|
|
|
=== 2.3 ===
|
|
|
|
|
|
|
|
* instance_config_form() must now be declared static for php5.4 compatibility.
|
|
|
|
|
|
|
|
* get_listing() and search() file metadata details are now now more prominently
|
|
|
|
displayed in the interface. Dates and timestamos are now able to be sorted on in
|
|
|
|
the filepicker interface so plugin authors are asked to ensure:
|
|
|
|
- Dates are defined as UNIX timestamps
|
|
|
|
- Filesize is an integer in bytes
|
|
|
|
|
|
|
|
* It is recomended to define function get_file_source_info() to provide more rich
|
|
|
|
infromation about the source of a file.
|
|
|
|
|
|
|
|
* The API was extended to allow repositories can now support external references, please
|
|
|
|
see http://docs.moodle.org/dev/Repository_API for further details.
|