[LON-CAPA-cvs] cvs: rat / lonratsrv.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 29 Mar 2004 19:44:41 -0000


raeburn		Mon Mar 29 14:44:41 2004 EDT

  Modified files:              
    /rat	lonratsrv.pm 
  Log:
  Can now save sequences that are located in subdirectories within lonUsers/$dom/1/2/3/$cnum/userfiles
  
  
Index: rat/lonratsrv.pm
diff -u rat/lonratsrv.pm:1.25 rat/lonratsrv.pm:1.26
--- rat/lonratsrv.pm:1.25	Tue Feb 10 19:10:01 2004
+++ rat/lonratsrv.pm	Mon Mar 29 14:44:41 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Server for RAT Maps
 #
-# $Id: lonratsrv.pm,v 1.25 2004/02/11 00:10:01 albertel Exp $
+# $Id: lonratsrv.pm,v 1.26 2004/03/29 19:44:41 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -293,11 +293,11 @@
            }
         }
         $outstr.="</map>\n";
-	if ($fn=~/^\/*uploaded\/(\w+)\/(\w+)\//) {
+	if ($fn=~/^\/*uploaded\/(\w+)\/(\w+)\/(.*)$/) {
 	    $ENV{'form.output'}=$outstr;
             my $home=&Apache::lonnet::homeserver($2,$1);
             my $result=&Apache::lonnet::finishuserfileupload($2,$1,$home,
-					       'output',(split(/\//,$fn))[-1]);
+						'output',$3);
 	    if ($result != m|^/uploaded/|) {
 		$errtext.='Map not saved: A network error occured when trying to save the map. ';
 	    }