-
Bug
-
Resolution: Fixed
-
Minor
-
1.9.1
-
None
-
Any
-
MOODLE_19_STABLE
-
MOODLE_20_STABLE
This is a small issue that appears when we want to add a custom XML-RPC service for a Moodle activity module.
Originally, when adding a new rpc service definition, it will have a parent_type and a parent. When browing to the peers service administration page, services are presented using, at line §33 :
<h3><?php echo get_string($name.'name', $version['parent_type'].''.$version['parent'] , $mnet_peer->name); ?></h3>
This suitable for "auth" and "mnet" hardcoded services, but not for modules : if we decide to give the "mod" parent_type value, and lets say 'tracker' module name as "parent", we get a "mod_tracker" string domain selector, although the common use of internationalization domains is to use the simple module name as selector key ('tracker').
Here comes a fix proposal in mnet_services.html that avoids this side effect (from §26 upwards) :
<table cellpadding="9" cellspacing="0" >
<?php
foreach($myservices as $name => $versions) {
$version = current($versions);
$stringdomain = ($version['parent_type'] == 'mod') ? $version['parent'] : $version['parent_type'].'_'.$version['parent'] ; // MAKES A SUITABLE KEY FOR MODS
?>
<tr>
<td align="left" valign="top" colspan="2">
<h3><?php echo get_string($name.'_name', $stringdomain , $mnet_peer->name); ?></h3> // USE THE KEY
<?php echo get_string($name.'_description', $stringdomain, $mnet_peer->name); ?> // USE THE KEY
<?php
$breakstring = '';
- will be (partly) resolved by
-
MDL-19024 Assignment types should be allowed to publish mnet rpc functions
-
- Closed
-