version 1.34, 2002/08/31 00:42:30
|
version 1.35, 2002/09/02 15:27:08
|
Line 331 sub startfinish {
|
Line 331 sub startfinish {
|
|
|
sub storemap { |
sub storemap { |
my $realfn=shift; |
my $realfn=shift; |
my $fn=$realfn.'.tmp'; |
my $fn=$realfn; |
unless (-e $fn) { |
# unless this is forced to work from the original file, use a temporary file |
copy($realfn,$fn); |
# instead |
|
unless (shift) { |
|
$fn=$realfn.'.tmp'; |
|
unless (-e $fn) { |
|
copy($realfn,$fn); |
|
} |
} |
} |
|
# store data either into tmp or real file |
&startfinish(); |
&startfinish(); |
my $output='graphdef<:>no'; |
my $output='graphdef<:>no'; |
my $k=1; |
my $k=1; |
Line 474 sub smpedt {
|
Line 480 sub smpedt {
|
$targetmsg='<b>Saving ...</b><br>'; |
$targetmsg='<b>Saving ...</b><br>'; |
copy($tmpfn,&Apache::lonnet::filelocation('',$url)); |
copy($tmpfn,&Apache::lonnet::filelocation('',$url)); |
unlink($tmpfn); |
unlink($tmpfn); |
|
my ($errtext,$fatal)= |
|
&mapread(&Apache::lonnet::filelocation('',$url),''); |
} |
} |
if ($ENV{'form.revert'}) { |
if ($ENV{'form.revert'}) { |
$targetmsg='<b>Reverting ...</b><br>'; |
$targetmsg='<b>Reverting ...</b><br>'; |
unlink($tmpfn); |
unlink($tmpfn); |
|
my ($errtext,$fatal)= |
|
&mapread(&Apache::lonnet::filelocation('',$url),''); |
} |
} |
if (-e $tmpfn) { |
if (-e $tmpfn) { |
$targetmsg= |
$targetmsg= |