2009-01-12 21:13:28 +00:00
|
|
|
This files describes API changes in /mod/* - activity modules,
|
|
|
|
information provided here is intended especially for developers.
|
|
|
|
|
|
|
|
|
2012-12-30 17:02:18 +01:00
|
|
|
=== 2.5 ===
|
|
|
|
|
|
|
|
* support for 'mod/*' filters was removed
|
|
|
|
|
2012-08-18 12:55:02 +02:00
|
|
|
=== 2.4 ===
|
|
|
|
|
|
|
|
new features:
|
|
|
|
|
|
|
|
* mod/xxx/adminlib.php may now include 'plugininfo_yoursubplugintype' class definition
|
|
|
|
used by plugin_manager; it is recommended to store extra admin settings classes in this file
|
2012-10-02 15:52:00 +08:00
|
|
|
|
2012-09-14 10:04:38 +08:00
|
|
|
optional - no changes needed:
|
|
|
|
|
|
|
|
* mod_lesson_renderer::header() now accepts an additional parameter $extrapagetitle
|
2012-08-18 12:55:02 +02:00
|
|
|
|
2012-10-02 15:52:00 +08:00
|
|
|
* mod/data/lib.php data_get_all_recordids() now has two new optional variables: $selectdata and $params.
|
|
|
|
|
2012-03-08 12:00:38 +00:00
|
|
|
=== 2.3 ===
|
|
|
|
|
|
|
|
required changes in code:
|
MDL-29624 Media embedding system, part 1: new API and filter changes
Includes new API in medialib.php and core_media_renderer in outputrenderers.php.
Enable/disable settings moved from filter to systemwide appearance page.
Filter changed to use new API.
AMOS BEGIN
MOV [flashanimation,filter_mediaplugin],[flashanimation,core_media]
MOV [flashanimation_help,filter_mediaplugin],[flashanimation_desc,core_media]
MOV [flashvideo,filter_mediaplugin],[flashvideo,core_media]
MOV [flashvideo_help,filter_mediaplugin],[flashvideo_desc,core_media]
MOV [html5audio,filter_mediaplugin],[html5audio,core_media]
MOV [html5audio_help,filter_mediaplugin],[html5audio_desc,core_media]
MOV [html5video,filter_mediaplugin],[html5video,core_media]
MOV [html5video_help,filter_mediaplugin],[html5video_desc,core_media]
MOV [mp3audio,filter_mediaplugin],[mp3audio,core_media]
MOV [mp3audio_help,filter_mediaplugin],[mp3audio_desc,core_media]
MOV [legacyquicktime,filter_mediaplugin],[legacyquicktime,core_media]
MOV [legacyquicktime_help,filter_mediaplugin],[legacyquicktime_desc,core_media]
MOV [legacyreal,filter_mediaplugin],[legacyreal,core_media]
MOV [legacyreal_help,filter_mediaplugin],[legacyreal_desc,core_media]
MOV [legacywmp,filter_mediaplugin],[legacywmp,core_media]
MOV [legacywmp_help,filter_mediaplugin],[legacywmp_desc,core_media]
MOV [legacyheading,filter_mediaplugin],[legacyheading,core_media]
MOV [legacyheading_help,filter_mediaplugin],[legacyheading_desc,core_media]
MOV [sitevimeo,filter_mediaplugin],[sitevimeo,core_media]
MOV [sitevimeo_help,filter_mediaplugin],[sitevimeo_desc,core_media]
MOV [siteyoutube,filter_mediaplugin],[siteyoutube,core_media]
MOV [siteyoutube_help,filter_mediaplugin],[siteyoutube_desc,core_media]
AMOS END
2011-12-13 17:08:34 +00:00
|
|
|
|
2012-03-08 12:00:38 +00:00
|
|
|
* define the capability mod/xxx:addinstance (and the corresponding lang string)
|
|
|
|
(unless your mod is a MOD_ARCHETYPE_SYSTEM).
|
2012-04-18 15:56:09 +02:00
|
|
|
* xxx_pluginfile() is now given the 7th parameter (hopefully the last one) that
|
|
|
|
contains additional options for the file serving. The array should be re-passed
|
|
|
|
to send_stored_file().
|
2012-03-08 12:00:38 +00:00
|
|
|
|
MDL-29624 Media embedding system, part 1: new API and filter changes
Includes new API in medialib.php and core_media_renderer in outputrenderers.php.
Enable/disable settings moved from filter to systemwide appearance page.
Filter changed to use new API.
AMOS BEGIN
MOV [flashanimation,filter_mediaplugin],[flashanimation,core_media]
MOV [flashanimation_help,filter_mediaplugin],[flashanimation_desc,core_media]
MOV [flashvideo,filter_mediaplugin],[flashvideo,core_media]
MOV [flashvideo_help,filter_mediaplugin],[flashvideo_desc,core_media]
MOV [html5audio,filter_mediaplugin],[html5audio,core_media]
MOV [html5audio_help,filter_mediaplugin],[html5audio_desc,core_media]
MOV [html5video,filter_mediaplugin],[html5video,core_media]
MOV [html5video_help,filter_mediaplugin],[html5video_desc,core_media]
MOV [mp3audio,filter_mediaplugin],[mp3audio,core_media]
MOV [mp3audio_help,filter_mediaplugin],[mp3audio_desc,core_media]
MOV [legacyquicktime,filter_mediaplugin],[legacyquicktime,core_media]
MOV [legacyquicktime_help,filter_mediaplugin],[legacyquicktime_desc,core_media]
MOV [legacyreal,filter_mediaplugin],[legacyreal,core_media]
MOV [legacyreal_help,filter_mediaplugin],[legacyreal_desc,core_media]
MOV [legacywmp,filter_mediaplugin],[legacywmp,core_media]
MOV [legacywmp_help,filter_mediaplugin],[legacywmp_desc,core_media]
MOV [legacyheading,filter_mediaplugin],[legacyheading,core_media]
MOV [legacyheading_help,filter_mediaplugin],[legacyheading_desc,core_media]
MOV [sitevimeo,filter_mediaplugin],[sitevimeo,core_media]
MOV [sitevimeo_help,filter_mediaplugin],[sitevimeo_desc,core_media]
MOV [siteyoutube,filter_mediaplugin],[siteyoutube,core_media]
MOV [siteyoutube_help,filter_mediaplugin],[siteyoutube_desc,core_media]
AMOS END
2011-12-13 17:08:34 +00:00
|
|
|
* most resourcelib_embed_* functions are replaced with core_media_renderer;
|
|
|
|
for an example, see mod/resource/locallib.php, resource_display_embed()
|
|
|
|
|
2012-06-26 12:05:04 +01:00
|
|
|
optional - no changes needed:
|
|
|
|
|
|
|
|
* add support for handling course drag and drop types - functions
|
|
|
|
xxx_dndupload_register() and xxx_dndupload_handle($uploadinfo) see:
|
|
|
|
http://docs.moodle.org/dev/Implementing_Course_drag_and_drop_upload_support_in_a_module
|
2012-03-08 12:00:38 +00:00
|
|
|
|
2011-10-30 09:28:20 +01:00
|
|
|
=== 2.2 ===
|
|
|
|
|
|
|
|
required changes in code:
|
|
|
|
* fix missing parameter types in optional_param() and required_param()
|
|
|
|
* use new optional_param_array(), required_param_array() or clean_param_array() when dealing with array parameters
|
|
|
|
* textlib->asort() replaced by specialized collatorlib::asort()
|
|
|
|
* use new make_temp_directory() and make_cache_directory()
|
|
|
|
|
|
|
|
|
|
|
|
=== 2.1 ===
|
|
|
|
|
|
|
|
required changes in code:
|
|
|
|
* add new support for basic restore from 1.9
|
|
|
|
|
|
|
|
|
|
|
|
=== 2.0 ===
|
2010-03-24 09:20:20 +00:00
|
|
|
|
2009-01-12 21:13:28 +00:00
|
|
|
required changes in code:
|
|
|
|
* use new DML syntax everywhere
|
2011-07-04 11:21:48 +08:00
|
|
|
(http://docs.moodle.org/dev/DML_functions)
|
2009-01-12 21:13:28 +00:00
|
|
|
* use new DDL syntax in db/upgrade.php
|
2011-07-04 11:21:48 +08:00
|
|
|
(http://docs.moodle.org/dev/DDL_functions)
|
2009-01-12 21:13:28 +00:00
|
|
|
* replace defaults.php by settings.php and db/install.php
|
2010-08-03 10:08:25 +00:00
|
|
|
* replace STATEMENTS section in db/install.xml with PHP code db/install.php or db/log.php
|
2009-11-11 10:35:45 +00:00
|
|
|
* move post installation code from lib.php into db/install.php
|
2009-11-11 10:38:29 +00:00
|
|
|
* move uninstallation code from lib.php to db/uninstall.php
|
2010-03-24 09:10:14 +00:00
|
|
|
* new mandatory naming of intro and introformat table fields in module tables,
|
|
|
|
the presence of these fields is indicated in xxx_plugin_supports()
|
2009-01-12 21:13:28 +00:00
|
|
|
* completely rewrite file handling
|
2011-07-04 11:21:48 +08:00
|
|
|
(http://docs.moodle.org/dev/File_API)
|
2009-01-12 21:13:28 +00:00
|
|
|
* rewrite backup/restore
|
2010-03-24 09:20:20 +00:00
|
|
|
(not finished yet)
|
2009-11-11 10:35:45 +00:00
|
|
|
* rewrite trusttext support - new db table columns needed
|
|
|
|
* migrate all module features from mod_edit.php form to lib.php/modulename_supports() function
|
2009-04-22 21:03:38 +00:00
|
|
|
* implement new gradebook support (legacy 1.8.x grading not supported anymore)
|
2010-03-24 09:20:20 +00:00
|
|
|
* migrate custom resource module subtypes into separate modules,
|
|
|
|
necessary only for custom plugins in mod/resource/
|
2009-11-11 10:40:46 +00:00
|
|
|
* use new $PAGE and $OUTPUT instead of old weblib functions
|
2009-12-16 18:00:58 +00:00
|
|
|
* theme changes: move plugin styles into mod/xxx/styles.css and use new css markers for images,
|
|
|
|
move all images into new mod/xxx/pix/ directory and use new outputlib api
|
|
|
|
move module icon to mod/xxx/pix/icon.gif
|
2009-12-23 18:23:21 +00:00
|
|
|
old global $THEME is fully replaced by $OUTPUT
|
2010-03-24 09:10:14 +00:00
|
|
|
create plugin renderers
|
2011-07-04 11:21:48 +08:00
|
|
|
(http://docs.moodle.org/dev/Theme_changes_in_2.0)
|
2010-03-24 09:24:19 +00:00
|
|
|
* migrate all javascript new coding style using YUI3+YUI2
|
2011-07-04 11:21:48 +08:00
|
|
|
(http://docs.moodle.org/dev/JavaScript_usage_guide)
|
2010-04-13 21:42:19 +00:00
|
|
|
* remove '_utf8' from lang pack names, use new {a} syntax
|
|
|
|
* replace helps with new 'xxx_hlp' strings
|
2010-09-05 21:01:17 +00:00
|
|
|
* please note the $plugin->requires in version.php has to be bigger than 2010000000,
|
2010-09-05 21:05:20 +00:00
|
|
|
otherwise the plugin is marked as outdated and upgrade is interrupted
|
2009-01-12 21:13:28 +00:00
|
|
|
|
|
|
|
optional - no changes needed in older code:
|
2010-07-13 13:56:55 +00:00
|
|
|
* settingstree.php replaced by settings.php - just unset the $settings if you want to make custom part of settings admin tree
|
2010-03-24 10:07:44 +00:00
|
|
|
* support for new mforms editor element and embedded files
|
|
|
|
(not finished yet)
|
2009-01-12 21:13:28 +00:00
|
|
|
* portfolio support
|
2011-07-04 11:21:48 +08:00
|
|
|
(http://docs.moodle.org/dev/Portfolio_API)
|
2009-01-12 21:13:28 +00:00
|
|
|
* course completion tracking support
|
2010-03-24 09:10:14 +00:00
|
|
|
* new navigation features
|
|
|
|
* new comments API
|
2011-07-04 11:21:48 +08:00
|
|
|
(http://docs.moodle.org/dev/Comments_2.0)
|
2010-03-24 09:10:14 +00:00
|
|
|
* new ratings API
|
2011-07-04 11:21:48 +08:00
|
|
|
(http://docs.moodle.org/dev/Ratings_2.0)
|
2009-01-12 21:13:28 +00:00
|
|
|
|