1 This files describes API changes in /mod/* - activity modules,
2 information provided here is intended especially for developers.
6 * Modules using the question bank MUST now declare their use of it with the xxx_supports()
7 flag FEATURE_USES_QUESTIONS.
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.
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.
17 * support for 'mod/*' filters was removed
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
26 optional - no changes needed:
28 * mod_lesson_renderer::header() now accepts an additional parameter $extrapagetitle
30 * mod/data/lib.php data_get_all_recordids() now has two new optional variables: $selectdata and $params.
34 required changes in code:
36 * define the capability mod/xxx:addinstance (and the corresponding lang string)
37 (unless your mod is a MOD_ARCHETYPE_SYSTEM).
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().
42 * most resourcelib_embed_* functions are replaced with core_media_renderer;
43 for an example, see mod/resource/locallib.php, resource_display_embed()
45 optional - no changes needed:
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
53 required 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
56 * core_text::asort() replaced by specialized core_collator::asort()
57 * use new make_temp_directory() and make_cache_directory()
62 required changes in code:
63 * add new support for basic restore from 1.9
68 required changes in code:
69 * use new DML syntax everywhere
70 (http://docs.moodle.org/dev/DML_functions)
71 * use new DDL syntax in db/upgrade.php
72 (http://docs.moodle.org/dev/DDL_functions)
73 * replace defaults.php by settings.php and db/install.php
74 * replace STATEMENTS section in db/install.xml with PHP code db/install.php or db/log.php
75 * move post installation code from lib.php into db/install.php
76 * move uninstallation code from lib.php to db/uninstall.php
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()
79 * completely rewrite file handling
80 (http://docs.moodle.org/dev/File_API)
81 * rewrite backup/restore
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
85 * implement new gradebook support (legacy 1.8.x grading not supported anymore)
86 * migrate custom resource module subtypes into separate modules,
87 necessary only for custom plugins in mod/resource/
88 * use new $PAGE and $OUTPUT instead of old weblib functions
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
92 old global $THEME is fully replaced by $OUTPUT
93 create plugin renderers
94 (http://docs.moodle.org/dev/Theme_changes_in_2.0)
95 * migrate all javascript new coding style using YUI3+YUI2
96 (http://docs.moodle.org/dev/JavaScript_usage_guide)
97 * remove '_utf8' from lang pack names, use new {a} syntax
98 * replace helps with new 'xxx_hlp' strings
99 * please note the $plugin->requires in version.php has to be bigger than 2010000000,
100 otherwise the plugin is marked as outdated and upgrade is interrupted
102 optional - no changes needed in older code:
103 * settingstree.php replaced by settings.php - just unset the $settings if you want to make custom part of settings admin tree
104 * support for new mforms editor element and embedded files
107 (http://docs.moodle.org/dev/Portfolio_API)
108 * course completion tracking support
109 * new navigation features
111 (http://docs.moodle.org/dev/Comments_2.0)
113 (http://docs.moodle.org/dev/Ratings_2.0)