mudrd8mz / moodle-tool_pluginskel

Generator of Moodle plugins skeletons
https://moodle.org/plugins/tool_pluginskel
Other
51 stars 46 forks source link

Modules language file name should not preceded by mod_ #87

Closed dvdcastro closed 6 years ago

dvdcastro commented 6 years ago

Modules language file name should not preceded by mod_.

Was scratching my head for a while when trying to install..

++ Invalid get_string() identifier: 'modulename' or component 'mod_mymodule'. Perhaps you are missing $string['modulename'] = ''; in mod/mymodule/lang/en/mymodule.php? ++

The generator creates the file mod/mymodule/lang/en/mod_mymodule.php and the language strings are never found when installing. They are looked for in mod/mymodule/lang/en/mymodule.php which does not exist.

mudrd8mz commented 6 years ago

Thanks for letting me know. This should be fixed now in the version 1.2.0.

dvdcastro commented 6 years ago

Related to this, lib.php methods for modules are also preceded by mod_ and it seems like they shouldn't.

mudrd8mz commented 6 years ago

It is complicated. See how they are called from course/modlib.php. Some of them historically do not have it (such as *_add_instance()) but some do (such as mod_*_rescale_activity_grades()). I'll be happy to hear all your further findings reported as new issues here. Thanks in advance.