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