1 |
efrain |
1 |
This files describes API changes in /theme/* themes,
|
|
|
2 |
information provided here is intended especially for theme designer.
|
|
|
3 |
|
|
|
4 |
=== 4.4.1 ===
|
|
|
5 |
* New `core/context_header` mustache template has been added. This template can be overridden by themes to modify the context header.
|
|
|
6 |
|
|
|
7 |
=== 4.4 ===
|
|
|
8 |
* Theme selection is now performed using cards and modals.
|
|
|
9 |
* The 'choosereadme' string for each theme is expected to be plain text. HTML content will not render when displayed in the modal.
|
|
|
10 |
* Theme selector page has been moved to admin/themeselector.php (previously theme/index.php)
|
|
|
11 |
* Moodleforms no longer use tag 'fieldset' for groups without labels (legends). Avoid targeting tag 'fieldset' in the theme CSS.
|
|
|
12 |
|
|
|
13 |
=== 4.3 ===
|
|
|
14 |
* The core_renderer::htmllize_file_tree method has been deprecated. This was missed before Moodle 2.0.
|
|
|
15 |
* CSS selectors using #categoryquestions have been changed to use .question-bank-table, see question/upgrade.txt
|
|
|
16 |
|
|
|
17 |
=== 4.2 ===
|
|
|
18 |
* The moodle-core-popuphelp YUI modal has been removed. It has not been actively used in Moodle since 3.3. It should be replaced with appropriate ESM/AMD JavaScript.
|
|
|
19 |
* The moodle-core-tooltip YUI modal has been removed. It should be replaced with appropriate ESM/AMD JavaScript.
|
|
|
20 |
* The Font Awesome library has been upgraded from 4.7 to 6.3.0. The free version included in Moodle supports the solid and regular styles.
|
|
|
21 |
* Device specific themes are no longer configurable in theme selection.
|
|
|
22 |
|
|
|
23 |
=== 4.1 ===
|
|
|
24 |
* The function core_course_renderer::course_modchooser() has been finally deprecated and can not be used anymore.
|
|
|
25 |
Please use core_course_renderer::course_activitychooser() instead.
|
|
|
26 |
* $OUTPUT->favicon() now returns the URL of the configurable favicon if present.
|
|
|
27 |
* The body tag include a class with module name specific for each activity E.g.: cm-type-page
|
|
|
28 |
|
|
|
29 |
=== 4.0 ===
|
|
|
30 |
* A new theme config 'removedprimarynavitems' allows a theme to customise primary navigation by specifying the list of items to remove.
|
|
|
31 |
* A new theme config 'usescourseindex' allows a theme to specify whether it implements and uses course index.
|
|
|
32 |
* A new theme setting 'unaddableblocks' allows admins to define the blocks that won't be displayed in the "Add a block" list.
|
|
|
33 |
|
|
|
34 |
=== 3.11 ===
|
|
|
35 |
* The classname 'viewmode-cobmined' in course/management.php has been changed to 'viewmode-combined'
|
|
|
36 |
|
|
|
37 |
=== 3.10 ===
|
|
|
38 |
* The Bootstrap legacy css utilities from Bootstrap 2 and 4alpha have been removed.
|
|
|
39 |
The syntax for the new Bootstrap 4.5 utility classes is {property}{sides}-{breakpoint}-{size} for sm, md, lg, and xl.
|
|
|
40 |
The size values are:
|
|
|
41 |
1: 0.25rem
|
|
|
42 |
2: 0.5rem
|
|
|
43 |
3: 1rem
|
|
|
44 |
4: 1.5rem
|
|
|
45 |
5: 2rem
|
|
|
46 |
6: 3rem
|
|
|
47 |
|
|
|
48 |
In Bootstrap 4alpa a spacing utility class '.m-l-1' would mean margin-left 1rem. With the new spacing classes it should now be '.ml-3'
|
|
|
49 |
|
|
|
50 |
These class names have changed:
|
|
|
51 |
.row-fluid is now .row
|
|
|
52 |
.text-error is now .text-danger
|
|
|
53 |
|
|
|
54 |
These classes should no longer be used:
|
|
|
55 |
.label .label-{type}, use .badge .badge-{type} instead
|
|
|
56 |
.tag .tag-{type}, use .badge .badge-{type} instead
|
|
|
57 |
.well, just set a border with .border and a background with .bg-light
|
|
|
58 |
|
|
|
59 |
=== 3.9 ===
|
|
|
60 |
|
|
|
61 |
* Add class .d-print-block to #page, #page-wrapper and #page content to fix Firefox printing problems
|
|
|
62 |
* A function to core_renderer has been added, secure_layout_login_info. This allows the boost and classic templates to
|
|
|
63 |
display the users full name in a secure layout.
|
|
|
64 |
* Secure layout in themes boost and classic have been modified to allow language selection as they now call the
|
|
|
65 |
output.secure_layout_language_menu function.
|
|
|
66 |
|
|
|
67 |
=== 3.8 ===
|
|
|
68 |
|
|
|
69 |
* Moodle does not produce chunked CSS anymore, instead an unique css fils is generated and served (MDL-55751). This implies:
|
|
|
70 |
* css_chunk_by_selector_count() has been removed.
|
|
|
71 |
* css_store_css(), theme_styles_get_filename() and theme_styles_get_etag() don't accept any chunk-related param anymore.
|
|
|
72 |
* The PHP Less compilier has now been removed from the core library.
|
|
|
73 |
Please consider migrating your theme to use SCSS.
|
|
|
74 |
* It is now possible to use sub-directories when creating mustache templates.
|
|
|
75 |
The standard rules for Level 2 namespaces also apply to templates.
|
|
|
76 |
The sub-directory used must be either an valid component, or placed inside a 'local' directory to ensure that it does not conflict with other components.
|
|
|
77 |
|
|
|
78 |
The following are all valid template names and locations in your theme:
|
|
|
79 |
theme_themename/columns2: theme/[themename]/templates/columns2.mustache
|
|
|
80 |
theme_themename/local/layouts/columns2: theme/[themename]/templates/local/layouts/columns2.mustache
|
|
|
81 |
|
|
|
82 |
The following are core templates, locations, and override locations in your theme:
|
|
|
83 |
core/modal: lib/templates/modal.mustache => theme/[themename]/templates/core/modal.mustache
|
|
|
84 |
mod_forum/forum_post: mod/forum/templates/forum_post.mustache => theme/[themename]/templates/mod_forum/forum_post.mustache
|
|
|
85 |
mod_forum/local/post/user: mod/forum/templates/local/post/user.mustache => theme/[themename]/templates/mod_forum/local/post/user.mustache
|
|
|
86 |
|
|
|
87 |
The following are _invalid_ template names and locations:
|
|
|
88 |
theme_themename/layouts/columns2: theme/[themename]/layouts/columns2.mustache
|
|
|
89 |
|
|
|
90 |
=== 3.7 ===
|
|
|
91 |
* The core/form_autocompelte_input template now has a `data-tags` attribute.
|
|
|
92 |
* Boost theme renderer overrides have now been migrated to core.
|
|
|
93 |
* Renderers that were overridden by Boost are now in Bootstrapbase
|
|
|
94 |
* Core templates in Boost have now moved into core
|
|
|
95 |
* Templates that were overridden by boost are now located in Bootstrapbase
|
|
|
96 |
* Themes bootstrapbase, clean & more have now been removed.
|
|
|
97 |
|
|
|
98 |
=== 3.6 ===
|
|
|
99 |
|
|
|
100 |
* A new callback has been added to the theme layout files allowing plugins to inject their content
|
|
|
101 |
into the page. For Boost it was added as a mustache variable "{{{ output.standard_after_main_region_html }}}" in
|
|
|
102 |
templates/columns1.mustache and templates/columns2.mustache. In bootstrapbase it was added as a
|
|
|
103 |
function call "$OUTPUT->standard_after_main_region_html()" in layout/columns1.php, layout/columns2.php.
|
|
|
104 |
and layout/columns3.php. Child themes not inheriting these templates should add the function call
|
|
|
105 |
after the div containing the main content region. Please refer to the messaging drawer UI for an example of
|
|
|
106 |
making use of this new feature.
|
|
|
107 |
* The body tag has various browser-specific classes for those cases where some
|
|
|
108 |
browser-sniffing is unavoidable. This used not to recognised Microsoft Edge,
|
|
|
109 |
but now it does (class 'edge'). Also, both Safari and Chrome used to be
|
|
|
110 |
class 'safari', but now there are separate classes 'safari' and 'chrome'.
|
|
|
111 |
The body's class should change to match the browser:
|
|
|
112 |
- Google Chrome (Mac & Window): The body class should change from safari to chrome.
|
|
|
113 |
- Google Chrome (Android) : The body class should change from safari, android to chrome, android.
|
|
|
114 |
- Microsoft Edge: The body class should change from safari to edge.
|
|
|
115 |
- Mobile safari: The class ios should exist, safari class should be removed.
|
|
|
116 |
* Remove class .safari styling from activity chooser dialog for theme boost and bootstrapbase.
|
|
|
117 |
* The following functions and classes have been finally deprecated and can not be used anymore:
|
|
|
118 |
* css_is_colour()
|
|
|
119 |
* css_is_width()
|
|
|
120 |
* css_sort_by_count()
|
|
|
121 |
* core_course_renderer::add_modchoosertoggle()
|
|
|
122 |
* class css_optimiser
|
|
|
123 |
|
|
|
124 |
=== 3.4 ===
|
|
|
125 |
|
|
|
126 |
* There was a mustache template login.mustache in /lib/templates/ rendering the login form
|
|
|
127 |
and a template with the same name in /theme/boost/templates/ rendering the pagelayout "login".
|
|
|
128 |
To prevent misunderstanding when overriding one of these templates in a Boost child theme,
|
|
|
129 |
the first one was renamed to loginform.mustache - see MDL-58970.
|
|
|
130 |
* The Boost flat navigation nodes now have several data-attributes which let plugin developers
|
|
|
131 |
access properties from the underlying navigation nodes in the browser - see MDL-59425.
|
|
|
132 |
* Navigation between activities via a previous and next link was added to Boost, Clean and Bootstrapbase. This
|
|
|
133 |
is made possible by a new function core_renderer->activity_navigation().
|
|
|
134 |
* Theme designers may now place the Reset tour on this page link where required by adding an empty
|
|
|
135 |
container (e.g. <div class="tool_usertours-resettourcontainer"></div>) to their layouts.
|
|
|
136 |
|
|
|
137 |
=== 3.3 ===
|
|
|
138 |
|
|
|
139 |
* As boost-based themes no longer use the moodle-core-popuphelp help popups, the javascript
|
|
|
140 |
setup for this module have been moved from core standard_head_html to the bootstrapbase
|
|
|
141 |
renderer. If your theme needs this javascript you will need to ensure the bootstrap renderer
|
|
|
142 |
is called, or require the JS yourself
|
|
|
143 |
|
|
|
144 |
=== 3.2 ===
|
|
|
145 |
|
|
|
146 |
* Removed themes: base, canvas
|
|
|
147 |
During the upgrade process the themes will be uninstalled and all their settings will be deleted.
|
|
|
148 |
If you wish to keep your theme and its settings, download it from moodle.org and put it back in
|
|
|
149 |
the theme/ directory BEFORE UPGRADING.
|
|
|
150 |
* Bootstrap 4 was added as part of a the new theme 'boost'.
|
|
|
151 |
* Some backwards and forwards compatibility has been added for different bootstrap versions.
|
|
|
152 |
This is to allow the same markup to work in "clean" and "boost" themes a lot of the time.
|
|
|
153 |
It is also to allow user text with bootstrap classes to keep working in the new theme.
|
|
|
154 |
* Using .dir-rtl for RTL styling is deprecated and should not be used any more. From now
|
|
|
155 |
the styles are automatically flipped when the language is right-to-left. However,
|
|
|
156 |
as this is not always perfect, you can define exceptions. Please refer to the documentation
|
|
|
157 |
of the tool RTLCSS-PHP for more information: https://github.com/moodlehq/rtlcss-php
|
|
|
158 |
* Themes can now automatically compile SCSS on the fly. This works the same way as it
|
|
|
159 |
does compiling LESS on the fly, effecitvely adding $THEME->scss to your config. The
|
|
|
160 |
latter can either be the name a SCSS file (without extension) in your theme's scss/ folder,
|
|
|
161 |
or a Closure which will return the main SCSS content.
|
|
|
162 |
* Two new callbacks allow themes to inject SCSS code before and after the content provided
|
|
|
163 |
by the SCSS file $THEME->scss. See $THEME->prescsscallback and $THEME->extrascsscallback.
|
|
|
164 |
* A new callback can be defined to post process the CSS using an object representation
|
|
|
165 |
of the CSS tree ($THEME->csstreepostprocess). This gives a lot more flexibility than a
|
|
|
166 |
simple find and replace. Refer to 'boost' for an example, and to PHP-CSS-Parser.
|
|
|
167 |
(https://github.com/sabberworm/PHP-CSS-Parser) for the API.
|
|
|
168 |
* A new core setting now enables admins to upload the logos of their site. Using the
|
|
|
169 |
following methods, themers can instantly support branding logos without the need
|
|
|
170 |
to implement specific theme settings:
|
|
|
171 |
* $OUTPUT->get_logo_url($maxwidth, $maxheight);
|
|
|
172 |
* $OUTPUT->get_compact_logo_url($maxwidth, $maxheight);
|
|
|
173 |
* The class .dir-ltr should not be used any more. To force LTR styles use the directive
|
|
|
174 |
to remove the rule when the language is RTL. See RTLCSS-PHP for more information.
|
|
|
175 |
* A new class .text-ltr may be used to force the direction to LTR. This is especially useful
|
|
|
176 |
for forms fields (numbers, emails, URLs must not be RTL'd), and for displaying code
|
|
|
177 |
snippets or configuration samples.
|
|
|
178 |
* A new theme config 'requiredblocks' allows a theme to define which blocks are deletable.
|
|
|
179 |
* You may no longer override the following core_course_renderer methods.
|
|
|
180 |
See course/upgrade.txt for more information:
|
|
|
181 |
- course_modchooser_module_types
|
|
|
182 |
- course_modchooser_module
|
|
|
183 |
- course_modchooser_title
|
|
|
184 |
* The question chooser now uses a renderable and a template, the following methods
|
|
|
185 |
have been deprecated in favour of core_question_bank_renderer::render_qbank_chooser().
|
|
|
186 |
- qbank_chooser
|
|
|
187 |
- qbank_chooser_types
|
|
|
188 |
- qbank_chooser_qtype
|
|
|
189 |
- qbank_chooser_title
|
|
|
190 |
* The 'css optimiser' has been removed. Developers are encouraged to use tools such as stylelint
|
|
|
191 |
to help optimise their css. Some functions and classes in lib/csslib.php (which was not for public use)
|
|
|
192 |
have been deprecated:
|
|
|
193 |
- css_is_colour
|
|
|
194 |
- css_is_width
|
|
|
195 |
- css_sort_by_count
|
|
|
196 |
- class css_optimiser no longer does anything.
|
|
|
197 |
* CLI svgtool.php has moved from theme/base/cli to admin/cli and paths should be relative to the new location.
|
|
|
198 |
* mod_chat will now display the 'course theme' option for all themes (previously it was only displayed on
|
|
|
199 |
bootstrap2 based themes).
|
|
|
200 |
* Theme can choose how to display "Add a block" control in $THEME->addblockposition, default value is
|
|
|
201 |
BLOCK_ADDBLOCK_POSITION_DEFAULT that displays it as a fake block in editing mode.
|
|
|
202 |
|
|
|
203 |
=== 3.1 ===
|
|
|
204 |
|
|
|
205 |
* A new search box for global search has been added to bootstrap and clean layout files, if
|
|
|
206 |
your theme is overwriting columns1.php, columns2.php or columns3.php you will need to add a
|
|
|
207 |
call to core_renderer::search_box to display it.
|
|
|
208 |
* Notification templates have been renamed to better suit types of alert
|
|
|
209 |
rather than uses. The following changes have been made:
|
|
|
210 |
* notification_problem.mustache => notification_error.mustache
|
|
|
211 |
* notification_message => notification_info
|
|
|
212 |
* notification_redirect => notification_warning
|
|
|
213 |
* Method core_course_renderer::course_section_cm_name() is split into two methods, custom themes that override
|
|
|
214 |
this method must be modified or otherwise editing functionality may become broken. This method is now also used by
|
|
|
215 |
social activities block and site menu block to display activities names.
|
|
|
216 |
|
|
|
217 |
=== 3.0 ===
|
|
|
218 |
|
|
|
219 |
* The renderer function core_availability_renderer::multiple_messages was changed to
|
|
|
220 |
render_core_availability_multiple_messages, requiring a parameter of the new
|
|
|
221 |
\core_availability\multiple_messages type.
|
|
|
222 |
* Meta description is now included in standard_head_html for homepage in bootstrapbase.
|
|
|
223 |
If your theme includes a meta description directly in a layout for the frontpage,
|
|
|
224 |
you will need to remove it or override the standard_head_html instead.
|
|
|
225 |
* Themes Clean and More have been updated to use a new navbar_button function, which shows the
|
|
|
226 |
hamburguer icon (responsive menu) or not depending on custom and language menus settings;
|
|
|
227 |
themes extending bootstrapbase and overriding its layouts can call replace their "a.btn-navbar"
|
|
|
228 |
node for a call to this function.
|
|
|
229 |
* Themes Clean and More page header logo only displays on front page and login page.
|
|
|
230 |
* A new function navbar_home has been added to theme_clean and theme_more to display the navigation bar link
|
|
|
231 |
to the site home. Two new settings have been added to control if the link should be a small logo image, text
|
|
|
232 |
or both. It defaults to the current behaviour, only a text link.
|
|
|
233 |
|
|
|
234 |
=== 2.9 ===
|
|
|
235 |
|
|
|
236 |
* Themes Bootstrapbase, Clean and More have undergone some changes for RTL layouts see - MDL-48160.
|
|
|
237 |
|
|
|
238 |
* Themes Clean amd More page header background logo, if loaded, no longer links to the home page.
|
|
|
239 |
* Themes Clean and More have been updated to use the renderer full_header(). This renderer (when in a user context) displays a message button
|
|
|
240 |
and consequently the link to message users have been removed from various pages. It is recommended that theme developers use this
|
|
|
241 |
renderer to ensure that they do not suffer from a reduction in access to this feature.
|
|
|
242 |
* $OUTPUT->context_header() has been introduced to produce headers similar to what full_header() creates. This renderer is used for creating
|
|
|
243 |
subsequent headers in a page. If provided with user information, this render will also display a message button like full_header().
|
|
|
244 |
|
|
|
245 |
=== 2.8 ===
|
|
|
246 |
|
|
|
247 |
* Themes Base and Canvas layout/embedded.php has changed.
|
|
|
248 |
The div id="content" has been changed to id="page-content" - see MDL-47915.
|
|
|
249 |
* All mod_assign CSS selectors have been qualified with ".path-mod-assign". This means any custom CSS
|
|
|
250 |
rules for mod_assign in a theme may need to be updated.
|
|
|
251 |
* The following render methods were renamed, if you have overridden any of these you will need to update your renderer:
|
|
|
252 |
- report_log_renderer::render_report_log_renderable => report_log_renderer::render_report_log
|
|
|
253 |
- report_loglive_renderer::render_report_loglive_renderable => report_loglive_renderer::render_report_log
|
|
|
254 |
* On calendar view screen the course selector and new event button have been swapped, custom CSS for .path-calendar might be affected.
|
|
|
255 |
* The functions search_listing() and search_pagination() in the core_course_management_renderer class take the searched string
|
|
|
256 |
as an extra parameter - see MDL-46902.
|
|
|
257 |
* 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.
|
|
|
258 |
* To accomodate the new gradebook, use of overflow: hidden or overflow-x: hidden CSS rules on DOM elements containing the
|
|
|
259 |
#user-grades table, visible at [Course administration -> Grades] is not recommended. Please use overflow: auto or
|
|
|
260 |
overflow: scroll instead, as this will handle medium to large courses with multiple activities better.
|
|
|
261 |
* The new user menu can be added to themes by calling $OUTPUT->user_menu(); we recommend doing so in a backwards-compatible way.
|
|
|
262 |
|
|
|
263 |
=== 2.7 ===
|
|
|
264 |
|
|
|
265 |
* CSS related functions in theme class and csslib.php were refactored, addons that are
|
|
|
266 |
using this private API need to be updated
|
|
|
267 |
* Please update your css to use 'tr:nth-of-type(odd/even)' instead of '.r0/.r1' to apply tr specific css for various tables.
|
|
|
268 |
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.
|
|
|
269 |
Here is an example to update your css:
|
|
|
270 |
Old code:
|
|
|
271 |
table.generaltable .r0 {background-color: #F0F0F0;}
|
|
|
272 |
table.generaltable .r1 {background-color: #F0F0F0;}
|
|
|
273 |
New code:
|
|
|
274 |
table.generaltable > tbody > tr:nth-of-type(even) {background-color: #F0F0F0;}
|
|
|
275 |
table.generaltable > tbody > tr:nth-of-type(odd) {background-color: #F0F0F0;}
|
|
|
276 |
|
|
|
277 |
Removed themes:
|
|
|
278 |
* afterburner, anomaly, arialist, binarius, boxxie, brick, formal_white, formfactor, fusion, leatherbound,
|
|
|
279 |
magazine, nimble, nonzero, overlay, serenity, sky_high, splash, standard and standardold have been removed.
|
|
|
280 |
During the upgrade process the themes will be uninstalled and all their settings will be deleted.
|
|
|
281 |
If you wish to keep your theme and its settings, download it from moodle.org and put it back in
|
|
|
282 |
the theme/ directory BEFORE UPGRADING.
|
|
|
283 |
|
|
|
284 |
Notes:
|
|
|
285 |
* z-index on #dock has been adjusted from 11000 to 5000 to prevent overlapping issues with fullscreen TinyMCE in Base theme.
|
|
|
286 |
|
|
|
287 |
=== 2.6 ===
|
|
|
288 |
|
|
|
289 |
Removed themes:
|
|
|
290 |
* "My Mobile" theme has been removed (see MDL-40874).
|
|
|
291 |
During the upgrade process "My Mobile" theme will be uninstalled and all its settings will be deleted.
|
|
|
292 |
"My Mobile" theme and its extending themes will fallback to the mobile friendly "Clean" theme.
|
|
|
293 |
If you wish to keep "My Mobile" theme and its settings, BEFORE UPGRADING you can copy the files from the
|
|
|
294 |
unmaintained plugin into theme/mymobile.
|
|
|
295 |
The unmaintained plugin can be downloaded at https://moodle.org/plugins/pluginversion.php?id=4563
|
|
|
296 |
Notes:
|
|
|
297 |
* There have been several changes made to the classes used on headings throughout Moodle.
|
|
|
298 |
This was done as per the Moodle HTML guidelines. h1 and h2 elements should have no classes, h3 and lower headings
|
|
|
299 |
may have descriptive classes only (any classes must properly describe the relation between the header and its content).
|
|
|
300 |
* The parameters value for the following functions have been modified: core_renderer::heading() and core_renderer::heading_with_help().
|
|
|
301 |
This means that headings using the default options will no longer have the class "main" which was the previous default.
|
|
|
302 |
* The file picker and activity chooser have been converted to use M.core.dialogue. This means the styles
|
|
|
303 |
for these elements have changed in the base and bootstrapbase themes and you will need to copy the new styles
|
|
|
304 |
if you are not inheriting from either one of these themes.
|
|
|
305 |
* For the themes based on bootstrapbase please also read theme/bootstrapbase/upgrade.txt
|
|
|
306 |
* 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
|
|
|
307 |
extend base, canvas, or clean then you will need to style for this new component within your theme.
|
|
|
308 |
* The maintenance layout now has a special renderer that extends the core_renderer in order to prevent some methods from interacting
|
|
|
309 |
with the database. Please be aware that for the maintenance layout some methods now always return an empty string.
|
|
|
310 |
This has been done because it is important that during maintenance routines we don't show any links, interact with the database,
|
|
|
311 |
or interact with caches as doing so may lead to errors,
|
|
|
312 |
Please see the maintenance renderer notes below for details on the functions affected.
|
|
|
313 |
|
|
|
314 |
Renderer changes:
|
|
|
315 |
* core_course_renderer::course_section_cm_edit_actions has two new optional arguments and now uses and action_menu component.
|
|
|
316 |
* core_course_renderer::course_section_cm has been altered to call core_course_renderer::course_section_cm_edit_actions with the two new arguments.
|
|
|
317 |
* core_renderer::block_controls has a new optional argument (the block id) and has been altered to use the new action_menu component.
|
|
|
318 |
* core_renderer::block_header has been altered to give core_renderer::block_controls the new second argument, the block id.
|
|
|
319 |
* core_renderer::action_link has a new argument, and optional icon that can be rendererd into the link.
|
|
|
320 |
|
|
|
321 |
Selector changes:
|
|
|
322 |
* Changes to the classes given to the header produced when rendering a single section within a course.
|
|
|
323 |
.section-navigation.header.headingblock => .section-navigation.navigationtitle
|
|
|
324 |
* Changes to the classes used when producing the course information box that lists courses.
|
|
|
325 |
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.
|
|
|
326 |
* Classes ".header and .headingblock" were removed from all front page content headings.
|
|
|
327 |
* Classes ".headingblock .header .tag-header" were removed from the tag index page
|
|
|
328 |
|
|
|
329 |
Maintenance renderer notes:
|
|
|
330 |
When the maintenance layout is being used $OUTPUT will be an instance of core_renderer_maintenance.
|
|
|
331 |
This renderer mimics the core_renderer except that the following functions always return an empty string.
|
|
|
332 |
* core_renderer_maintenance::block
|
|
|
333 |
* core_renderer_maintenance::blocks
|
|
|
334 |
* core_renderer_maintenance::blocks_for_regions
|
|
|
335 |
* core_renderer_maintenance::course_header
|
|
|
336 |
* core_renderer_maintenance::course_footer
|
|
|
337 |
* core_renderer_maintenance::course_content_header
|
|
|
338 |
* core_renderer_maintenance::course_content_footer
|
|
|
339 |
* core_renderer_maintenance::custom_menu
|
|
|
340 |
* core_renderer_maintenance::file_picker
|
|
|
341 |
* core_renderer_maintenance::htmllize_file_tree
|
|
|
342 |
* core_renderer_maintenance::lang_menu
|
|
|
343 |
* core_renderer_maintenance::login_info
|
|
|
344 |
* core_renderer_maintenance::user_picture
|
|
|
345 |
|
|
|
346 |
If you have overridden methods of the core_renderer in your theme and want those changes to be shown during times of maintenance you
|
|
|
347 |
will also need to override the core_renderer_maintenance and copy your customisations from the core_renderer to that.
|
|
|
348 |
|
|
|
349 |
=== 2.5.1 ===
|
|
|
350 |
|
|
|
351 |
Notes:
|
|
|
352 |
* Block drag and drop functionality has been improved so that it works regardless of what block regions you use
|
|
|
353 |
or how many block regions you have. In order to benefit from this improvement you must convert your calls from
|
|
|
354 |
$OUTPUT->blocks_for_region() to $OUTPUT->blocks.
|
|
|
355 |
|
|
|
356 |
Optional changes:
|
|
|
357 |
* Theme config can nominate block regions to swap if the user is using a rtl languages such as Hebrew.
|
|
|
358 |
$THEME->blockrtlmanipulations should be an associative array, the key is the original block region, and the
|
|
|
359 |
value should be where the blocks in that region should be displayed.
|
|
|
360 |
* New $OUTPUT methods to replace code that was previously using $PAGE. Converting to these methods is optional
|
|
|
361 |
but highly recommended. Refer to the bootstrapbase layouts for examples.
|
|
|
362 |
- $OUTPUT->body_attributes() returns a string you can use for the body id and classes.
|
|
|
363 |
- $OUTPUT->blocks() returns HTML to display a block region and all of its blocks. This adds data attributes
|
|
|
364 |
that ensure drag and drop of blocks will work no matter what block regions or how many you have.
|
|
|
365 |
- $OUTPUT->page_heading() returns the page heading. Replaces $PAGE->heading.
|
|
|
366 |
- $OUTPUT->page_heading_button() returns the button to display with the heading. Replaces $page->button.
|
|
|
367 |
- $OUTPUT->page_doc_link() returns the link to moodle docs for the page. Replaces page_doc_link().
|
|
|
368 |
- $OUTPUT->page_heading_menu() returns the heading menu for the page. Replaces $PAGE->headingmenu.
|
|
|
369 |
- $OUTPUT->page_title() Returns the title to use for the head section.
|
|
|
370 |
- $OUTPUT->favicon() returns the URL to the favicon.
|
|
|
371 |
|
|
|
372 |
Renderer changes:
|
|
|
373 |
* core_renderer::navbar now returns an empty string if there are no navigation items to display.
|
|
|
374 |
* core_renderer::custom_menu now adds a class "custom_menu" to the div that contains the HTML for the custom menu.
|
|
|
375 |
|
|
|
376 |
=== 2.5 ===
|
|
|
377 |
|
|
|
378 |
required changes:
|
|
|
379 |
* Functions core_course_renderer::course_category_tree() and course_category_tree_category()
|
|
|
380 |
are deprecated
|
|
|
381 |
* Significant changes in rendering of courses and categories listings, lots of CSS classes changed,
|
|
|
382 |
several functions such as print_courses(), print_whole_category_list(), print_category_info()
|
|
|
383 |
are moved to course renderer.
|
|
|
384 |
|
|
|
385 |
DOM changes:
|
|
|
386 |
* changed the h1 title in the help popup to a h2.
|
|
|
387 |
* new setting $THEME->yuicssmodules = array('cssreset', 'cssfonts', 'cssgrids', 'cssbase'); which
|
|
|
388 |
allows themes to use different CSS reset normalisers such as cssnormalize YUI module.
|
|
|
389 |
* Re-wrote the user profile views to definition lists.
|
|
|
390 |
* Re-wrote the table for the course completion status block to use html_table - added some CSS classes to
|
|
|
391 |
the table in the process (see MDL-35608).
|
|
|
392 |
* Cancel buttons have the class btn-cancel.
|
|
|
393 |
* Added a z-index for the div#dateselector-calendar-panel so that the calendar pop-up renders above
|
|
|
394 |
the filemanager when they overlap, ie. the course settings page (see MDL-39047).
|
|
|
395 |
* Trivial change of CSS selectors used to display plugin status at the plugins overview
|
|
|
396 |
screen (#plugins-control-panel).
|
|
|
397 |
|
|
|
398 |
Renderer changes:
|
|
|
399 |
* Mymobile theme changed to support more verbose move-block-here descriptions.
|
|
|
400 |
|
|
|
401 |
=== 2.4 ===
|
|
|
402 |
|
|
|
403 |
required changes:
|
|
|
404 |
* output course and course content header/footer that may be returned by course format (see MDL-36048)
|
|
|
405 |
* span.completionprogress has been changed to a <div> and is not a float by default any more.
|
|
|
406 |
|
|
|
407 |
deprecation:
|
|
|
408 |
* i/roles: Use t/assignroles instead
|
|
|
409 |
* t/manual_item: Use i/manual_item instead
|
|
|
410 |
* t/unlock_gray: Use t/locked instead
|
|
|
411 |
* t/userblue: Previously used to unblock a user, use t/unblock.
|
|
|
412 |
* c/course: Use i/courseevent instead
|
|
|
413 |
* c/group: Use i/groupevent instead
|
|
|
414 |
* c/site: Use i/siteevent instead
|
|
|
415 |
* c/user: Use i/userevent instead
|
|
|
416 |
* t/clear: Use t/check instead
|
|
|
417 |
* i/cross_red_big: Use i/invalid or i/grade_incorrect
|
|
|
418 |
* i/tick_green_big: Use i/valid or i/grade_correct
|
|
|
419 |
* i/tick_amber_big: Use i/caution or i/grade_partiallycorrect
|
|
|
420 |
* No more small versions of i/cross_red_small, i/tick_green_small and i/tick_amber_small, use their big equivalent.
|
|
|
421 |
* t/addgreen: Use t/add instead.
|
|
|
422 |
* i/approve: Use t/approve instead
|
|
|
423 |
|
|
|
424 |
optional changes:
|
|
|
425 |
* new optional boolean parameter $withlinks for public function login_info() in lib/outputrenderers.php (MDL-31365)
|
|
|
426 |
* new layout option "nologinlinks" and new page layout "secure" e.g. for safebrowser and securewindow (MDL-31365)
|
|
|
427 |
* new class 'iconlarge' for 24x24 icons.
|
|
|
428 |
* new icons i/export and i/import (sized 16x16). Previously export and import actions used i/backup and i/restore.
|
|
|
429 |
* new icon i/assignroles (sized 16x16), to prevent the use of i/roles which is 12x12.
|
|
|
430 |
* new icon i/switchrole (sized 16x16), was previously using i/roles. Now is a copy of the new i/assignroles icon.
|
|
|
431 |
* new icons i/enrolusers and t/enrolusers, previsouly i/users was used.
|
|
|
432 |
* new icon t/cohorts (sized 12x12), to prevent the use of i/cohorts which is 16x16.
|
|
|
433 |
* new icons t/sort_asc, t/sort_desc to use for ordering in table headers.
|
|
|
434 |
* new class 'iconsort' for icons used for ordering in table headers.
|
|
|
435 |
* new icons t/locked and t/unlocked (12x12) which should be used when there is no action associated to the icon.
|
|
|
436 |
* new icons i/folder (16x16), monochrome equivalent to f/folder.
|
|
|
437 |
* new icons t/addcontact, t/removecontact and t/messages, previously t/addgreen, t/delete and t/log were used in messaging.
|
|
|
438 |
* new icons t/unblock and i/twoway.
|
|
|
439 |
* new icons i/courseevent, i/groupevent, i/siteevent and i/userevent (16x16) instead of c/* for calendar events.
|
|
|
440 |
* new icon t/markasread (12x12) to replace t/clear used in forums.
|
|
|
441 |
* new icon t/check (12x12) to replace t/clear which name does not reflect the icon meaning.
|
|
|
442 |
* 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.
|
|
|
443 |
* new icons i/valid, i/caution and i/invalid for generic statuses.
|
|
|
444 |
* new icons i/grade_correct, i/grade_partiallycorrect and i/grade_incorrect for grades.
|
|
|
445 |
* new icon t/approve (12x12).
|
|
|
446 |
* new icon t/contextmenu (12x12) for a monochrome version of i/menu.
|
|
|
447 |
|
|
|
448 |
=== 2.3 ===
|
|
|
449 |
|
|
|
450 |
optional changes:
|
|
|
451 |
* add new u/f3.png image when theme contains customised f1 and f2 default user images
|
|
|
452 |
|
|
|
453 |
=== 2.2 ===
|
|
|
454 |
|
|
|
455 |
required changes:
|
|
|
456 |
* use new page content placeholder "echo $OUTPUT->main_content()" instead of "echo core_renderer::MAIN_CONTENT_TOKEN"
|
|
|
457 |
see git commit: 3b3f302855d7621405a8b93e49bd399d67a998d7
|
|
|
458 |
* upgrade report selectors: search for "-course-report-" and replace with "-report-"
|