[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 02 Feb 2005 22:15:06 -0000


albertel		Wed Feb  2 17:15:06 2005 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - BUG#3892 - put all doscs in seperate folders so that way you can upload several copies opf the same file in an intuitive manner
  
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.165 loncom/interface/londocs.pm:1.166
--- loncom/interface/londocs.pm:1.165	Sun Jan 30 07:51:21 2005
+++ loncom/interface/londocs.pm	Wed Feb  2 17:15:06 2005
@@ -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 @@
 	    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 @@
 		  $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]=