MDL-78129 communication: Fix all phpcs isuses
This is a brand new subsystem, plugin-type, and plugin. They are written from the ground up by us. They should not contain any coding style violations.
This commit is contained in:
@@ -40,7 +40,6 @@ use stdClass;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class api {
|
||||
|
||||
/**
|
||||
* @var null|processor $communication The communication settings object
|
||||
*/
|
||||
@@ -167,7 +166,7 @@ class api {
|
||||
$selection[processor::PROVIDER_NONE] = get_string('nocommunicationselected', 'communication');
|
||||
$communicationplugins = \core\plugininfo\communication::get_enabled_plugins();
|
||||
foreach ($communicationplugins as $pluginname => $notusing) {
|
||||
$selection['communication_' . $pluginname] = get_string('pluginname', 'communication_'. $pluginname);
|
||||
$selection['communication_' . $pluginname] = get_string('pluginname', 'communication_' . $pluginname);
|
||||
}
|
||||
return $selection;
|
||||
}
|
||||
@@ -200,8 +199,7 @@ class api {
|
||||
): void {
|
||||
global $PAGE;
|
||||
|
||||
list($communicationproviders, $defaulprovider) = self::
|
||||
get_enabled_providers_and_default($selectdefaultcommunication);
|
||||
[$communicationproviders, $defaulprovider] = self::get_enabled_providers_and_default($selectdefaultcommunication);
|
||||
|
||||
$PAGE->requires->js_call_amd('core_communication/providerchooser', 'init');
|
||||
|
||||
@@ -217,10 +215,12 @@ class api {
|
||||
$mform->setDefault('selectedcommunication', $defaulprovider);
|
||||
|
||||
$mform->registerNoSubmitButton('updatecommunicationprovider');
|
||||
$mform->addElement('submit',
|
||||
$mform->addElement(
|
||||
'submit',
|
||||
'updatecommunicationprovider',
|
||||
'update communication',
|
||||
['data-communicationchooser-field' => 'updateButton', 'class' => 'd-none',]);
|
||||
['data-communicationchooser-field' => 'updateButton', 'class' => 'd-none']
|
||||
);
|
||||
|
||||
// Just a placeholder for the communication options.
|
||||
$mform->addElement('hidden', 'addcommunicationoptionshere');
|
||||
@@ -242,7 +242,9 @@ class api {
|
||||
$mform->createElement(
|
||||
'text',
|
||||
'communicationroomname',
|
||||
get_string('communicationroomname', 'communication'), 'maxlength="100" size="20"'),
|
||||
get_string('communicationroomname', 'communication'),
|
||||
'maxlength="100" size="20"'
|
||||
),
|
||||
'addcommunicationoptionshere'
|
||||
);
|
||||
$mform->addHelpButton('communicationroomname', 'communicationroomname', 'communication');
|
||||
@@ -250,7 +252,6 @@ class api {
|
||||
|
||||
processor::set_proider_form_definition($provider[0], $mform);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -613,7 +614,6 @@ class api {
|
||||
|
||||
switch ($roomstatus) {
|
||||
case 'pending':
|
||||
|
||||
\core\notification::add($message, \core\notification::INFO);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user