mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
1405f010b7
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();
90 lines
4.4 KiB
Plaintext
90 lines
4.4 KiB
Plaintext
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
|
|
|
|
=== 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()
|
|
|
|
=== 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.
|
|
|
|
=== 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().
|
|
|
|
* The function repository_attach_id() was removed, it was never used and was not useful.
|
|
|
|
* New functions send_relative_file() and supports_relative_file() to allow sending relative linked
|
|
files - see filesystem repository for example.
|
|
|
|
* 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.
|
|
|
|
* Deprecated const GETFILE_TIMEOUT, SYNCFILE_TIMEOUT and SYNCIMAGE_TIMEOUT and replaced them with
|
|
config variables repositorygetfiletimeout, repositorysyncfiletimeout and repositorysyncimagetimeout.
|
|
|
|
=== 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.
|
|
|
|
* 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...
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
=== 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.
|
|
|
|
=== 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.
|