Merge branch 'MDL-37122-master' of git://github.com/damyon/moodle
[moodle.git] / lib / upgrade.txt
blob703494daec94d228d6c30dade375457286d25589
1 This files describes API changes in core lbraries and APIs,
2 information provided here is intended especially for developers.
4 === 2.5 ===
6 * Function get_max_file_sizes now returns an option for (for example) "Course limit (500MB)" or
7   "Site limit (200MB)" when appropriate with the option set to 0. This function no longer returns
8   an option for 0 bytes. Existing code that was replacing the 0 option in the return
9   from this function with a more sensible message, can now use the return from this function directly.
10 * Functions responsible for output in course/lib.php are deprecated, the code is moved to
11   appropriate renderers: print_section_add_menus()
12   See functions' phpdocs in lib/deprecatedlib.php
13 * Function get_print_section_cm_text() is deprecated, replaced with methods in cm_info
14 * zip_packer may create empty zip archives, there is a new option to ignore
15   problematic files when creating archive
16 * The function delete_course_module was deprecated and has been replaced with
17   course_delete_module. The reason for this was because the function delete_course_module
18   only partially deletes data, so wherever it was called extra code was needed to
19   perform the whole deletion process. The function course_delete_module now takes care
20   of the whole process.
22 YUI changes:
23 * M.util.help_icon has been deprecated. Code should be updated to use moodle-core-popuphelp
24   instead. To do so, remove any existing JS calls to M.util.help_icon from your PHP and ensure
25   that your help link is placed in a span which has the class 'helplink'.
27 === 2.4 ===
29 * Pagelib: Numerous deprecated functions were removed as classes page_base, page_course
30   and page_generic_activity.
31 * use $CFG->googlemapkey3 instead of removed $CFG->googlemapkey and migrate to Google Maps API V3
32 * Function settings_navigation::add_course_editing_links() is completely removed
33 * function global_navigation::format_display_course_content() is removed completely (the
34   functionality is moved to course format class)
35 * in the function global_navigation::load_generic_course_sections() the argument $courseformat is
36   removed
37 * New component and itemid columns in groups_members table - this allows plugin to create protected
38   group memberships using 'xx_yy_allow_group_member_remove' callback and there is also a new restore
39   callback 'xx_yy_restore_group_member()'.
40 * New general role assignment restore plugin callback 'xx_yy_restore_role_assignment()'.
41 * functions get_generic_section_name(), get_all_sections(), add_mod_to_section(), get_all_mods()
42   are deprecated. See their phpdocs in lib/deprecatedlib.php on how to replace them
44 YUI changes:
45 * moodle-enrol-notification has been renamed to moodle-core-notification
46 * YUI2 code must now use 2in3, see http://yuilibrary.com/yui/docs/yui/yui-yui2.html
47 * M.util.init_select_autosubmit() and M.util.init_url_select() have been deprecated. Code using this should be updated
48   to use moodle-core-formautosubmit
50 Unit testing changes:
51 * output debugging() is not sent to standard output any more,
52   use $this->assertDebuggingCalled(), $this->assertDebuggingNotCalled(),
53   $this->getDebuggingMessages() or $this->assertResetDebugging() instead.
55 === 2.3 ===
57 Database layer changes:
58 * objects are not allowed in paramters of DML functions, use explicit casting to strings if necessary
60 Note:
61 * DDL and DML methods which were deprecated in 2.0 have now been removed, they will no longer produce
62 debug messages and will produce fatal errors
64 API changes:
66 * send_stored_file() has changed its interface
67 * deleted several resourcelib_embed_* functions from resourcelib.php
69 === 2.2 ===
71 removed unused libraries:
72 * odbc, base32, CodeSniffer, overlib, apd profiling, kses, Smarty, PEAR Console, swfobject, cssshover.htc, md5.js
74 API changes:
75 * new admin/tool plugin type
76 * new context API - old API is still available
77 * deleted users do not have context any more
78 * removed global search
81 === 2.1 ===
83 API changes:
84 * basic suport for restore from 1.9
85 * new mobile devices API
86 * new questions API
89 === 2.0 ===
91 API changes:
92 * new DML API - http://docs.moodle.org/dev/DML_functions
93 * new DDL API - http://docs.moodle.org/dev/DDL_functions
94 * new file API - http://docs.moodle.org/dev/File_API
95 * new $PAGE and $OUTPUT API
96 * new navigation API
97 * new theme API - http://docs.moodle.org/dev/Theme_changes_in_2.0
98 * new javascript API - http://docs.moodle.org/dev/JavaScript_usage_guide
99 * new portfolio API
100 * new local plugin type
101 * new translation support - http://lang.moodle.org
102 * new web service API
103 * new cohorts API
104 * new messaging API
105 * new rating API
106 * new comment API
107 * new sessions API
108 * new enrolment API
109 * new backup/restore API
110 * new blocks API
111 * new filters API
112 * improved plugin support (aka Frankenstyle)
113 * new registration and hub API
114 * new course completion API
115 * new plagiarism API
116 * changed blog API
117 * new text editor API
118 * new my moodle and profiles API