--- loncom/interface/domainprefs.pm 2016/10/24 04:01:16 1.160.6.73 +++ loncom/interface/domainprefs.pm 2016/10/25 12:54:25 1.160.6.75 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.160.6.73 2016/10/24 04:01:16 raeburn Exp $ +# $Id: domainprefs.pm,v 1.160.6.75 2016/10/25 12:54:25 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -216,7 +216,6 @@ sub handler { 'serverstatuses','requestcourses','helpsettings', 'coursedefaults','usersessions','loadbalancing', 'requestauthor','selfenrollment','inststatus'],$dom); - 'selfenrollment','inststatus'],$dom); my @prefs_order = ('rolecolors','login','defaults','quotas','autoenroll', 'autoupdate','autocreate','directorysrch','contacts', 'usercreation','selfcreation','usermodification','scantron', @@ -10591,13 +10590,15 @@ sub modify_helpsettings { $rolename=~s/[^A-Za-z0-9]//gs; if ($rolename ne '') { unless(exists($existing{'rolesdef_'.$rolename})) { - my $errmsg; - my $result = &Apache::lonuserutils::store_custom_role($rolename,$prefix, - $confname,$dom); + my %newprivs = &Apache::lonuserutils::custom_role_update($rolename,$prefix); + my $result = &Apache::lonnet::definerole($rolename,$newprivs{'s'},$newprivs{'d'}, + $newprivs{'c'},$confname,$dom); if ($result eq 'ok') { $changes{'newcustomrole'} = $rolename; } else { - $errmsg = ': '.$result; + $errors .= '
  • '. + &mt('An error occurred storing the new custom role: [_1]', + $result).'
  • '; } } }