Commit Graph

329 Commits

Author SHA1 Message Date
Andrew Nicols 9043dc75bf MDL-82183 core: Coding style fixes for core\output 2024-06-26 23:00:33 +08:00
Andrew Nicols 2fff48b07c MDL-82183 core: Migrate all output classes to autoloaded 2024-06-26 23:00:31 +08:00
ferranrecio 1df56368ac MDL-81948 theme: fix fallback layout logic
Finding the page layout fallback was trying to get a default layout from
the ancient theme called "base". This default theme do not exists
anymore and defining a wrong layout in a theme is a code mistake that
should not be bypassed.
2024-05-17 10:38:22 +02:00
Marina Glancy ef1759da74 MDL-80820 various: fix incorrect phpdocs 2024-04-08 10:13:10 +01:00
David Woloszyn 40d397ab5f MDL-78427 core_theme: Add theme usage report and icon
In addition to adding in theme usage reports, there is also the
addition of an icon on the theme cards which takes you to the report.
This icon only appears for that theme if it has been used in any
overriding context.
2024-02-02 11:16:46 +11:00
Sara Arjona ff844ab7bd MDL-78993 theme: Remove $CFG->svgicons
The $CFG->svgicons setting was introduced in Moodle 2.4 due to incomplete
SVG support in certain web browsers.
The landscape has evolved significantly since then, and all modern browsers
now handle SVG files correctly.
The $CFG->svgicons settings has been removed and the supports_svg() method
has been updated with currently supported browsers (IE support was removed
in Moodle 3.10).
2023-09-12 15:28:03 +02:00
Daniel Poggenpohl 02716c8ea6 MDL-77657 theme: Fix get_pre_scss_code load order
This led to problems with grandchild themes,
depending on their direct parent's prescsscallback.
2023-08-21 08:39:50 +02:00
Daniel Poggenpohl 7483bdd908 MDL-77657 theme: Fix get_extra_scss_code load order
This led to problems with grandchild themes,
depending on their direct parent's extrascsscallback.
2023-08-21 08:39:45 +02:00
Paul Holden ce8397f7ad MDL-78974 themes: define removedprimarynavitems theme config property.
All configurable theme config properties must be defined at the class
level, lest PHP 8.2 complain about creation of dynamic properties.
2023-08-11 13:38:02 +01:00
Andrew Nicols 276bf5acbc Merge branch 'MDL-77793-master' of https://github.com/davewoloszyn/moodle 2023-06-22 14:29:39 +02:00
Meirza 97ff68fd6b MDL-78159 lib: Added missing properties for core libraries
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-06-21 15:39:53 +07:00
David Woloszyn 49ee428dca MDL-77793 lib: Deprecated device specific theme functions 2023-06-19 16:32:51 +10:00
Paul Holden ef659d0584 MDL-78055 themes: account for undefined extrascsscallback config.
Where a theme didn't define this property, it would raise debugging
deprecation warnings in PHP8.1.
2023-06-14 13:51:07 +01:00
Marina Glancy b0a83aa7bd MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:15:54 +08:00
Andrew Nicols c3c3a1fe0f MDL-76468 output: Correct slasharg URL for theme stylesheet 2022-11-24 16:40:46 +08:00
Jun Pataleta 60e275183a Merge branch 'MDL-76367-master' of https://github.com/andrewnicols/moodle 2022-11-22 11:08:37 +08:00
Eloy Lafuente (stronk7) 79a17a56bb MDL-76389 output: Ensure we don't try to iterate over null
Just convert nulls to empty array before trying to iterate it.
2022-11-20 11:33:37 +01:00
Andrew Nicols 44d6b24d28 MDL-76367 core: Apply RTL transformations to editors too 2022-11-18 15:13:12 +08:00
Andrew Nicols 64be603879 MDL-75386 theme: Include CSS from editor subplugins in editor style
Editor stylesheets are kept separately to standard plugin stylesheets so
that they can be provided to style individual iframes where loading the
standard Moodle stylesheets would be incorrect.

Unfortunately the editor stylesheet system does not consider that
subplugins may want to add small individual styling to the editor but
this is required in some situations.
2022-08-05 14:18:26 +08:00
Justus Dieckmann bf68b2bc64 MDL-74498 output: Resolve correct icon for modules
Fixes the resolve_image_location function, which previously returned
the 'icon' or 'monologo' icon for modules, no matter the requested
image name.

