diff --git a/accessibility_fontsize.php b/classes/fontsize.php similarity index 87% rename from accessibility_fontsize.php rename to classes/fontsize.php index ed01b75..2941ee2 100644 --- a/accessibility_fontsize.php +++ b/classes/fontsize.php @@ -22,11 +22,9 @@ * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -namespace local_accessibility\widgets; +namespace accessibility_fontsize; -defined('MOODLE_INTERNAL') || die(); - -require_once(__DIR__ . '/../../classes/rangewidget.php'); +use local_accessibility\widgets\rangewidget; /** * Font size accessibility widget definition @@ -57,6 +55,8 @@ public function init() { $userconfig = $this->getuserconfig(); if ($userconfig) { + // We set the userconfig variable because we perhaps need it for the amd script too. + $userconfig = clean_param($userconfig, PARAM_FLOAT); $this->addbodyclass('accessibility-fontsize-' . round($userconfig * 100)); } diff --git a/version.php b/version.php index 583b3cc..7f94c71 100644 --- a/version.php +++ b/version.php @@ -26,9 +26,9 @@ $plugin->component = 'accessibility_fontsize'; $plugin->release = '1.0.0'; -$plugin->version = 2023071401; +$plugin->version = 2024051300; $plugin->requires = 2022041900; $plugin->maturity = MATURITY_STABLE; $plugin->dependencies = [ - 'local_accessibility' => 2023071300, + 'local_accessibility' => 2024050800, ];