openequella / moodle-mod_openEQUELLA

Moodle module for integration with openEQUELLA
https://openequella.github.io/moodle-mod_openEQUELLA/
GNU General Public License v3.0
6 stars 16 forks source link

Latest Update cccc282 gives lang string errors for custom roles #24

Closed alex-rowe closed 10 years ago

alex-rowe commented 10 years ago

We have additional roles to what is standard in Moodle as well as name changes to the standard roles. The plugin in now doing a get string based on role shortname which causes errors when debugging is turned on.

Invalid get_string() identifier: 'config.group.techadmin' or component 'equella'. Perhaps you are missing $string['config.group.techadmin'] = ''; in mod/equella/lang/en/equella.php?

    line 293 of /lib/classes/string_manager_standard.php: call to debugging()
    line 6839 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
    line 27 of /mod/equella/settings.php: call to get_string()
    line 86 of /mod/equella/settings.php: call to ecs()
    line 89 of /lib/classes/plugininfo/mod.php: call to include()
    line 35 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
    line 6389 of /lib/adminlib.php: call to require()
    line 6491 of /lib/adminlib.php: call to admin_get_root()
    line 38 of /admin/settings.php: call to admin_write_settings()

Invalid get_string() identifier: 'config.group.contentadministrator' or component 'equella'. Perhaps you are missing $string['config.group.contentadministrator'] = ''; in mod/equella/lang/en/equella.php?

    line 293 of /lib/classes/string_manager_standard.php: call to debugging()
    line 6839 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
    line 27 of /mod/equella/settings.php: call to get_string()
    line 86 of /mod/equella/settings.php: call to ecs()
    line 89 of /lib/classes/plugininfo/mod.php: call to include()
    line 35 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
    line 6389 of /lib/adminlib.php: call to require()
    line 6491 of /lib/adminlib.php: call to admin_get_root()
    line 38 of /admin/settings.php: call to admin_write_settings()

Invalid get_string() identifier: 'config.group.editinglecturer' or component 'equella'. Perhaps you are missing $string['config.group.editinglecturer'] = ''; in mod/equella/lang/en/equella.php?

    line 293 of /lib/classes/string_manager_standard.php: call to debugging()
    line 6839 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
    line 27 of /mod/equella/settings.php: call to get_string()
    line 86 of /mod/equella/settings.php: call to ecs()
    line 89 of /lib/classes/plugininfo/mod.php: call to include()
    line 35 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
    line 6389 of /lib/adminlib.php: call to require()
    line 6491 of /lib/adminlib.php: call to admin_get_root()
    line 38 of /admin/settings.php: call to admin_write_settings()

Can settings.php be changed to use variables in the string or another method so that each roles does not need to be added to the lang file.

Thanks

alex-rowe commented 10 years ago

A lang string similar to below would be suitable but uses mdl_role.name instead of shortname

settings.php: Line 86
$heading = ecs('group.noname', $role->shortname);

Also the version.php file needs to be updated to install the new language strings.

dcai commented 10 years ago

Thanks @agrowe this has been fixed.

alex-rowe commented 10 years ago

Thanks for the fix @dongsheng, the version number should be incrementally updated as well so that it installs the new language strings introduced.

dcai commented 10 years ago

Version number updated.

alex-rowe commented 10 years ago

Thanks