Merge branch 'w43_MDL-42438_m26_yuicss' of https://github.com/skodak/moodle
[moodle.git] / mod / upgrade.txt
CommitLineData
9c82ff2a 1This files describes API changes in /mod/* - activity modules,
2information provided here is intended especially for developers.
3
50ae8814
MN
4=== 2.6 ===
5
b07ef13b
DP
6* Modules using the question bank MUST now declare their use of it with the xxx_supports()
7 flag FEATURE_USES_QUESTIONS.
50ae8814
MN
8* xxx_get_types() module callback can now return subtypes that have
9 a custom help text set. Also instead of array it can now return
10 MOD_SUBTYPE_NO_CHILDREN. This is optional and still defaults to prior
11 behavior. See get_module_metadata() in course/lib.php for details.
9c82ff2a 12
0662bd67
PS
13=== 2.5 ===
14
15* support for 'mod/*' filters was removed
16
7d59d8da
PS
17=== 2.4 ===
18
19new features:
20
21* mod/xxx/adminlib.php may now include 'plugininfo_yoursubplugintype' class definition
22 used by plugin_manager; it is recommended to store extra admin settings classes in this file
76fb0443 23
27affa26
AA
24optional - no changes needed:
25
26* mod_lesson_renderer::header() now accepts an additional parameter $extrapagetitle
7d59d8da 27
76fb0443
AG
28* mod/data/lib.php data_get_all_recordids() now has two new optional variables: $selectdata and $params.
29
0f0c0228
TH
30=== 2.3 ===
31
32required changes in code:
daefd6eb 33
0f0c0228
TH
34* define the capability mod/xxx:addinstance (and the corresponding lang string)
35 (unless your mod is a MOD_ARCHETYPE_SYSTEM).
261cbbac
DM
36* xxx_pluginfile() is now given the 7th parameter (hopefully the last one) that
37 contains additional options for the file serving. The array should be re-passed
38 to send_stored_file().
0f0c0228 39
daefd6eb 40* most resourcelib_embed_* functions are replaced with core_media_renderer;
41 for an example, see mod/resource/locallib.php, resource_display_embed()
42
652cc648
DS
43optional - no changes needed:
44
45* add support for handling course drag and drop types - functions
46 xxx_dndupload_register() and xxx_dndupload_handle($uploadinfo) see:
47 http://docs.moodle.org/dev/Implementing_Course_drag_and_drop_upload_support_in_a_module
0f0c0228 48
ee362526
PS
49=== 2.2 ===
50
51required changes in code:
52* fix missing parameter types in optional_param() and required_param()
53* use new optional_param_array(), required_param_array() or clean_param_array() when dealing with array parameters
2f1e464a 54* core_text::asort() replaced by specialized core_collator::asort()
ee362526
PS
55* use new make_temp_directory() and make_cache_directory()
56
57
58=== 2.1 ===
59
60required changes in code:
61* add new support for basic restore from 1.9
62
63
64=== 2.0 ===
44f2977c 65
9c82ff2a 66required changes in code:
67* use new DML syntax everywhere
728ebac7 68 (http://docs.moodle.org/dev/DML_functions)
9c82ff2a 69* use new DDL syntax in db/upgrade.php
728ebac7 70 (http://docs.moodle.org/dev/DDL_functions)
9c82ff2a 71* replace defaults.php by settings.php and db/install.php
847400a7 72* replace STATEMENTS section in db/install.xml with PHP code db/install.php or db/log.php
9cb56578 73* move post installation code from lib.php into db/install.php
56f7ff74 74* move uninstallation code from lib.php to db/uninstall.php
8026a943
PS
75* new mandatory naming of intro and introformat table fields in module tables,
76 the presence of these fields is indicated in xxx_plugin_supports()
9c82ff2a 77* completely rewrite file handling
728ebac7 78 (http://docs.moodle.org/dev/File_API)
9c82ff2a 79* rewrite backup/restore
44f2977c 80 (not finished yet)
9cb56578
PS
81* rewrite trusttext support - new db table columns needed
82* migrate all module features from mod_edit.php form to lib.php/modulename_supports() function
398a160d 83* implement new gradebook support (legacy 1.8.x grading not supported anymore)
44f2977c
PS
84* migrate custom resource module subtypes into separate modules,
85 necessary only for custom plugins in mod/resource/
af34490a 86* use new $PAGE and $OUTPUT instead of old weblib functions
78946b9b
PS
87* theme changes: move plugin styles into mod/xxx/styles.css and use new css markers for images,
88 move all images into new mod/xxx/pix/ directory and use new outputlib api
89 move module icon to mod/xxx/pix/icon.gif
cbcc9852 90 old global $THEME is fully replaced by $OUTPUT
8026a943 91 create plugin renderers
728ebac7 92 (http://docs.moodle.org/dev/Theme_changes_in_2.0)
b7534190 93* migrate all javascript new coding style using YUI3+YUI2
728ebac7 94 (http://docs.moodle.org/dev/JavaScript_usage_guide)
2b0e098e
PS
95* remove '_utf8' from lang pack names, use new {a} syntax
96* replace helps with new 'xxx_hlp' strings
7070ca36 97* please note the $plugin->requires in version.php has to be bigger than 2010000000,
dae88219 98 otherwise the plugin is marked as outdated and upgrade is interrupted
9c82ff2a 99
100optional - no changes needed in older code:
dbf9e4ba 101* settingstree.php replaced by settings.php - just unset the $settings if you want to make custom part of settings admin tree
ff3ad2d9
PS
102* support for new mforms editor element and embedded files
103 (not finished yet)
9c82ff2a 104* portfolio support
728ebac7 105 (http://docs.moodle.org/dev/Portfolio_API)
9c82ff2a 106* course completion tracking support
8026a943
PS
107* new navigation features
108* new comments API
728ebac7 109 (http://docs.moodle.org/dev/Comments_2.0)
8026a943 110* new ratings API
728ebac7 111 (http://docs.moodle.org/dev/Ratings_2.0)
9c82ff2a 112