--- loncom/interface/londocs.pm 2005/01/30 12:51:21 1.165 +++ loncom/interface/londocs.pm 2005/02/02 22:15:06 1.166 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.165 2005/01/30 12:51:21 www Exp $ +# $Id: londocs.pm,v 1.166 2005/02/02 22:15:06 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1006,7 +1006,8 @@ sub editor { if ( ($folder=~/^$1/) || ($1 eq 'default') ) { # this is for a course, not a user, so set coursedoc flag # probably the only place in the system where this should be "1" - my $url=&Apache::lonnet::userfileupload('uploaddoc',1,'docs'); + my $newidx=$#Apache::lonratedt::resources+1; + my $url=&Apache::lonnet::userfileupload('uploaddoc',1,'docs/'.$newidx); my $ext='false'; if ($url=~/^http\:\/\//) { $ext='true'; } $url=~s/\:/\:/g; @@ -1018,7 +1019,6 @@ sub editor { $comment=time.'___&&&___'.$ENV{'user.name'}.'___&&&___'. $ENV{'user.domain'}.'___&&&___'.$comment; } - my $newidx=$#Apache::lonratedt::resources+1; $Apache::lonratedt::resources[$newidx]= $comment.':'.$url.':'.$ext.':normal:res'; $Apache::lonratedt::order[$#Apache::lonratedt::order+1]=