MDL-65788 tool_policy: Prevent two modals rendering for guests.
[moodle.git] / blocks / upgrade.txt
CommitLineData
795a08ad 1This files describes API changes in /blocks/* - activity modules,
2information provided here is intended especially for developers.
3
ef78cf8f
DM
4=== 3.7 ===
5* The block:addinstance capability is no longer required if the block can only be added to a dashboard.
6
1e44de35
RW
7=== 3.6 ===
8
9* The timeline view from block_myoverview has been split out into block_timeline.
0f8b2604 10* External function core_blocks::get_course_blocks now returns the block visible status and weight for ordering.
96d9a6e4
JL
11* New method added block_base::get_content_for_external(). It will return all the block contents rendered for external functions.
12 If your block is returning formatted content or provide files for download, you should override this method to use the
13 external_format_text, external_format_string functions for formatting or external_util::get_area_files for files.
14 See block_html as example.
cde3dc05
JL
15* External functions core_block::get_course_blocks and core_block::get_dashboard_blocks have a new parameter to indicate if
16 you want to receive the block contents.
1e44de35 17
557554f9 18=== 3.4 ===
19
20* The block_instances table now contains fields timecreated and timemodified. If third-party code
21 creates or updates these rows (without using the standard API), it should be modified to set
22 these fields as appropriate.
a96faa49 23* Blocks can now be included in Moodle global search, with some limitations (at present, the search
24 works only for blocks located directly on course pages or site home page). See the HTML block for
25 an example.
f3a3e234 26* Block block_messages is no longer a part of core.
557554f9 27
a7fc1af1
DP
28=== 3.3 ===
29
30* block_manager::get_required_by_theme_block_types() is no longer static.
4671ae63
RW
31* The plugin block_course_overview has been removed from core and is being replaced by block_myoverview.
32 During the upgrade process the block_course_overview block will be uninstalled and all its settings will be deleted.
33 If you wish to keep the block_course_overview block and its settings, download it from moodle.org and put it back in
db3b7909 34 the blocks/ directory BEFORE UPGRADING.
a7fc1af1 35
6759dc35
SL
36=== 3.1 ===
37
38* The collapsed class was removed from the navigation block to make it compatible with aria.
39* New aria attributes were added on the navigation block [aria-expanded="false"].
40* The tree JS handling were moved from YUI to AMD module (Jquery).
41
2c2171bd
FM
42=== 2.9 ===
43
157e267f 44* The obsolete method preferred_width() was removed (it was not doing anything)
53c74b18 45* Deprecated block_base::config_save as is not called anywhere and should not be used.
ad5c3230
NL
46* Added instance_copy() function to the block_base class. This function allows for block
47 specific data to be copied when a block is copied.
2c2171bd 48
cbed1284
AN
49=== 2.8 ===
50
51* The instance_config_print() function was removed. It was deprecated in
52 Moodle 2.0, but without debugging notices. Since it was no longer a part
53 of the code path, debugging notices would not have been displayed.
54* Deprecated functions were removed from the block_base class:
55** _print_block()
56** _print_shadow()
57** _title_html()
58** _add_edit_controls()
59** config_print()
60
bde002b8
PS
61=== 2.6 ===
62
63* Deprecated /admin/block.php was removed, make sure blocks are using settings.php instead.
64
df7d171f
MN
65=== 2.4 ===
66
67Created new capability 'blocks/xxx:myaddinstance' that determines whether a user can add
68a specific block to their My Home page. This capability was only defined for blocks where
69the applicable_formats function does not include "'my' => false" in the returned array,
70allowing it be added to the My Home page.
71
957fc845
DM
72=== 2.3 ===
73
74required changes in code:
75* block_xxx_pluginfile() is now given the 7th parameter (hopefully the last one) that
76 contains additional options for the file serving. The array should be re-passed
77 to send_stored_file().
ee362526 78
795a08ad 79=== 2.0 ===
80
81required changes in code:
82* use new DML syntax everywhere
83* use new DDL syntax in db/upgrade.php
84* replace defaults.php by settings.php and db/install.php
85* replace STATEMENTS section in db/install.xml by db/install.php
86* move post instalation code from install() method into db/install.php
87* completely rewrite file handling
88* rewrite backup/restore
78946b9b
PS
89* theme changes: move plugin styles into blocks/xxx/styles.css and use new css markers for images,
90 move all images into new blocks/xxx/pix/ directory and use new outputlib api
cbcc9852 91 old global $THEME is fully replaced by $OUTPUT
19538d8c 92* remove '_utf8' from language pack names, use new {$a} syntax in language packs
ee362526 93* use 'pluginname' lang pack identifier instead of 'blockname'
8571833f 94* move cron and version number into standard version.php
dbf9e4ba 95* removed support for old config_global.html, use settings.php
795a08ad 96