Merge branch 'w28_MDL-8249_m24_roletranslations' of git://github.com/skodak/moodle

Conflicts:
	lib/db/upgrade.php
	version.php
This commit is contained in:
Dan Poltawski 2012-07-10 09:43:23 +08:00
commit e1980f8bb9
37 changed files with 631 additions and 422 deletions

View file

@ -54,9 +54,10 @@ if (!during_initial_install()) { //do not use during installation
// front page default role
$options = array(0=>new lang_string('none')); // roles to choose from
$defaultfrontpageroleid = 0;
foreach (get_all_roles() as $role) {
$roles = role_fix_names(get_all_roles(), null, ROLENAME_ORIGINALANDSHORT);
foreach ($roles as $role) {
if (empty($role->archetype) or $role->archetype === 'guest' or $role->archetype === 'frontpage' or $role->archetype === 'student') {
$options[$role->id] = strip_tags(format_string($role->name)) . ' ('. $role->shortname . ')';
$options[$role->id] = $role->localname;
if ($role->archetype === 'frontpage') {
$defaultfrontpageroleid = $role->id;
}