version 1.34, 2002/08/31 00:42:30
|
version 1.37, 2002/10/03 15:07:25
|
Line 300 sub pastetarget {
|
Line 300 sub pastetarget {
|
my $ext='false'; |
my $ext='false'; |
if ($url=~/^http\:\/\//) { $ext='true'; } |
if ($url=~/^http\:\/\//) { $ext='true'; } |
$url=~s/\:/\:/g; |
$url=~s/\:/\:/g; |
|
$name=~s/\:/\:/g; |
$resources[$idx]=$name.':'.$url.':'.$ext.':normal:res'; |
$resources[$idx]=$name.':'.$url.':'.$ext.':normal:res'; |
} |
} |
} |
} |
Line 331 sub startfinish {
|
Line 332 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 481 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= |
Line 700 sub smpedt {
|
Line 711 sub smpedt {
|
$targetdetail.='&'.&Apache::lonnet::escape($name).'='. |
$targetdetail.='&'.&Apache::lonnet::escape($name).'='. |
&Apache::lonnet::escape($url); |
&Apache::lonnet::escape($url); |
$idx++; |
$idx++; |
|
$name=~s/\:/\:/g; |
'<option value="'.$idx.'">'.$name.'</option>'; |
'<option value="'.$idx.'">'.$name.'</option>'; |
} @order); |
} @order); |
|
|
Line 736 sub smpedt {
|
Line 748 sub smpedt {
|
$bodytag |
$bodytag |
$buttons |
$buttons |
<font color=red>$errtext</font> |
<font color=red>$errtext</font> |
<h1>$url</h1> |
|
<form name=simpleedit method=post> |
<form name=simpleedit method=post> |
<input type=hidden name=forcesmp value=1> |
<input type=hidden name=forcesmp value=1> |
<table> |
<table> |
<tr><th width="40%">Import</th> |
<tr><th width="40%">Temporary Assembly Workspace</th> |
<th> </th> |
<th> </th> |
<th width="40%">Target</th></tr> |
<th width="40%">File: $url</th></tr> |
<tr><td bgcolor="#FFFFCC"> |
<tr><td bgcolor="#FFFFCC"> |
<input type=button onClick="javascript:groupsearch()" value="Group Search"> |
<input type=button onClick="javascript:groupsearch()" value="Search"> |
<input type=button onClick="javascript:groupimport();" value="Group Import"> |
<input type=button onClick="javascript:groupimport();" value="Import"> |
after selected |
after selected |
<hr> |
<hr> |
<input type=text size=20 name=importmap> |
<input type=text size=20 name=importmap> |
Line 759 value="Browse"><input type=submit name=l
|
Line 770 value="Browse"><input type=submit name=l
|
</td><td> </td><td bgcolor="#FFFFCC"> |
</td><td> </td><td bgcolor="#FFFFCC"> |
|
|
<input type=button onClick= |
<input type=button onClick= |
"javascript:impfortarget.value=1;groupsearch()" value="Group Search"> |
"javascript:impfortarget.value=1;groupsearch()" value="Search"> |
<input type=button onClick= |
<input type=button onClick= |
"javascript:impfortarget.value=1;groupimport();" value="Group Import"> |
"javascript:impfortarget.value=1;groupimport();" value="Import"> |
after selected |
after selected |
<hr>$targetmsg |
<hr>$targetmsg |
<input type=submit name="revert" value="Revert to Last Saved"> |
<input type=submit name="revert" value="Revert to Last Saved"> |