version 1.282, 2016/10/05 13:59:46
|
version 1.283, 2016/10/25 12:45:33
|
Line 11853 sub modify_helpsettings {
|
Line 11853 sub modify_helpsettings {
|
$rolename=~s/[^A-Za-z0-9]//gs; |
$rolename=~s/[^A-Za-z0-9]//gs; |
if ($rolename ne '') { |
if ($rolename ne '') { |
unless(exists($existing{'rolesdef_'.$rolename})) { |
unless(exists($existing{'rolesdef_'.$rolename})) { |
my $errmsg; |
my %newprivs = &Apache::lonuserutils::custom_role_update($rolename,$prefix); |
my $result = &Apache::lonuserutils::store_custom_role($rolename,$prefix, |
my $result = &Apache::lonnet::definerole($rolename,$newprivs{'s'},$newprivs{'d'}, |
$confname,$dom); |
$newprivs{'c'},$confname,$dom); |
if ($result eq 'ok') { |
if ($result eq 'ok') { |
$changes{'newcustomrole'} = $rolename; |
$changes{'newcustomrole'} = $rolename; |
} else { |
} else { |
$errmsg = ': '.$result; |
$errors .= '<li><span class="LC_error">'. |
|
&mt('An error occurred storing the new custom role: [_1]', |
|
$result).'</span></li>'; |
} |
} |
} |
} |
} |
} |