Merge branch 'MDL-42021-master' of git://github.com/FMCorz/moodle
[moodle.git] / theme / upgrade.txt
CommitLineData
0f704140
PS
1This files describes API changes in /theme/* themes,
2information provided here is intended especially for theme designer.
edb7d5ad 3
699e2fd0 4=== 2.6 ===
3b42864d 5
699e2fd0
RW
6Notes:
7* The parameters value for the following functions have been modified: core_renderer::heading() and core_renderer::heading_with_help().
3b42864d 8 This means that headings using the default options will no longer have the class "main" which was the previous default.
d61c96b6 9* The file picker and activity chooser have been converted to use M.core.dialogue. This means the styles
3b42864d
RW
10 for these elements have changed in the base and bootstrapbase themes and you will need to copy the new styles
11 if you are not inheriting from either one of these themes.
b4c6b42e 12* For the themes based on bootstrapbase please also read theme/bootstrapbase/upgrade.txt
e5de4933
SH
13* A new component action_menu is now used to display editing icons for courses and blocks within a drop down. If you have a theme that doesn't
14 extend base, canvas, or clean then you will need to style for this new component within your theme.
15
16Renderer changes:
17* core_course_renderer::course_section_cm_edit_actions has two new optional arguments and now uses and action_menu component.
18* core_course_renderer::course_section_cm has been altered to call core_course_renderer::course_section_cm_edit_actions with the two new arguments.
19* core_renderer::block_controls has a new optional argument (the block id) and has been altered to use the new action_menu component.
20* core_renderer::block_header has been altered to give core_renderer::block_controls the new second argument, the block id.
21* core_renderer::action_link has a new argument, and optional icon that can be rendererd into the link.
22
90160639 23=== 2.5.1 ===
d3e5a21e
SH
24
25Notes:
26* Block drag and drop functionality has been improved so that it works regardless of what block regions you use
27 or how many block regions you have. In order to benefit from this improvement you must convert your calls from
28 $OUTPUT->blocks_for_region() to $OUTPUT->blocks.
29
30Optional changes:
31* Theme config can nominate block regions to swap if the user is using a rtl languages such as Hebrew.
32 $THEME->blockrtlmanipulations should be an associative array, the key is the original block region, and the
33 value should be where the blocks in that region should be displayed.
34* New $OUTPUT methods to replace code that was previously using $PAGE. Converting to these methods is optional
35 but highly recommended. Refer to the bootstrapbase layouts for examples.
36 - $OUTPUT->body_attributes() returns a string you can use for the body id and classes.
37 - $OUTPUT->blocks() returns HTML to display a block region and all of its blocks. This adds data attributes
38 that ensure drag and drop of blocks will work no matter what block regions or how many you have.
39 - $OUTPUT->page_heading() returns the page heading. Replaces $PAGE->heading.
40 - $OUTPUT->page_heading_button() returns the button to display with the heading. Replaces $page->button.
41 - $OUTPUT->page_doc_link() returns the link to moodle docs for the page. Replaces page_doc_link().
42 - $OUTPUT->page_heading_menu() returns the heading menu for the page. Replaces $PAGE->headingmenu.
43 - $OUTPUT->page_title() Returns the title to use for the head section.
44 - $OUTPUT->favicon() returns the URL to the favicon.
45
46Renderer changes:
47* core_renderer::navbar now returns an empty string if there are no navigation items to display.
48* core_renderer::custom_menu now adds a class "custom_menu" to the div that contains the HTML for the custom menu.
49
fc7defef
JF
50=== 2.5 ===
51
09ae7ee0
MG
52required changes:
53* Functions core_course_renderer::course_category_tree() and course_category_tree_category()
54 are deprecated
55* Significant changes in rendering of courses and categories listings, lots of CSS classes changed,
56 several functions such as print_courses(), print_whole_category_list(), print_category_info()
57 are moved to course renderer.
58 See http://docs.moodle.org/dev/Courses_lists_upgrade_to_2.5
59
fc7defef
JF
60DOM changes:
61* changed the h1 title in the help popup to a h2.
97dbc8f2 62* new setting $THEME->yuicssmodules = array('cssreset', 'cssfonts', 'cssgrids', 'cssbase'); which
12cb45f1 63 allows themes to use different CSS reset normalisers such as cssnormalize YUI module.
6e5d002e 64* Re-wrote the user profile views to definition lists.
12cb45f1
MN
65* Re-wrote the table for the course completion status block to use html_table - added some CSS classes to
66 the table in the process (see MDL-35608).
5581c618 67* Cancel buttons have the class btn-cancel.
12cb45f1
MN
68* Added a z-index for the div#dateselector-calendar-panel so that the calendar pop-up renders above
69 the filemanager when they overlap, ie. the course settings page (see MDL-39047).
9074e478
DM
70* Trivial change of CSS selectors used to display plugin status at the plugins overview
71 screen (#plugins-control-panel).
fc7defef 72
6671fa73
JF
73Renderer changes:
74* Mymobile theme changed to support more verbose move-block-here descriptions.
75
2d0e682d
MV
76=== 2.4 ===
77
52b1ed5e
MG
78required changes:
79* output course and course content header/footer that may be returned by course format (see MDL-36048)
e40bd746 80* span.completionprogress has been changed to a <div> and is not a float by default any more.
52b1ed5e 81
fbb207c5
FM
82deprecation:
83* i/roles: Use t/assignroles instead
0cddd851
FM
84* t/manual_item: Use i/manual_item instead
85* t/unlock_gray: Use t/locked instead
f2bba619 86* t/userblue: Previously used to unblock a user, use t/unblock.
5326675e
BR
87* c/course: Use i/courseevent instead
88* c/group: Use i/groupevent instead
89* c/site: Use i/siteevent instead
90* c/user: Use i/userevent instead
99938034 91* t/clear: Use t/check instead
c3847443
FM
92* i/cross_red_big: Use i/invalid or i/grade_incorrect
93* i/tick_green_big: Use i/valid or i/grade_correct
94* i/tick_amber_big: Use i/caution or i/grade_partiallycorrect
95* No more small versions of i/cross_red_small, i/tick_green_small and i/tick_amber_small, use their big equivalent.
501380a9 96* t/addgreen: Use t/add instead.
851d3b7a 97* i/approve: Use t/approve instead
fbb207c5 98
2d0e682d
MV
99optional changes:
100* new optional boolean parameter $withlinks for public function login_info() in lib/outputrenderers.php (MDL-31365)
101* new layout option "nologinlinks" and new page layout "secure" e.g. for safebrowser and securewindow (MDL-31365)
bb128107 102* new class 'iconlarge' for 24x24 icons.
fbb207c5
FM
103* new icons i/export and i/import (sized 16x16). Previously export and import actions used i/backup and i/restore.
104* new icon i/assignroles (sized 16x16), to prevent the use of i/roles which is 12x12.
105* new icon i/switchrole (sized 16x16), was previously using i/roles. Now is a copy of the new i/assignroles icon.
c42651d6
FM
106* new icons i/enrolusers and t/enrolusers, previsouly i/users was used.
107* new icon t/cohorts (sized 12x12), to prevent the use of i/cohorts which is 16x16.
06b7ed0a
FM
108* new icons t/sort_asc, t/sort_desc to use for ordering in table headers.
109* new class 'iconsort' for icons used for ordering in table headers.
fa9c0aab 110* new icons t/locked and t/unlocked (12x12) which should be used when there is no action associated to the icon.
0cddd851 111* new icons i/folder (16x16), monochrome equivalent to f/folder.
f2bba619
FM
112* new icons t/addcontact, t/removecontact and t/messages, previously t/addgreen, t/delete and t/log were used in messaging.
113* new icons t/unblock and i/twoway.
5326675e 114* new icons i/courseevent, i/groupevent, i/siteevent and i/userevent (16x16) instead of c/* for calendar events.
99938034
FM
115* new icon t/markasread (12x12) to replace t/clear used in forums.
116* new icon t/check (12x12) to replace t/clear which name does not reflect the icon meaning.
c22fbd38 117* new classes 'icon-pre' and 'icon-post' supposedly to be used when the icon is positioned before or after the text. This is not really used yet, but it's a start towards some standardisation of the icon selectors.
c3847443
FM
118* new icons i/valid, i/caution and i/invalid for generic statuses.
119* new icons i/grade_correct, i/grade_partiallycorrect and i/grade_incorrect for grades.
851d3b7a 120* new icon t/approve (12x12).
0348468b 121* new icon t/contextmenu (12x12) for a monochrome version of i/menu.
ee362526 122
33d9f44b
PS
123=== 2.3 ===
124
125optional changes:
126* add new u/f3.png image when theme contains customised f1 and f2 default user images
127
0f704140
PS
128=== 2.2 ===
129
130required changes:
131* use new page content placeholder "echo $OUTPUT->main_content()" instead of "echo core_renderer::MAIN_CONTENT_TOKEN"
ee362526 132 see git commit: 3b3f302855d7621405a8b93e49bd399d67a998d7
2d0e682d 133* upgrade report selectors: search for "-course-report-" and replace with "-report-"