MDL-55445 core: New setting to host the logos
[moodle.git] / theme / upgrade.txt
1This files describes API changes in /theme/* themes,
2information provided here is intended especially for theme designer.
edb7d5ad 3
4=== 3.2 ===
6* A new core setting now enables admins to upload the logos of their site. Using the
7 following methods, themers can instantly support branding logos without the need
8 to implement specific theme settings:
9 * $OUTPUT->get_logo_url($maxwidth, $maxheight);
10 * $OUTPUT->get_compact_logo_url($maxwidth, $maxheight);
12=== 3.1 ===
14* A new search box for global search has been added to bootstrap and clean layout files, if
15 your theme is overwriting columns1.php, columns2.php or columns3.php you will need to add a
16 call to core_renderer::search_box to display it.
17* Notification templates have been renamed to better suit types of alert
18 rather than uses. The following changes have been made:
19 * notification_problem.mustache => notification_error.mustache
20 * notification_message => notification_info
21 * notification_redirect => notification_warning
22* Method core_course_renderer::course_section_cm_name() is split into two methods, custom themes that override
23 this method must be modified or otherwise editing functionality may become broken. This method is now also used by
24 social activities block and site menu block to display activities names.
4040c8b3 25
c7b73854 26=== 3.0 ===
28* The renderer function core_availability_renderer::multiple_messages was changed to
29 render_core_availability_multiple_messages, requiring a parameter of the new
30 \core_availability\multiple_messages type.
31* Meta description is now included in standard_head_html for homepage in bootstrapbase.
32 If your theme includes a meta description directly in a layout for the frontpage,
33 you will need to remove it or override the standard_head_html instead.
34* Themes Clean and More have been updated to use a new navbar_button function, which shows the
35 hamburguer icon (responsive menu) or not depending on custom and language menus settings;
36 themes extending bootstrapbase and overriding its layouts can call replace their "a.btn-navbar"
37 node for a call to this function.
c47f3803 38* Themes Clean and More page header logo only displays on front page and login page.
39* A new function navbar_home has been added to theme_clean and theme_more to display the navigation bar link
40 to the site home. Two new settings have been added to control if the link should be a small logo image, text
41 or both. It defaults to the current behaviour, only a text link.
c7b73854 42
43=== 2.9 ===
45* Themes Bootstrapbase, Clean and More have undergone some changes for RTL layouts see - MDL-48160.
c58891f1 47* Themes Clean amd More page header background logo, if loaded, no longer links to the home page.
48* Themes Clean and More have been updated to use the renderer full_header(). This renderer (when in a user context) displays a message button
49 and consequently the link to message users have been removed from various pages. It is recommended that theme developers use this
50 renderer to ensure that they do not suffer from a reduction in access to this feature.
51* $OUTPUT->context_header() has been introduced to produce headers similar to what full_header() creates. This renderer is used for creating
52 subsequent headers in a page. If provided with user information, this render will also display a message button like full_header().
c58891f1 53
c10fa5da 54=== 2.8 ===
c58891f1 55
56* Themes Base and Canvas layout/embedded.php has changed.
57 The div id="content" has been changed to id="page-content" - see MDL-47915.
58* All mod_assign CSS selectors have been qualified with ".path-mod-assign". This means any custom CSS
59 rules for mod_assign in a theme may need to be updated.
60* The following render methods were renamed, if you have overridden any of these you will need to update your renderer:
61 - report_log_renderer::render_report_log_renderable => report_log_renderer::render_report_log
62 - report_loglive_renderer::render_report_loglive_renderable => report_loglive_renderer::render_report_log
a2a4ad89 63* On calendar view screen the course selector and new event button have been swapped, custom CSS for .path-calendar might be affected.
64* The functions search_listing() and search_pagination() in the core_course_management_renderer class take the searched string
65 as an extra parameter - see MDL-46902.
f2b4b2ad 66* Themes with non-fixed headers must have the .navbar class in their navbar in order for floating headers in the grader report to work - see MDL-46658.
67* To accomodate the new gradebook, use of overflow: hidden or overflow-x: hidden CSS rules on DOM elements containing the
68 #user-grades table, visible at [Course administration -> Grades] is not recommended. Please use overflow: auto or
69 overflow: scroll instead, as this will handle medium to large courses with multiple activities better (more information available at ).
70* The new user menu can be added to themes by calling $OUTPUT->user_menu(); we recommend doing so in a backwards-compatible way (see for more information).
c10fa5da 71
72=== 2.7 ===
74* CSS related functions in theme class and csslib.php were refactored, addons that are
75 using this private API need to be updated
ba55be91 76* Please update your css to use 'tr:nth-of-type(odd/even)' instead of '.r0/.r1' to apply tr specific css for various tables.
77 These classes are deprecated now and will be removed in Moodle 2.9. This has done to better support styling tables that will be altered by JavaScript.
78 Here is an example to update your css:
79 Old code:
80 table.generaltable .r0 {background-color: #F0F0F0;}
81 table.generaltable .r1 {background-color: #F0F0F0;}
82 New code:
98396c23 83 table.generaltable > tbody > tr:nth-of-type(even) {background-color: #F0F0F0;}
ba55be91 84 table.generaltable > tbody > tr:nth-of-type(odd) {background-color: #F0F0F0;}
6b216432 85
86Removed themes:
87* afterburner, anomaly, arialist, binarius, boxxie, brick, formal_white, formfactor, fusion, leatherbound,
88 magazine, nimble, nonzero, overlay, serenity, sky_high, splash, standard and standardold have been removed.
89 During the upgrade process the themes will be uninstalled and all their settings will be deleted.
90 If you wish to keep your theme and its settings, download it from and put it back in
91 the theme/ directory BEFORE UPGRADING.
6b216432 92
94* z-index on #dock has been adjusted from 11000 to 5000 to prevent overlapping issues with fullscreen TinyMCE in Base theme.
699e2fd0 96=== 2.6 ===
3b42864d 97
98Removed themes:
99* "My Mobile" theme has been removed (see MDL-40874).
100 During the upgrade process "My Mobile" theme will be uninstalled and all its settings will be deleted.
101 "My Mobile" theme and its extending themes will fallback to the mobile friendly "Clean" theme.
102 If you wish to keep "My Mobile" theme and its settings, BEFORE UPGRADING you can copy the files from the
103 unmaintained plugin into theme/mymobile.
104 The unmaintained plugin can be downloaded at
699e2fd0 105Notes:
faf6010b 106* There have been several changes made to the classes used on headings throughout Moodle.
107 This was done as per the Moodle HTML guidelines. h1 and h2 elements should have no classes, h3 and lower headings
108 may have descriptive classes only (any classes must properly describe the relation between the header and its content).
699e2fd0 109* The parameters value for the following functions have been modified: core_renderer::heading() and core_renderer::heading_with_help().
3b42864d 110 This means that headings using the default options will no longer have the class "main" which was the previous default.
d61c96b6 111* The file picker and activity chooser have been converted to use M.core.dialogue. This means the styles
112 for these elements have changed in the base and bootstrapbase themes and you will need to copy the new styles
113 if you are not inheriting from either one of these themes.
b4c6b42e 114* For the themes based on bootstrapbase please also read theme/bootstrapbase/upgrade.txt
115* 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
116 extend base, canvas, or clean then you will need to style for this new component within your theme.
117* The maintenance layout now has a special renderer that extends the core_renderer in order to prevent some methods from interacting
118 with the database. Please be aware that for the maintenance layout some methods now always return an empty string.
119 This has been done because it is important that during maintenance routines we don't show any links, interact with the database,
120 or interact with caches as doing so may lead to errors,
121 Please see the maintenance renderer notes below for details on the functions affected.
123Renderer changes:
124* core_course_renderer::course_section_cm_edit_actions has two new optional arguments and now uses and action_menu component.
125* core_course_renderer::course_section_cm has been altered to call core_course_renderer::course_section_cm_edit_actions with the two new arguments.
126* core_renderer::block_controls has a new optional argument (the block id) and has been altered to use the new action_menu component.
127* core_renderer::block_header has been altered to give core_renderer::block_controls the new second argument, the block id.
128* core_renderer::action_link has a new argument, and optional icon that can be rendererd into the link.
faf6010b 130Selector changes:
131* Changes to the classes given to the header produced when rendering a single section within a course.
132 .section-navigation.header.headingblock => .section-navigation.navigationtitle
133* Changes to the classes used when producing the course information box that lists courses.
134 The name (h3|div} of both courses and categories used to have .name, for courses in the list this was changed to .coursename and for categories in the list this was changed to .categoryname.
135* Classes ".header and .headingblock" were removed from all front page content headings.
136* Classes ".headingblock .header .tag-header" were removed from the tag index page
138Maintenance renderer notes:
139When the maintenance layout is being used $OUTPUT will be an instance of core_renderer_maintenance.
140This renderer mimics the core_renderer except that the following functions always return an empty string.
cf9f5a17 141* core_renderer_maintenance::block
142* core_renderer_maintenance::blocks
143* core_renderer_maintenance::blocks_for_regions
144* core_renderer_maintenance::course_header
145* core_renderer_maintenance::course_footer
146* core_renderer_maintenance::course_content_header
147* core_renderer_maintenance::course_content_footer
148* core_renderer_maintenance::custom_menu
149* core_renderer_maintenance::file_picker
150* core_renderer_maintenance::htmllize_file_tree
151* core_renderer_maintenance::lang_menu
152* core_renderer_maintenance::login_info
153* core_renderer_maintenance::user_picture
155If you have overridden methods of the core_renderer in your theme and want those changes to be shown during times of maintenance you
156will also need to override the core_renderer_maintenance and copy your customisations from the core_renderer to that.
90160639 158=== 2.5.1 ===
161* Block drag and drop functionality has been improved so that it works regardless of what block regions you use
162 or how many block regions you have. In order to benefit from this improvement you must convert your calls from
163 $OUTPUT->blocks_for_region() to $OUTPUT->blocks.
165Optional changes:
166* Theme config can nominate block regions to swap if the user is using a rtl languages such as Hebrew.
167 $THEME->blockrtlmanipulations should be an associative array, the key is the original block region, and the
168 value should be where the blocks in that region should be displayed.
169* New $OUTPUT methods to replace code that was previously using $PAGE. Converting to these methods is optional
170 but highly recommended. Refer to the bootstrapbase layouts for examples.
171 - $OUTPUT->body_attributes() returns a string you can use for the body id and classes.
172 - $OUTPUT->blocks() returns HTML to display a block region and all of its blocks. This adds data attributes
173 that ensure drag and drop of blocks will work no matter what block regions or how many you have.
174 - $OUTPUT->page_heading() returns the page heading. Replaces $PAGE->heading.
175 - $OUTPUT->page_heading_button() returns the button to display with the heading. Replaces $page->button.
176 - $OUTPUT->page_doc_link() returns the link to moodle docs for the page. Replaces page_doc_link().
177 - $OUTPUT->page_heading_menu() returns the heading menu for the page. Replaces $PAGE->headingmenu.
178 - $OUTPUT->page_title() Returns the title to use for the head section.
179 - $OUTPUT->favicon() returns the URL to the favicon.
181Renderer changes:
182* core_renderer::navbar now returns an empty string if there are no navigation items to display.
183* core_renderer::custom_menu now adds a class "custom_menu" to the div that contains the HTML for the custom menu.
185=== 2.5 ===
187required changes:
188* Functions core_course_renderer::course_category_tree() and course_category_tree_category()
189 are deprecated
190* Significant changes in rendering of courses and categories listings, lots of CSS classes changed,
191 several functions such as print_courses(), print_whole_category_list(), print_category_info()
192 are moved to course renderer.
193 See
195DOM changes:
196* changed the h1 title in the help popup to a h2.
97dbc8f2 197* new setting $THEME->yuicssmodules = array('cssreset', 'cssfonts', 'cssgrids', 'cssbase'); which
12cb45f1 198 allows themes to use different CSS reset normalisers such as cssnormalize YUI module.
6e5d002e 199* Re-wrote the user profile views to definition lists.
200* Re-wrote the table for the course completion status block to use html_table - added some CSS classes to
201 the table in the process (see MDL-35608).
5581c618 202* Cancel buttons have the class btn-cancel.
203* Added a z-index for the div#dateselector-calendar-panel so that the calendar pop-up renders above
204 the filemanager when they overlap, ie. the course settings page (see MDL-39047).
205* Trivial change of CSS selectors used to display plugin status at the plugins overview
206 screen (#plugins-control-panel).
fc7defef 207
208Renderer changes:
209* Mymobile theme changed to support more verbose move-block-here descriptions.
211=== 2.4 ===
213required changes:
214* output course and course content header/footer that may be returned by course format (see MDL-36048)
e40bd746 215* span.completionprogress has been changed to a <div> and is not a float by default any more.
52b1ed5e 216
218* i/roles: Use t/assignroles instead
219* t/manual_item: Use i/manual_item instead
220* t/unlock_gray: Use t/locked instead
f2bba619 221* t/userblue: Previously used to unblock a user, use t/unblock.
222* c/course: Use i/courseevent instead
223* c/group: Use i/groupevent instead
224* c/site: Use i/siteevent instead
225* c/user: Use i/userevent instead
99938034 226* t/clear: Use t/check instead
227* i/cross_red_big: Use i/invalid or i/grade_incorrect
228* i/tick_green_big: Use i/valid or i/grade_correct
229* i/tick_amber_big: Use i/caution or i/grade_partiallycorrect
230* No more small versions of i/cross_red_small, i/tick_green_small and i/tick_amber_small, use their big equivalent.
501380a9 231* t/addgreen: Use t/add instead.
851d3b7a 232* i/approve: Use t/approve instead
fbb207c5 233
234optional changes:
235* new optional boolean parameter $withlinks for public function login_info() in lib/outputrenderers.php (MDL-31365)
236* new layout option "nologinlinks" and new page layout "secure" e.g. for safebrowser and securewindow (MDL-31365)
bb128107 237* new class 'iconlarge' for 24x24 icons.
238* new icons i/export and i/import (sized 16x16). Previously export and import actions used i/backup and i/restore.
239* new icon i/assignroles (sized 16x16), to prevent the use of i/roles which is 12x12.
240* new icon i/switchrole (sized 16x16), was previously using i/roles. Now is a copy of the new i/assignroles icon.
241* new icons i/enrolusers and t/enrolusers, previsouly i/users was used.
242* new icon t/cohorts (sized 12x12), to prevent the use of i/cohorts which is 16x16.
243* new icons t/sort_asc, t/sort_desc to use for ordering in table headers.
244* new class 'iconsort' for icons used for ordering in table headers.
fa9c0aab 245* new icons t/locked and t/unlocked (12x12) which should be used when there is no action associated to the icon.
0cddd851 246* new icons i/folder (16x16), monochrome equivalent to f/folder.
247* new icons t/addcontact, t/removecontact and t/messages, previously t/addgreen, t/delete and t/log were used in messaging.
248* new icons t/unblock and i/twoway.
5326675e 249* new icons i/courseevent, i/groupevent, i/siteevent and i/userevent (16x16) instead of c/* for calendar events.
250* new icon t/markasread (12x12) to replace t/clear used in forums.
251* new icon t/check (12x12) to replace t/clear which name does not reflect the icon meaning.
c22fbd38 252* 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.
253* new icons i/valid, i/caution and i/invalid for generic statuses.
254* new icons i/grade_correct, i/grade_partiallycorrect and i/grade_incorrect for grades.
851d3b7a 255* new icon t/approve (12x12).
0348468b 256* new icon t/contextmenu (12x12) for a monochrome version of i/menu.
ee362526 257
258=== 2.3 ===
260optional changes:
261* add new u/f3.png image when theme contains customised f1 and f2 default user images
263=== 2.2 ===
265required changes:
266* use new page content placeholder "echo $OUTPUT->main_content()" instead of "echo core_renderer::MAIN_CONTENT_TOKEN"
ee362526 267 see git commit: 3b3f302855d7621405a8b93e49bd399d67a998d7
2d0e682d 268* upgrade report selectors: search for "-course-report-" and replace with "-report-"