--- loncom/imspackages/imsimportdocs.pm 2004/03/16 19:20:58 1.3 +++ loncom/imspackages/imsimportdocs.pm 2004/03/21 20:44:58 1.5 @@ -44,8 +44,8 @@ function setOptions(caller,itemnum) { if (caller == "board") { opForm.elements[menu].options[0] = new Option("Select","-1",true,true) opForm.elements[menu].options[1] = new Option("Import topics only","topics",true,true) - opForm.elements[menu].options[2] = new Option("Import topics & posts (with author)","allpost",true,true) - opForm.elements[menu].options[3] = new Option("Import topics & posts (no author)","allanon",true,true) + opForm.elements[menu].options[2] = new Option("Import topics + posts (with author)","allpost",true,true) + opForm.elements[menu].options[3] = new Option("Import topics + posts (no author)","allanon",true,true) } else { if (caller == "users") { @@ -539,6 +539,20 @@ sub display_three { my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo); if ($manifest_result eq 'ok') { + my @path = ($cdom,$crs,$timenow); + my $fullpath = $Apache::lonnet::perlvar{'lonDocRoot'}.'/userfiles'; + foreach my $item (@path) { + $fullpath .= '/'.$item; + if (!-e "$fullpath") { + mkdir("$fullpath",0770); + } + } + my @namedirs = ("resfiles","sequences","pages","problems"); + foreach my $name (@namedirs) { + if (!-e "$fullpath/$name") { + mkdir("$fullpath/$name",0770); + } + } &Apache::imsprocessor::target_resources(\%resources,\%imports,\@targets); my $copy_result = &Apache::imsprocessor::copy_resources('DOCS',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$chome,$destdir,$timenow);