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