Diff for /loncom/interface/londocs.pm between versions 1.310 and 1.311

version 1.310, 2008/09/04 17:50:47 version 1.311, 2008/09/05 00:08:46
Line 1208  sub update_paste_buffer { Line 1208  sub update_paste_buffer {
 # Mark for copying  # Mark for copying
     my ($title,$url)=split(':',$LONCAPA::map::resources[$LONCAPA::map::order[$env{'form.markcopy'}]]);      my ($title,$url)=split(':',$LONCAPA::map::resources[$LONCAPA::map::order[$env{'form.markcopy'}]]);
     if (&is_supplemental_title($title)) {      if (&is_supplemental_title($title)) {
           &Apache::lonnet::appenv({'docs.markedcopy_supplemental' => $title});
  ($title) = &parse_supplemental_title($title);   ($title) = &parse_supplemental_title($title);
       } elsif ($env{'docs.markedcopy_supplemental'}) {
           &Apache::lonnet::delenv('docs\\.markedcopy_supplemental');
     }      }
     $url=~s{http(:|:)//https(:|:)//}{https$2//};      $url=~s{http(:|:)//https(:|:)//}{https$2//};
   
Line 1257  ENDPASTE Line 1260  ENDPASTE
 }  }
   
 sub do_paste_from_buffer {  sub do_paste_from_buffer {
     my ($coursenum,$coursedom) = @_;      my ($coursenum,$coursedom,$folder) = @_;
   
     return 0 if (!$env{'form.pastemarked'});      return 0 if (!$env{'form.pastemarked'});
   
Line 1299  sub do_paste_from_buffer { Line 1302  sub do_paste_from_buffer {
     $url       = &LONCAPA::map::qtunescape($url);      $url       = &LONCAPA::map::qtunescape($url);
 # Now insert the URL at the bottom  # Now insert the URL at the bottom
     my $newidx = &LONCAPA::map::getresidx($url);      my $newidx = &LONCAPA::map::getresidx($url);
       if ($env{'docs.markedcopy_supplemental'}) {
           if ($folder =~ /^supplemental/) {
               $title = $env{'docs.markedcopy_supplemental'};
           } else {
               (undef,undef,$title) = 
                   &parse_supplemental_title($env{'docs.markedcopy_supplemental'});
           }
       } else {
           if ($folder=~/^supplemental/) {
              $title=time.'___&&&___'.$env{'user.name'}.'___&&&___'.
                     $env{'user.domain'}.'___&&&___'.$title;
           }
       }
   
     $LONCAPA::map::resources[$newidx]= $title.':'.$url.':'.$ext.':normal:res';      $LONCAPA::map::resources[$newidx]= $title.':'.$url.':'.$ext.':normal:res';
     push(@LONCAPA::map::order, $newidx);      push(@LONCAPA::map::order, $newidx);
 # Store the result  # Store the result
Line 1419  sub editor { Line 1436  sub editor {
  }   }
           
  if ($env{'form.pastemarked'}) {   if ($env{'form.pastemarked'}) {
     &do_paste_from_buffer($coursenum,$coursedom);      &do_paste_from_buffer($coursenum,$coursedom,$folder);
     ($errtext,$fatal) = &storemap($coursenum,$coursedom,$folder.'.'.$container);      ($errtext,$fatal) = &storemap($coursenum,$coursedom,$folder.'.'.$container);
     return $errtext if ($fatal);      return $errtext if ($fatal);
  }   }

Removed from v.1.310  
changed lines
  Added in v.1.311


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