From 47c4ee2680afa2e04fdc3d0a01aaadc1f69a8a78 Mon Sep 17 00:00:00 2001
From: Kathrin Osswald <kathrin.osswald@uni-ulm.de>
Date: Tue, 9 Jun 2020 08:45:16 +0200
Subject: [PATCH] Improved SCSS settings to be used with admin_setting_scsscode
 that validates the code before saving.

---
 CHANGES.md   | 4 ++++
 settings.php | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 18c1666..d0047fe 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -4,6 +4,10 @@ moodle-theme_boost_campus_child
 Changes
 -------
 
+### Unreleased
+
+* 2020-06-09 - Improved SCSS settings to be used with admin_setting_scsscode that validates the code before saving.
+
 ### v3.8-r1
 
 * 2020-03-25 - Prepare compatibility for Moodle 3.8.
diff --git a/settings.php b/settings.php
index 166faf5..7e85ae4 100644
--- a/settings.php
+++ b/settings.php
@@ -131,7 +131,7 @@ if ($ADMIN->fulltree) {
     $name = 'theme_boost_campus_child/scsspre';
     $title = get_string('rawscsspre', 'theme_boost', null, true);
     $description = get_string('rawscsspre_desc', 'theme_boost', null, true);
-    $setting = new admin_setting_configtextarea($name, $title, $description, '', PARAM_RAW);
+    $setting = new admin_setting_scsscode($name, $title, $description, '', PARAM_RAW);
     $setting->set_updatedcallback('theme_reset_all_caches');
     $page->add($setting);
 
@@ -139,7 +139,7 @@ if ($ADMIN->fulltree) {
     $name = 'theme_boost_campus_child/scss';
     $title = get_string('rawscss', 'theme_boost', null, true);
     $description = get_string('rawscss_desc', 'theme_boost', null, true);
-    $setting = new admin_setting_configtextarea($name, $title, $description, '', PARAM_RAW);
+    $setting = new admin_setting_scsscode($name, $title, $description, '', PARAM_RAW);
     $setting->set_updatedcallback('theme_reset_all_caches');
     $page->add($setting);
 
-- 
GitLab