[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm

raeburn raeburn at source.lon-capa.org
Wed Feb 16 10:58:29 EST 2022


raeburn		Wed Feb 16 15:58:29 2022 EDT

  Modified files:              
    /loncom/interface	courseprefs.pm 
  Log:
  - Bug 6907
    - Check for changes to "Use identity?" (requser) setting for LTI-based 
      link protector items now works.
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.103 loncom/interface/courseprefs.pm:1.104
--- loncom/interface/courseprefs.pm:1.103	Wed Feb 16 00:06:04 2022
+++ loncom/interface/courseprefs.pm	Wed Feb 16 15:58:28 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.103 2022/02/16 00:06:04 raeburn Exp $
+# $Id: courseprefs.pm,v 1.104 2022/02/16 15:58:28 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1501,7 +1501,7 @@
             if (grep(/^\Q$home\E$/, at ids)) {
                 if (ref($domdefs{'privhosts'}) eq 'ARRAY') {
                     if (grep(/^\Q$home\E$/,@{$domdefs{'privhosts'}})) {
-                        my %privhash  = &Apache::lonnet::restore_dom('lti','private',$cdom,$home,1); 
+                        my %privhash  = &Apache::lonnet::restore_dom('lti','private',$cdom,$home,1);
                         $privkey = $privhash{'key'};
                         $privnum = $privhash{'version'};
                         if (($privnum) && ($privkey ne '')) {
@@ -1593,7 +1593,8 @@
             my $reqitem = 'form.linkprot_requser_'.$idx;
             $env{$reqitem} =~ s/(`)/'/g;
             unless ($idx eq 'add') {
-                if ($current{'requser'} ne $env{$reqitem}) {
+                if ((!$current{'requser'} && $env{$reqitem}) ||
+                    ($current{'requser'} && !$env{$reqitem})) {
                     $haschanges{$itemid} = 1;
                 }
             }




More information about the LON-CAPA-cvs mailing list