Diff for /loncom/lonnet/perl/lonnet.pm between versions 1.1486 and 1.1490

version 1.1486, 2022/06/08 01:42:20 version 1.1490, 2022/09/13 02:32:58
Line 4918  sub get_scantronformat_file { Line 4918  sub get_scantronformat_file {
                 close($fh);                  close($fh);
             }              }
         }          }
           chomp(@lines);
     }      }
     return @lines;      return @lines;
 }  }
Line 6848  sub course_adhocrole_privs { Line 6849  sub course_adhocrole_privs {
             $full{$priv} = $restrict;              $full{$priv} = $restrict;
         }          }
         foreach my $item (split(/,/,$overrides{"internal.adhocpriv.$rolename"})) {          foreach my $item (split(/,/,$overrides{"internal.adhocpriv.$rolename"})) {
              next if ($item eq '');              next if ($item eq '');
              my ($rule,$rest) = split(/=/,$item);              my ($rule,$rest) = split(/=/,$item);
              next unless (($rule eq 'off') || ($rule eq 'on'));              next unless (($rule eq 'off') || ($rule eq 'on'));
              foreach my $priv (split(/:/,$rest)) {              foreach my $priv (split(/:/,$rest)) {
                  if ($priv ne '') {                  if ($priv ne '') {
                      if ($rule eq 'off') {                      if ($rule eq 'off') {
                          $possremove{$priv} = 1;                          $possremove{$priv} = 1;
                      } else {                      } else {
                          $possadd{$priv} = 1;                          $possadd{$priv} = 1;
                      }                      }
                  }                  }
              }              }
          }          }
          foreach my $priv (sort(keys(%full))) {          foreach my $priv (sort(keys(%full))) {
              if (exists($currprivs{$priv})) {              if (exists($currprivs{$priv})) {
                  unless (exists($possremove{$priv})) {                  unless (exists($possremove{$priv})) {
                      $storeprivs{$priv} = $currprivs{$priv};                      $storeprivs{$priv} = $currprivs{$priv};
                  }                  }
              } elsif (exists($possadd{$priv})) {              } elsif (exists($possadd{$priv})) {
                  $storeprivs{$priv} = $full{$priv};                  $storeprivs{$priv} = $full{$priv};
              }              }
          }          }
          $coursepriv = ':'.join(':',map { $_.'&'.$storeprivs{$_}; } sort(keys(%storeprivs)));          $coursepriv = ':'.join(':',map { $_.'&'.$storeprivs{$_}; } sort(keys(%storeprivs)));
      }      }
      return $coursepriv;      return $coursepriv;
 }  }
   
 sub group_roleprivs {  sub group_roleprivs {
Line 7933  sub usertools_access { Line 7934  sub usertools_access {
                       blog      => 1,                        blog      => 1,
                       webdav    => 1,                        webdav    => 1,
                       portfolio => 1,                        portfolio => 1,
                         timezone  => 1,
                  );                   );
     }      }
     return if (!defined($tools{$tool}));      return if (!defined($tools{$tool}));
Line 13749  sub symbread { Line 13751  sub symbread {
     my %bighash;      my %bighash;
     my $syval='';      my $syval='';
     if (($env{'request.course.fn'}) && ($thisfn)) {      if (($env{'request.course.fn'}) && ($thisfn)) {
         my $targetfn = $thisfn;  
  if ($targetfn =~ m|^adm/wrapper/(ext/.*)|) {  
     $targetfn=$1;  
  }  
         unless ($ignoresymbdb) {          unless ($ignoresymbdb) {
             if (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'_symb.db',              if (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'_symb.db',
                           &GDBM_READER(),0640)) {                            &GDBM_READER(),0640)) {
         $syval=$hash{$targetfn};          $syval=$hash{$thisfn};
                 untie(%hash);                  untie(%hash);
             }              }
             if ($syval && $checkforblock) {              if ($syval && $checkforblock) {

Removed from v.1.1486  
changed lines
  Added in v.1.1490


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>