settings->preset) ? $theme->settings->preset : null; $fs = get_file_storage(); $context = context_system::instance(); if ($filename == 'default.scss') { // We still load the default preset files directly from the boost theme. No sense in duplicating them. $scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/default.scss'); } else if ($filename == 'plain.scss') { // We still load the default preset files directly from the boost theme. No sense in duplicating them. $scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/plain.scss'); } else if ($filename && ($presetfile = $fs->get_file($context->id, 'theme_ilb', 'preset', 0, '/', $filename))) { // This preset file was fetched from the file area for theme_ilb and not theme_boost (see the line above). $scss .= $presetfile->get_content(); } else { // Safety fallback - maybe new installs etc. $scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/default.scss'); } return $scss; }