Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
=== 4.5 Onwards ===
2
 
3
This file has been replaced by UPGRADING.md. See MDL-81125 for further information.
4
 
5
===
1 efrain 6
This files describes API changes in /repository/ repository system,
7
information provided here is intended especially for developers. Full
8
details of the repository API are available on Moodle docs:
9
https://moodledev.io/docs/apis/plugintypes/repository
10
 
11
=== 4.3 ===
12
* The base `repository` class method `get_file_size` has been deprecated and should not be used any more
13
 
14
=== 4.0 ===
15
* The repository_boxnet has been completely removed.
16
* The repository_picasa has been completely removed (Picasa is discontinued since 2016).
17
* The skydrive repository has been completely removed from core. It has been moved to the plugins database repository, so
18
it can still be installed as a third-party plugin.
19
* Methods can_import_skydrive_files() and import_skydrive_files have been deprecated from repository_onedrive. The feature For
20
importing files from repository_skydrive to repository_onedrive will be completely removed in Moodle 4.4.
21
 
22
=== 3.11 ===
23
* The Google Drive repository now includes a new rest API function 'shared_drives_list', which can be used to fetch
24
  a list of existing shared drives.
25
* The Google Drive repository now supports browsing and searching for content from shared drives.
26
* The method build_breadcrumb() in repository/googledocs/lib.php has been deprecated, please use get_navigation()
27
  from the googledocs repository content classes instead.
28
* The method build_node_path() in repository/googledocs/lib.php has been deprecated, please use
29
  \repository_googledocs\helper::build_node_path() instead.
30
* The method explode_node_path() in repository/googledocs/lib.php has been deprecated, please use
31
  \repository_googledocs\helper::explode_node_path() instead.
32
* The function query() in repository/googledocs/lib.php is deprecated, please use get_content_nodes() from the
33
  googledocs repository content classes instead.
34
 
35
=== 3.4 ===
36
Repositories should no longer directly call file_system#add_file_to_pool or file_system#add_string_to_pool
37
instead they should call the stored_file method, set_synchronised_content_from_file or set_synchronised_content_from_string
38
 
39
=== 3.3 ===
40
The skydrive repository is deprecated - please migrate to the newer onedrive repository.
41
 
42
=== 3.2 ===
43
 
44
* The method repository::uses_post_requests() has been deprecated and must not be used anymore.
45
* The alfresco repository has been moved to the plugins database. It was
46
  using an older version of the Alfresco SDK which is not compatible with recent versions of Alfresco.
47
 
48
=== 3.1 ===
49
 
50
* The following functions, previously used (exclusively) by upgrade steps are not available
51
  anymore because of the upgrade cleanup performed for this version. See MDL-51580 for more info:
52
    - repository_picasa_admin_upgrade_notification()
53
    - repository_googledocs_admin_upgrade_notification()
54
    - repository_boxnet_admin_upgrade_notification()
55
    - repository_alfresco_admin_security_key_notice()
56
* The prepare_file() function will now return a file in a per-request directory which will
57
  be automatically cleaned at the end of the request.
58
  No modifications should be required as a result of this change.
59
 
60
=== 2.8 ===
61
 
62
* Repositories working with Moodle files must replace serialize() with json_encode() in the
63
  attribute 'source' returned by get_listing(). If repository overrides file_is_accessible(),
64
  get_file_reference() or get_file_source_info() they need to be changed too. See MDL-45616.
65
 
66
=== 2.6 ===
67
 
68
* get_option() now always return null when the first parameter ($config) is not empty, and
69
  no value was found for this $config. Previously this could sometimes return an empty array().
70
 
71
* The function repository_attach_id() was removed, it was never used and was not useful.
72
 
73
* New functions send_relative_file() and supports_relative_file() to allow sending relative linked
74
  files - see filesystem repository for example.
75
 
76
* DB fields files.referencelifetime, files.referencelastsync and files_reference.lifetime
77
  are deleted. The last synchronization time is stored only in files_reference.lastsync
78
  and lifetime is not stored in DB any more, each repository must decide for itself
79
  when to synchronize the file in function repository::sync_reference().
80
 
81
* The following methods in class repository are deprecated: sync_external_file(),
82
  get_file_by_reference(), get_reference_file_lifetime(), sync_individual_file() and
83
  reset_caches(). Instead there is one method repository::sync_reference() - this simplifies
84
  the repositories API and reduces the number of DB queries.
85
 
86
* Deprecated const GETFILE_TIMEOUT, SYNCFILE_TIMEOUT and SYNCIMAGE_TIMEOUT and replaced them with
87
  config variables repositorygetfiletimeout, repositorysyncfiletimeout and repositorysyncimagetimeout.
88
 
89
=== 2.5 ===
90
 
91
* repository::append_suffix() has been deprecated, use repository::get_unused_filename() if you need
92
  to get a file name which has not yet been used in the draft area.
93
 
94
* contains_private_data() is a new method to determine if a user 'logged in as' another user
95
  can access the content of the repository. The default is to return True (no access).
96
 
97
* get_typename() returns the type of repository: dropbox, googledocs, etc...
98
 
99
* can_be_edited_by_user() encapsulates all the tests to make sure that the current user
100
  has the rights to edit the instance of this repository.
101
 
102
* repository::get_instances() (used by filepicker and texteditor to populate the
103
  list of available repositories) now calls repository constructor specifying the
104
  context where repository will be used.
105
  When checking permissions inside repository class use:
106
  $this->instance->contextid - to find the context where repository was created;
107
  $this->context - to find the current context where repository is used.
108
  This also means that the same repository instance may now have different names when
109
  called from different contexts.
110
  Avoid calling repository::get_instance(), use repository::get_repository_by_id() instead.
111
 
112
=== 2.4 ===
113
 
114
* copy_to_area() can receive a new parameter called $areamaxbytes which controls the maximum
115
  size of the area the files will be stored in.
116
 
117
* the repositories using the upload() method should implement a check for $areamaxbytes,
118
  see repository/upload/lib.php upload() and process_upload() for an example on how handling it.
119
 
120
=== 2.3 ===
121
 
122
* instance_config_form() must now be declared static for php5.4 compatibility.
123
 
124
* get_listing() and search() file metadata details are now now more prominently
125
  displayed in the interface. Dates and timestamos are now able to be sorted on in
126
  the filepicker interface so plugin authors are asked to ensure:
127
    - Dates are defined as UNIX timestamps
128
    - Filesize is an integer in bytes
129
 
130
* It is recomended to define function get_file_source_info() to provide more rich
131
  infromation about the source of a file.
132
 
133
* The API was extended to allow repositories can now support external references, please
134
  see https://moodledev.io/docs/apis/plugintypes/repository for further details.