Authentication plugin title or description

Authentication plugin title or description

删除的用户 -
回帖数:2
Hi --

I made a simple authentication plugin (using \moodle\auth\ as examples).

When I add it to my
\moodle\auth\ dir it all works well -- but the Site Administration | Users | Authentication | Manage Authentication is in the form:
auth_matt1title

I do not see anywhere in a custom plug-in to add a description???
(for example if I look at one of the existing ones, say moodle\auth\fc, and I look through all it's php and config files I do not see "First Class Server" anywhere -- yet that description/title appears on my Manage Authentication page???

Thank you!

回复删除的用户

Re: Authentication plugin title or description

Matt Gibson -
Hi Matt,

Moodle uses a language string system so that the names can all be localised to loads of different languages. You have probably seen the get_string($string_name, $file_to_look_in) function, which is defined at line 5122 of /lib/moodlelib.php, which finds the right bit of text from a language file. They are all kept in /lang/[your_language] or in the case of plugins (blocks certainly, not sure about auth plugins), you make a lang folder within the plugin directory. Have a poke about to see what the language files look like and you'll see how straight forwards it is to make one. /lang/en_utf8/auth.php has the FirstClass stuff around line 127. http://xref.moodle.org is good for looking that stuff up.

Hope that helps.
回复Matt Gibson

Re: Authentication plugin title or description

Mike Churchward -
Core developers的头像 Plugin developers的头像 Testers的头像
Yep. From some version of 1.8 upwards, you can keep all of your auth plug-in's language strings within its own language directories. The name is stored in "auth_[plug-in name]title" for example.

mike