--- rat/lonratedt.pm 2002/05/21 13:41:13 1.23 +++ rat/lonratedt.pm 2002/05/21 15:04:10 1.24 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.23 2002/05/21 13:41:13 www Exp $ +# $Id: lonratedt.pm,v 1.24 2002/05/21 15:04:10 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -355,14 +355,14 @@ sub smpedt { undef @targetselect; if (defined($ENV{'form.import'})) { if (ref($ENV{'form.import'})) { - @importselect=sort($ENV->{'form.import'}); + @importselect=sort(@{ $ENV{'form.import'} }); } else { @importselect=($ENV{'form.import'}); } } if (defined($ENV{'form.target'})) { if (ref($ENV{'form.target'})) { - @targetselect=sort($ENV->{'form.target'}); + @targetselect=sort(@{ $ENV->{'form.target'} }); } else { @targetselect=($ENV{'form.target'}); } @@ -472,6 +472,19 @@ sub smpedt { } elsif ($ENV{'form.cut'}) { # ----------------------------------------------------------------------- Paste } elsif ($ENV{'form.paste'}) { + my $lastsel; + if (defined($targetselect[-1])) { + $lastsel=$targetselect[-1]; + } else { + $lastsel=$#order+1; + } + my @newsequence; + my @curimport=split(/\&/,$ENV{'form.curimpdetail'}); + foreach (@importselect) { + $newsequence[$#newsequence+1]=$curimport[$_]; + } + &pastetarget($lastsel,@newsequence); + &storemap(&Apache::lonnet::filelocation('',$url)); # ------------------------------------------------ } # ------------------------------------------------------------ Assemble windows