MDL-12886 support for ws cap names in core

This commit is contained in:
Petr Skoda
2009-10-26 19:41:06 +00:00
parent dc3f5ffa12
commit b8affd4c8a
5 changed files with 15 additions and 1 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
<?php
$string['pluginname'] = 'AMF protocok';
$string['amf:use'] = 'Use AMF protocol';
$string['pluginname'] = 'AMF protocol';
+1
View File
@@ -1,3 +1,4 @@
<?php
$string['rest:use'] = 'Use REST protocol';
$string['pluginname'] = 'REST protocol';
+1
View File
@@ -1,3 +1,4 @@
<?php
$string['soap:use'] = 'Use SOAP protocol';
$string['pluginname'] = 'SOAP protocol';
+1
View File
@@ -1,3 +1,4 @@
<?php
$string['xmlrpc:use'] = 'Use XML-RPC protocol';
$string['pluginname'] = 'XML-RPC protocol';
+10
View File
@@ -4056,6 +4056,14 @@ function get_capability_string($capabilityname) {
$string = get_string($stringname, 'repository_'.$componentname);
break;
case 'local':
$string = get_string($stringname, 'local_'.$componentname);
break;
case 'webservice':
$string = get_string($stringname, 'webservice_'.$componentname);
break;
default:
$string = get_string($stringname);
break;
@@ -4108,6 +4116,8 @@ function get_component_string($component, $contextlevel) {
$string = get_string('gradebook', 'admin');
} else if (preg_match('|^coursereport/|', $component)) {
$string = get_string('coursereports');
} else if (preg_match('|^webservice/|', $component)) {
$string = get_string('webservices', 'webservice');
} else {
$string = get_string('course');
}