MDL-78750 communication_matrix: Fixed available providers

This commit is contained in:
Stevani Andolo 2023-09-28 11:25:19 +08:00 committed by Sara Arjona
parent a78921005f
commit 369fee885f
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View File

@ -33,7 +33,8 @@ Feature: Access the communication configuration page
@javascript
Scenario: The communication form fields toggle dynamically when valid provider is set
Given I am on the "Test course" "Course" page logged in as "teacher1"
Given a Matrix mock server is configured
And I am on the "Test course" "Course" page logged in as "teacher1"
When I navigate to "Communication" in current page administration
And I set the following fields to these values:
| selectedcommunication | communication_matrix |

View File

@ -17,6 +17,7 @@
namespace core\plugininfo;
use admin_settingpage;
use core_communication\processor;
use core_plugin_manager;
use moodle_url;
@ -77,8 +78,7 @@ class communication extends base {
// Filter to return only enabled plugins.
$enabled = [];
foreach ($plugins as $plugin) {
$disabled = get_config('communication_' . $plugin, 'disabled');
if (empty($disabled)) {
if (processor::is_provider_available('communication_' . $plugin)) {
$enabled[$plugin] = $plugin;
}
}