diff --git a/src/Model/MoodleConfig.php b/src/Model/MoodleConfig.php index f78ed46..c68e774 100644 --- a/src/Model/MoodleConfig.php +++ b/src/Model/MoodleConfig.php @@ -10,6 +10,7 @@ public function __construct( public string $lang = self::UNSET, public string $timezone = self::UNSET, public string $defaultblocks = self::UNSET, + public string $theme = self::UNSET, public bool $sslproxy = false ) { } } diff --git a/src/Service/PHPVersions.php b/src/Service/PHPVersions.php index 6d1cf27..cfa406a 100644 --- a/src/Service/PHPVersions.php +++ b/src/Service/PHPVersions.php @@ -35,7 +35,8 @@ public function listVersions(): array { '8.1', '8.2', '8.3', - '8.4' + '8.4', + '8.5' ]; try { @@ -50,6 +51,11 @@ public function listVersions(): array { return $hardCodedVersions; } + // Handle api rate limit issue. + if (!empty($branches['message']) && strpos($branches['message'], 'API rate limit exceeded') !== false) { + return $hardCodedVersions; + } + // Loop through the branches and extract the PHP version from the branch name try { $phpVersions = []; diff --git a/templates/moodle/config.php.twig b/templates/moodle/config.php.twig index 0cf927c..c4982b7 100644 --- a/templates/moodle/config.php.twig +++ b/templates/moodle/config.php.twig @@ -80,6 +80,10 @@ $CFG->behat_profiles['host-chrome'] = [ $CFG->lang = '{{config.lang}}'; {% endif %} +{% if (config.theme != UNSET) %} +$CFG->theme = '{{config.theme}}'; +{% endif %} + {% if (config.timezone != UNSET) %} date_default_timezone_set('{{config.timezone}}'); {% endif %}