[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface domainprefs.pm

raeburn raeburn at source.lon-capa.org
Tue Oct 25 08:54:26 EDT 2016


raeburn		Tue Oct 25 12:54:26 2016 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	domainprefs.pm 
  Log:
  - For 2.11
    - Backport 1.283
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.160.6.74 loncom/interface/domainprefs.pm:1.160.6.75
--- loncom/interface/domainprefs.pm:1.160.6.74	Mon Oct 24 22:37:24 2016
+++ loncom/interface/domainprefs.pm	Tue Oct 25 12:54:25 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.160.6.74 2016/10/24 22:37:24 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
 #
@@ -10590,13 +10590,15 @@
         $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 .= '<li><span class="LC_error">'.
+                               &mt('An error occurred storing the new custom role: [_1]',
+                                   $result).'</span></li>';
                 }
             }
         }




More information about the LON-CAPA-cvs mailing list