--- loncom/interface/londocs.pm 2005/11/24 16:01:04 1.214 +++ loncom/interface/londocs.pm 2006/01/27 23:14:20 1.220 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.214 2005/11/24 16:01:04 www Exp $ +# $Id: londocs.pm,v 1.220 2006/01/27 23:14:20 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1373,7 +1373,7 @@ sub process_secondary_uploads { if (($folder eq 'default') || ($folder eq 'supplemental')) { $destination .= 'default/'; } elsif ($folder =~ /^(default|supplemental)_(\d+)$/) { - $destination .= $1.'/'; + $destination .= $2.'/'; } $destination .= $newidx; my ($url,$filename); @@ -1401,6 +1401,7 @@ sub entryline { $foldertitle; } $renametitle=~s/\"\;/\\\"/g; + $renametitle=~s/\\/\\\\/g; my $line=''; # Edit commands my $container; @@ -1555,7 +1556,7 @@ END &Apache::lonnet::allowuploaded('/adm/coursedoc',$url); } } - $url=~s/^http\&colon\;\/\//\/adm\/wrapper\/ext\//; + $url=~s-^http(\&colon\;|:)//-/adm/wrapper/ext/-; if ((!$isfolder) && ($residx) && ($folder!~/supplemental/) && (!$ispage)) { my $symb=&Apache::lonnet::symbclean( &Apache::lonnet::declutter('uploaded/'. @@ -1588,7 +1589,7 @@ END } } my $parameterset=' '; - if ($isfolder) { + if ($isfolder || $extension eq 'sequence') { my $foldername=&Apache::lonnet::escape($foldertitle); my $folderpath=$env{'form.folderpath'}; if ($folderpath) { $folderpath.='&' }; @@ -2263,6 +2264,15 @@ function makesmpproblem() { } } +function makedropbox() { + var title=prompt('Listed Title for the Drop Box'); + if (title) { + this.document.forms.newdropbox.importdetail.value= + title+'=/res/lib/templates/DropBox.problem'; + this.document.forms.newdropbox.submit(); + } +} + function makebulboard() { var title=prompt('Listed Title for the Bulletin Board'); if (title) { @@ -2478,6 +2488,7 @@ ENDNEWSCRIPT 'navc' => 'Navigate Contents', 'sipa' => 'Simple Page', 'sipr' => 'Simple Problem', + 'drbx' => 'Drop Box', 'scuf' => 'Score Upload Form', 'bull' => 'Bulletin Board', 'mypi' => 'My Personal Info', @@ -2530,9 +2541,9 @@ $uploadtag $help{'Check_Resource_Versions'} $dumpbut $exportbut - + ENDCOURSEVERIFY $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', @@ -2696,6 +2707,14 @@ $uploadtag onClick="javascript:makesmpproblem();" />$help{'Simple Problem'} +
+$uploadtag + + + + +

$uploadtag