Moodle release 2.8.8
[moodle.git] / mod / upgrade.txt
blob472ea5039b8677a64970ee26adad3188c9d81dfc
1 This files describes API changes in /mod/* - activity modules,
2 information provided here is intended especially for developers.
4 === 2.8.8 ===
6 * Modules using rating component must implement a callback mod_x_rating_can_see_item_ratings(). Refer
7   to mod_forum_rating_can_see_item_ratings() for example.
9 === 2.8 ===
11 * Constant FEATURE_GROUPMEMBERSONLY is deprecated. Modules should remove this
12   constant from their module_supports() API function.
13 * $CFG->enablegroupmembersonly no longer exists.
15 === 2.7 ===
17 * modgrade form element has been redesigned and allows setting the maximum grade point higher than 100.
18 * The usage of $module in mod/xxx/version.php files is now deprecated. Please use
19   $plugin instead. The support for the legacy notation will be dropped in Moodle 2.10.
20 * xxx_get_view_actions() and xxx_get_post_actions() will be ignored by new logging system for
21   participation report. view_action and post_action will be detected by event's crud and edulevel.
22 * The functions xxx_user_outline() and xxx_user_complete() have been removed from the majority of core modules (see MDL-41286),
23   except for those that require unique functionality. These functions are used by the outline report, but now if they no longer
24   exist, the default behaviour is chosen, which supports the legacy and standard log storages introduced in 2.7 (see MDL-41266).
25   It is highly recommended you remove these functions from your module if they are simply performing the default behaviour.
27 === 2.6 ===
29 * Modules using the question bank MUST now declare their use of it with the xxx_supports()
30   flag FEATURE_USES_QUESTIONS.
31 * xxx_get_types() module callback can now return subtypes that have
32   a custom help text set. Also instead of array it can now return
33   MOD_SUBTYPE_NO_CHILDREN. This is optional and still defaults to prior
34   behavior. See get_module_metadata() in course/lib.php for details.
35 * shift_course_mod_dates() has been modified to accept optional mod instance id. If mod instance id is passed then
36   dates changed will happen only on specific module instance and not on all instances of that module in course.
38 === 2.5 ===
40 * support for 'mod/*' filters was removed
42 === 2.4 ===
44 new features:
46 * mod/xxx/adminlib.php may now include 'plugininfo_yoursubplugintype' class definition
47   used by plugin_manager; it is recommended to store extra admin settings classes in this file
49 optional - no changes needed:
51 * mod_lesson_renderer::header() now accepts an additional parameter $extrapagetitle
53 * mod/data/lib.php data_get_all_recordids() now has two new optional variables:  $selectdata and $params.
55 === 2.3 ===
57 required changes in code:
59 * define the capability mod/xxx:addinstance (and the corresponding lang string)
60   (unless your mod is a MOD_ARCHETYPE_SYSTEM).
61 * xxx_pluginfile() is now given the 7th parameter (hopefully the last one) that
62   contains additional options for the file serving. The array should be re-passed
63   to send_stored_file().
65 * most resourcelib_embed_* functions are replaced with core_media_renderer;
66   for an example, see mod/resource/locallib.php, resource_display_embed()
68 optional - no changes needed:
70 * add support for handling course drag and drop types - functions
71   xxx_dndupload_register() and xxx_dndupload_handle($uploadinfo) see:
72   http://docs.moodle.org/dev/Implementing_Course_drag_and_drop_upload_support_in_a_module
74 === 2.2 ===
76 required changes in code:
77 * fix missing parameter types in optional_param() and required_param()
78 * use new optional_param_array(), required_param_array() or clean_param_array() when dealing with array parameters
79 * core_text::asort() replaced by specialized core_collator::asort()
80 * use new make_temp_directory() and make_cache_directory()
83 === 2.1 ===
85 required changes in code:
86 * add new support for basic restore from 1.9
89 === 2.0 ===
91 required changes in code:
92 * use new DML syntax everywhere
93   (http://docs.moodle.org/dev/DML_functions)
94 * use new DDL syntax in db/upgrade.php
95   (http://docs.moodle.org/dev/DDL_functions)
96 * replace defaults.php by settings.php and db/install.php
97 * replace STATEMENTS section in db/install.xml with PHP code db/install.php or db/log.php
98 * move post installation code from lib.php into db/install.php
99 * move uninstallation code from lib.php to db/uninstall.php
100 * new mandatory naming of intro and introformat table fields in module tables,
101   the presence of these fields is indicated in xxx_plugin_supports()
102 * completely rewrite file handling
103   (http://docs.moodle.org/dev/File_API)
104 * rewrite backup/restore
105   (not finished yet)
106 * rewrite trusttext support - new db table columns needed
107 * migrate all module features from mod_edit.php form to lib.php/modulename_supports() function
108 * implement new gradebook support (legacy 1.8.x grading not supported anymore)
109 * migrate custom resource module subtypes into separate modules,
110   necessary only for custom plugins in mod/resource/
111 * use new $PAGE and $OUTPUT instead of old weblib functions
112 * theme changes: move plugin styles into mod/xxx/styles.css and use new css markers for images,
113                  move all images into new mod/xxx/pix/ directory and use new outputlib api
114                  move module icon to mod/xxx/pix/icon.gif
115                  old global $THEME is fully replaced by $OUTPUT
116                  create plugin renderers
117   (http://docs.moodle.org/dev/Theme_changes_in_2.0)
118 * migrate all javascript new coding style using YUI3+YUI2
119   (http://docs.moodle.org/dev/JavaScript_usage_guide)
120 * remove '_utf8' from lang pack names, use new {a} syntax
121 * replace helps with new 'xxx_hlp' strings
122 * please note the $plugin->requires in version.php has to be bigger than 2010000000,
123   otherwise the plugin is marked as outdated and upgrade is interrupted
125 optional - no changes needed in older code:
126 * settingstree.php replaced by settings.php - just unset the $settings if you want to make custom part of settings admin tree
127 * support for new mforms editor element and embedded files
128   (not finished yet)
129 * portfolio support
130   (http://docs.moodle.org/dev/Portfolio_API)
131 * course completion tracking support
132 * new navigation features
133 * new comments API
134   (http://docs.moodle.org/dev/Comments_2.0)
135 * new ratings API
136   (http://docs.moodle.org/dev/Ratings_2.0)