??? label for added capability

??? label for added capability

by Florin Go -
Number of replies: 1

in lang/en/mypluginname.php
$string['mypluginname:mycapability'] = 'some "Hello World" text';

in db/access.php

defined('MOODLE_INTERNAL') || die();

$capabilities = array(

'local/mypluginname:mycapability' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'user' => CAP_ALLOW
)
)
);
in capability listing (/admin/tool/capability/index.php) I get ??? as output instead of the [some "Hello World" text]
<option value="local/mypluginname:mycapability" selected="" id="somerandomid">local/mypluginname:mycapability: local/mypluginname:mycapability ???</option>
Do not really know what I am missing.
Other texts, without the colon; from the lang file, are being shown properly.
Thank you in advance.

Average of ratings: -
In reply to Florin Go

Re: ??? label for added capability

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

I think the language file should be lang/en/local_mypluginname.php (with the "local_" prefix). Have you tried purging caches (or incrementing the plugin's version number) so Moodle re-reads changes to strings?