Closed golenkovm closed 4 years ago
SVG support has been added to Moodle as part of https://tracker.moodle.org/browse/MDL-22955 If $CFG->svgicons is not set in config.php, a decision to enable SVG support or not is made based on user's browser: https://github.com/moodle/moodle/blob/1d4fdb0d1c60448104bc9eac79b5123863c67cbd/lib/classes/useragent.php#L966-L990
$CFG->svgicons
config.php
where $instance->useragent is defined here: https://github.com/moodle/moodle/blob/1d4fdb0d1c60448104bc9eac79b5123863c67cbd/lib/classes/useragent.php#L132-L133
$instance->useragent
If your Moodle instance has a theme with SVG logo, outage will fail to build a static page, because the main curl request doesn't set CURLOPT_USERAGENT option, therefor useragent is set to false and SVG can't be loaded:
CURLOPT_USERAGENT
useragent
false
https://github.com/catalyst/moodle-auth_outage/blob/master/classes/local/outagelib.php#L60-L71
This is fixed by #195
SVG support has been added to Moodle as part of https://tracker.moodle.org/browse/MDL-22955 If
$CFG->svgicons
is not set inconfig.php
, a decision to enable SVG support or not is made based on user's browser: https://github.com/moodle/moodle/blob/1d4fdb0d1c60448104bc9eac79b5123863c67cbd/lib/classes/useragent.php#L966-L990where
$instance->useragent
is defined here: https://github.com/moodle/moodle/blob/1d4fdb0d1c60448104bc9eac79b5123863c67cbd/lib/classes/useragent.php#L132-L133If your Moodle instance has a theme with SVG logo, outage will fail to build a static page, because the main curl request doesn't set
CURLOPT_USERAGENT
option, thereforuseragent
is set tofalse
and SVG can't be loaded:https://github.com/catalyst/moodle-auth_outage/blob/master/classes/local/outagelib.php#L60-L71