Merge branch 'wip_MDL-48420_m27_lasttypo' of https://github.com/skodak/moodle into...
[moodle.git] / theme / upgrade.txt
blob01d33174e62dec3b542a173a8bf963e178d77f0a
1 This files describes API changes in /theme/* themes,
2 information provided here is intended especially for theme designer.
4 === 2.7 ===
6 * CSS related functions in theme class and csslib.php were refactored, addons that are
7   using this private API need to be updated
8 * Please update your css to use 'tr:nth-of-type(odd/even)' instead of '.ro/.r1' to apply tr specific css for various tables.
9   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.
10   Here is an example to update your css:
11   Old code:
12     table.generaltable .r0 {background-color: #F0F0F0;}
13     table.generaltable .r1 {background-color: #F0F0F0;}
14   New code:
15     table.generaltable > tbody > tr:nth-of-type(odd) {background-color: #F0F0F0;}
16     table.generaltable > tbody > tr:nth-of-type(even) {background-color: #F0F0F0;}
18 Removed themes:
19 * afterburner, anomaly, arialist, binarius, boxxie, brick, formal_white, formfactor, fusion, leatherbound,
20   magazine, nimble, nonzero, overlay, serenity, sky_high, splash, standard and standardold have been removed.
21   During the upgrade process the themes will be uninstalled and all their settings will be deleted.
22   If you wish to keep your theme and its settings, download it from moodle.org and put it back in
23   the theme/ directory BEFORE UPGRADING.
25 Notes:
26 * z-index on #dock has been adjusted from 11000 to 5000 to prevent overlapping issues with fullscreen TinyMCE in Base theme.
28 === 2.6 ===
30 Removed themes:
31 * "My Mobile" theme has been removed (see MDL-40874).
32   During the upgrade process "My Mobile" theme will be uninstalled and all its settings will be deleted.
33   "My Mobile" theme and its extending themes will fallback to the mobile friendly "Clean" theme.
34   If you wish to keep "My Mobile" theme and its settings, BEFORE UPGRADING you can copy the files from the
35   unmaintained plugin into theme/mymobile.
36   The unmaintained plugin can be downloaded at https://moodle.org/plugins/pluginversion.php?id=4563
37 Notes:
38 * There have been several changes made to the classes used on headings throughout Moodle.
39   This was done as per the Moodle HTML guidelines. h1 and h2 elements should have no classes, h3 and lower headings
40   may have descriptive classes only (any classes must properly describe the relation between the header and its content).
41 * The parameters value for the following functions have been modified: core_renderer::heading() and core_renderer::heading_with_help().
42   This means that headings using the default options will no longer have the class "main" which was the previous default.
43 * The file picker and activity chooser have been converted to use M.core.dialogue. This means the styles
44   for these elements have changed in the base and bootstrapbase themes and you will need to copy the new styles
45   if you are not inheriting from either one of these themes.
46 * For the themes based on bootstrapbase please also read theme/bootstrapbase/upgrade.txt
47 * 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
48   extend base, canvas, or clean then you will need to style for this new component within your theme.
49 * The maintenance layout now has a special renderer that extends the core_renderer in order to prevent some methods from interacting
50   with the database. Please be aware that for the maintenance layout some methods now always return an empty string.
51   This has been done because it is important that during maintenance routines we don't show any links, interact with the database,
52   or interact with caches as doing so may lead to errors,
53   Please see the maintenance renderer notes below for details on the functions affected.
55 Renderer changes:
56 * core_course_renderer::course_section_cm_edit_actions has two new optional arguments and now uses and action_menu component.
57 * core_course_renderer::course_section_cm has been altered to call core_course_renderer::course_section_cm_edit_actions with the two new arguments.
58 * core_renderer::block_controls has a new optional argument (the block id) and has been altered to use the new action_menu component.
59 * core_renderer::block_header has been altered to give core_renderer::block_controls the new second argument, the block id.
60 * core_renderer::action_link has a new argument, and optional icon that can be rendererd into the link.
62 Selector changes:
63 * Changes to the classes given to the header produced when rendering a single section within a course.
64   .section-navigation.header.headingblock => .section-navigation.navigationtitle
65 * Changes to the classes used when producing the course information box that lists courses.
66   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.
67 * Classes ".header and .headingblock" were removed from all front page content headings.
68 * Classes ".headingblock .header .tag-header" were removed from the tag index page
70 Maintenance renderer notes:
71 When the maintenance layout is being used $OUTPUT will be an instance of core_renderer_maintenance.
72 This renderer mimics the core_renderer except that the following functions always return an empty string.
73 * core_renderer_maintenance::block
74 * core_renderer_maintenance::blocks
75 * core_renderer_maintenance::blocks_for_regions
76 * core_renderer_maintenance::course_header
77 * core_renderer_maintenance::course_footer
78 * core_renderer_maintenance::course_content_header
79 * core_renderer_maintenance::course_content_footer
80 * core_renderer_maintenance::custom_menu
81 * core_renderer_maintenance::file_picker
82 * core_renderer_maintenance::htmllize_file_tree
83 * core_renderer_maintenance::lang_menu
84 * core_renderer_maintenance::login_info
85 * core_renderer_maintenance::user_picture
87 If you have overridden methods of the core_renderer in your theme and want those changes to be shown during times of maintenance you
88 will also need to override the core_renderer_maintenance and copy your customisations from the core_renderer to that.
90 === 2.5.1 ===
92 Notes:
93 * Block drag and drop functionality has been improved so that it works regardless of what block regions you use
94   or how many block regions you have. In order to benefit from this improvement you must convert your calls from
95   $OUTPUT->blocks_for_region() to $OUTPUT->blocks.
97 Optional changes:
98 * Theme config can nominate block regions to swap if the user is using a rtl languages such as Hebrew.
99   $THEME->blockrtlmanipulations should be an associative array, the key is the original block region, and the
100   value should be where the blocks in that region should be displayed.
101 * New $OUTPUT methods to replace code that was previously using $PAGE. Converting to these methods is optional
102   but highly recommended. Refer to the bootstrapbase layouts for examples.
103   - $OUTPUT->body_attributes() returns a string you can use for the body id and classes.
104   - $OUTPUT->blocks() returns HTML to display a block region and all of its blocks. This adds data attributes
105     that ensure drag and drop of blocks will work no matter what block regions or how many you have.
106   - $OUTPUT->page_heading() returns the page heading. Replaces $PAGE->heading.
107   - $OUTPUT->page_heading_button() returns the button to display with the heading. Replaces $page->button.
108   - $OUTPUT->page_doc_link() returns the link to moodle docs for the page. Replaces page_doc_link().
109   - $OUTPUT->page_heading_menu() returns the heading menu for the page. Replaces $PAGE->headingmenu.
110   - $OUTPUT->page_title() Returns the title to use for the head section.
111   - $OUTPUT->favicon() returns the URL to the favicon.
113 Renderer changes:
114 * core_renderer::navbar now returns an empty string if there are no navigation items to display.
115 * core_renderer::custom_menu now adds a class "custom_menu" to the div that contains the HTML for the custom menu.
117 === 2.5 ===
119 required changes:
120 * Functions core_course_renderer::course_category_tree() and course_category_tree_category()
121   are deprecated
122 * Significant changes in rendering of courses and categories listings, lots of CSS classes changed,
123   several functions such as print_courses(), print_whole_category_list(), print_category_info()
124   are moved to course renderer.
125   See http://docs.moodle.org/dev/Courses_lists_upgrade_to_2.5
127 DOM changes:
128 * changed the h1 title in the help popup to a h2.
129 * new setting $THEME->yuicssmodules = array('cssreset', 'cssfonts', 'cssgrids', 'cssbase'); which
130   allows themes to use different CSS reset normalisers such as cssnormalize YUI module.
131 * Re-wrote the user profile views to definition lists.
132 * Re-wrote the table for the course completion status block to use html_table - added some CSS classes to
133   the table in the process (see MDL-35608).
134 * Cancel buttons have the class btn-cancel.
135 * Added a z-index for the div#dateselector-calendar-panel so that the calendar pop-up renders above
136   the filemanager when they overlap, ie. the course settings page (see MDL-39047).
137 * Trivial change of CSS selectors used to display plugin status at the plugins overview
138   screen (#plugins-control-panel).
140 Renderer changes:
141 * Mymobile theme changed to support more verbose move-block-here descriptions.
143 === 2.4 ===
145 required changes:
146 * output course and course content header/footer that may be returned by course format (see MDL-36048)
147 * span.completionprogress has been changed to a <div> and is not a float by default any more.
149 deprecation:
150 * i/roles: Use t/assignroles instead
151 * t/manual_item: Use i/manual_item instead
152 * t/unlock_gray: Use t/locked instead
153 * t/userblue: Previously used to unblock a user, use t/unblock.
154 * c/course: Use i/courseevent instead
155 * c/group: Use i/groupevent instead
156 * c/site: Use i/siteevent instead
157 * c/user: Use i/userevent instead
158 * t/clear: Use t/check instead
159 * i/cross_red_big: Use i/invalid or i/grade_incorrect
160 * i/tick_green_big: Use i/valid or i/grade_correct
161 * i/tick_amber_big: Use i/caution or i/grade_partiallycorrect
162 * No more small versions of i/cross_red_small, i/tick_green_small and i/tick_amber_small, use their big equivalent.
163 * t/addgreen: Use t/add instead.
164 * i/approve: Use t/approve instead
166 optional changes:
167 * new optional boolean parameter $withlinks for public function login_info() in lib/outputrenderers.php (MDL-31365)
168 * new layout option "nologinlinks" and new page layout "secure" e.g. for safebrowser and securewindow (MDL-31365)
169 * new class 'iconlarge' for 24x24 icons.
170 * new icons i/export and i/import (sized 16x16). Previously export and import actions used i/backup and i/restore.
171 * new icon i/assignroles (sized 16x16), to prevent the use of i/roles which is 12x12.
172 * new icon i/switchrole (sized 16x16), was previously using i/roles. Now is a copy of the new i/assignroles icon.
173 * new icons i/enrolusers and t/enrolusers, previsouly i/users was used.
174 * new icon t/cohorts (sized 12x12), to prevent the use of i/cohorts which is 16x16.
175 * new icons t/sort_asc, t/sort_desc to use for ordering in table headers.
176 * new class 'iconsort' for icons used for ordering in table headers.
177 * new icons t/locked and t/unlocked (12x12) which should be used when there is no action associated to the icon.
178 * new icons i/folder (16x16), monochrome equivalent to f/folder.
179 * new icons t/addcontact, t/removecontact and t/messages, previously t/addgreen, t/delete and t/log were used in messaging.
180 * new icons t/unblock and i/twoway.
181 * new icons i/courseevent, i/groupevent, i/siteevent and i/userevent (16x16) instead of c/* for calendar events.
182 * new icon t/markasread (12x12) to replace t/clear used in forums.
183 * new icon t/check (12x12) to replace t/clear which name does not reflect the icon meaning.
184 * 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.
185 * new icons i/valid, i/caution and i/invalid for generic statuses.
186 * new icons i/grade_correct, i/grade_partiallycorrect and i/grade_incorrect for grades.
187 * new icon t/approve (12x12).
188 * new icon t/contextmenu (12x12) for a monochrome version of i/menu.
190 === 2.3 ===
192 optional changes:
193 * add new u/f3.png image when theme contains customised f1 and f2 default user images
195 === 2.2 ===
197 required changes:
198 * use new page content placeholder "echo $OUTPUT->main_content()" instead of "echo core_renderer::MAIN_CONTENT_TOKEN"
199   see git commit: 3b3f302855d7621405a8b93e49bd399d67a998d7
200 * upgrade report selectors: search for "-course-report-" and replace with "-report-"