Also fixes an incorrect pix_icon() call for the context header, which
was hidden by the faulty resolve function.
2022-04-14 01:54:28 +02:00
Andrew Nicols ffc227c9d5 MDL-74235 output: Fall back to icon and support monologo 2022-04-07 12:56:13 +08:00
Ilya Tregubov a5ef320720 Merge branch 'MDL-74071' of https://github.com/paulholden/moodle 2022-03-16 13:57:59 +06:00
Shamim Rezaie c6a74d4752 MDL-74033 theme_boost: Ability to remove primary nav items in boost 2022-03-08 11:39:38 +11:00
Paul Holden 7f3d270a37 MDL-74071 output: code docs for activity header API to aid IDE hints. 2022-03-03 09:59:57 +00:00
Peter Dias a2d8ac6eea MDL-72413 core: Introduce new header component to render standard items
New activity header to render common module items in a centralised location.
2021-12-13 09:49:34 +08:00
Mihail Geshoski 3372adddb3 MDL-72450 theme: Allow themes to specify whether they use course index
Introduces a new theme config 'usecourseindex' which allows themes to
specify whether they implement and use course index.
2021-10-14 15:38:48 +08:00
Bas Brands a0bb51622c MDL-71610 theme_boost: remove edit button from Boost 2021-09-29 09:25:36 +02:00
David Mudrák f00ad20a6f MDL-70486 output: Improve check for block region name string existence
* The fact that non-existing strings are returned in certain format
  starting with the bracket, is kind of side debugging effect. The value
  is really undefined and should not be relied upon.
* The string could actually exist and be worded so that its first
  character is also the square bracket.
2020-12-17 10:04:46 +01:00
Tim Hunt 3a048549de MDL-69740 Behat init: more progress info at the end of the install 2020-10-02 23:15:50 +01:00
Andrew Nicols 2f7792a0da MDL-69117 output: Correct remove_dir usage 2020-09-03 09:01:32 +08:00
Bas Brands a158714284 MDL-69117 theme_boost: themedesigner source maps 2020-09-02 12:14:13 +02:00
Mikhail Golenkov d7342dc239 MDL-67211 Tasks: Add cron_enabled setting.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:08:57 +10:00
Andrew Nicols 868c7558f8 MDL-66568 core_output: Return built theme CSS 2020-06-15 10:34:40 +08:00
Andrew Nicols 60c3c08f6e MDL-67689 core: Whitespace fix 2020-05-15 10:36:55 +08:00
Bas Brands 4a6215149e MDL-67689 theme_boost: improve theme designer mode performance 2020-05-01 08:26:50 +02:00
Michael Hawkins 1c10c542f3 MDL-67364 output: Allow child themes to use parent editor_scss config
This still allows child themes to override editor_scss, but will fall
back to what the parent is using if they do not specify it. This
negates the need for every child them to have the config duplicated
in order to utilise it.
2020-02-13 14:01:55 +08:00
Bas Brands 8040fafaa8 MDL-62757 themes: validate theme preset files
Preset files need to be validated to ensure compiling SCSS does not
break.
2019-12-04 19:12:44 +01:00
Mathew May 655b994a4a MDL-64998 libraries: Remove PHP LESSc 2019-06-21 07:18:59 +08:00
Jake Dallimore 1d73e8c3be Merge branch 'MDL-65904-master' of git://github.com/merrill-oakland/moodle 2019-06-19 14:56:11 +08:00
Eric Merrill 0f7f05379c MDL-65904 theme: Compile fallback css in the correct order 2019-06-12 13:05:40 -04:00
Adrian Greeve 5b9027a83a Merge branch 'MDL-65438-master' of git://github.com/bmbrands/moodle 2019-06-10 13:56:51 +08:00
Mathew May 4028ffd8f6 MDL-65708 output: Get a base config from Boost
As a part of the removal of bootstrapbase & clean
I removed some logic that got the base config of bootstrapbase,
this should of been changed to get boosts config.
See: e00f1c663c
2019-05-27 13:22:35 +08:00
Bas Brands 66bd0f6c2a MDL-65438 core_themes: allow themes to change the css url
Themes that have the function theme_themename_alter_css_urls() in lib.php
can change the css url from theme/styles.php to a local script like
theme/themename/css.php. The local css.php file can be used to serve
various versions of the theme css, for example versions compiled using
different scss variables.
2019-05-08 15:20:53 +02:00
Mathew May 9757c65687 MDL-64506 Javascript: Remove docking JS.
Deprecate related lang strings & base functions now return false.
2019-04-03 19:34:20 +08:00
Mathew May a5a6df54cc MDL-64506 theme: Update BSB references and upgrade texts 2019-04-03 19:34:20 +08:00
Mathew May e00f1c663c MDL-64506 phpunit: Update unit tests to use classic 2019-04-03 19:34:20 +08:00
Michael Hawkins 341070d5b3 MDL-62968 Boost: Adding editor SCSS support 2019-01-02 13:35:19 +08:00
Jake Dallimore 83e2051845 Merge branch 'MDL-59261-master' of git://github.com/ryanwyllie/moodle 2018-07-03 14:44:32 +08:00
Bas Brands af9edb2e6a MDL-59261 theme_boost: compiled css fallback 2018-07-03 14:14:52 +08:00
Michael Hawkins a990e4faff MDL-62767 theme: Remove old localcaches when clearing/updating theme cache 2018-07-03 14:00:29 +08:00