--- loncom/interface/londocs.pm 2005/06/08 20:44:54 1.181 +++ loncom/interface/londocs.pm 2005/06/10 17:51:29 1.187 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.181 2005/06/08 20:44:54 www Exp $ +# $Id: londocs.pm,v 1.187 2005/06/10 17:51:29 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1076,10 +1076,12 @@ sub editor { my ($cmd,$idx)=split(/\_/,$env{'form.cmd'}); if ($cmd eq 'del') { my (undef,$url)=split(':',$Apache::lonratedt::resources[$Apache::lonratedt::order[$idx]]); - if ($url=~m|/+uploaded/\Q$coursedom\E/\Q$coursenum\E/|) { + if (($url=~m|/+uploaded/\Q$coursedom\E/\Q$coursenum\E/|) && + ($url!~/\.(page|sequence|problem|exam|quiz|assess|survey|form|library)$/)) { &Apache::lonnet::removeuploadedurl($url); + } else { + &Apache::lonratedt::makezombie($Apache::lonratedt::order[$idx]); } - &Apache::lonratedt::makezombie($Apache::lonratedt::order[$idx]); for (my $i=$idx;$i<$#Apache::lonratedt::order;$i++) { $Apache::lonratedt::order[$i]= $Apache::lonratedt::order[$i+1]; @@ -1865,15 +1867,15 @@ sub changewarning { if (!defined($message)) { $message='Changes will become active for your current session after [_1], or the next time you log in.'; } - $r->print( -''. -'
'. + $r->print("\n\n". +''."\n". +''. '

'. &mt($message,' '). -$help{'Caching'}.'

'); +$help{'Caching'}.''."\n\n"); } # ================================================================ Main Handler @@ -2118,7 +2120,7 @@ function removeres(folderpath,index,oldt } function cutres(folderpath,index,oldtitle,container,pagesymb) { - if (confirm('WARNING: Cutting a resource makes associated grades and scores inaccessible,\\neven if it is pasted in again elsewhere!\\nCut "'+oldtitle+'"?')) { + if (confirm('WARNING: Cutting a resource makes associated grades and scores inaccessible!\\nGrades remain inaccessible if resource is pasted into another folder.\\nCut "'+oldtitle+'"?')) { this.document.forms.renameform.cmd.value='cut_'+index; this.document.forms.renameform.markcopy.value=index; if (container == 'sequence') { @@ -2167,6 +2169,7 @@ ENDNEWSCRIPT 'impo' => 'Import', 'selm' => 'Select Map', 'load' => 'Load Map', + 'reco' => 'Recover Deleted Resources', 'newf' => 'New Folder', 'newp' => 'New Composite Page', 'extr' => 'External Resource', @@ -2257,7 +2260,11 @@ ENDCOURSEVERIFY '.sequence'; my $pageseq = '/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. '.page'; - + my $container='sequence'; + if ($env{'form.pagepath'}) { + $container='page'; + } + my $readfile='/uploaded/'.$coursedom.'/'.$coursenum.'/'.$folder.'.'.$container; $r->print(< $lt{'uplm'} @@ -2266,7 +2273,7 @@ ENDCOURSEVERIFY $lt{'file'}:
-
+
$lt{'title'}:
@@ -2298,6 +2305,10 @@ value="$lt{'selm'}"> + +
ENDFORM unless ($env{'form.pagepath'}) { $r->print(< + ENDFORM } if ($env{'form.pagepath'}) { @@ -2426,8 +2438,8 @@ $uploadtag onClick="javascript:makeexamupload();" /> $help{'Score_Upload_Form'} + ENDBLOCK - $r->print(''); } $r->print(''."\n". ''); @@ -2516,7 +2528,7 @@ ENDSUPFORM } } if ($allowed) { - $r->print('
'); + $r->print('
'); } $r->print(''); } else {