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

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 25 Jul 2005 00:50:03 -0000


raeburn		Sun Jul 24 20:50:03 2005 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  Correction to path used to store supplemental uploads.  Should be userfiles/supplemental/default/$id or userfiles/$unixtime/$id, where $unixtime is numerical part of sequence name and $id is id of resource in sequence.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.194 loncom/interface/londocs.pm:1.195
--- loncom/interface/londocs.pm:1.194	Sun Jul 24 15:31:00 2005
+++ loncom/interface/londocs.pm	Sun Jul 24 20:50:00 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.194 2005/07/24 19:31:00 raeburn Exp $
+# $Id: londocs.pm,v 1.195 2005/07/25 00:50:00 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1288,9 +1288,12 @@
     my ($upload_output,$coursedom,$coursenum,$formname,$num,$newidx) = @_;
     my $folder=$env{'form.folder'};
     my $destination = 'docs/';
-    if ($folder eq 'default') {
+    if ($folder =~ /^supplemental/) {
+        $destination = 'supplemental/';
+    }
+    if (($folder eq 'default') || ($folder eq 'supplemental')) {
         $destination .= 'default/';
-    } elsif ($folder =~ /^default_(\d+)$/) {
+    } elsif ($folder =~ /^(default|supplemental)_(\d+)$/) {
         $destination .=  $1.'/';
     }
     $destination .= $newidx;