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

banghart lon-capa-cvs@mail.lon-capa.org
Thu, 29 Jul 2004 17:04:21 -0000


banghart		Thu Jul 29 13:04:21 2004 EDT

  Modified files:              
    /loncom/interface	portfolio.pm 
  Log:
  
  	File upload working now:
  
  
  
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.19 loncom/interface/portfolio.pm:1.20
--- loncom/interface/portfolio.pm:1.19	Wed Jul 28 18:30:31 2004
+++ loncom/interface/portfolio.pm	Thu Jul 29 13:04:21 2004
@@ -218,7 +218,6 @@
     # as well as information about the home server directory structure, specifically
     # the path to the users userfiles directory.    
     # 
-    $r->print('/userfiles/portfolio'.$currentPath.'<br>');
     my $portfolio_root = &Apache::loncommon::propath($ENV{'user.domain'},
 						     $ENV{'user.name'}).
 						       '/userfiles/portfolio';
@@ -251,6 +250,15 @@
     # Display begins here
     #
     ##############################
+    $r->print('<table border="0" cellspacing="2" cellpadding="2"><tr valign="middle">');
+    $r->print('<td bgcolor="#ccddaa" align="center">');
+    my $displayOut = '<form method="post" enctype="multipart/form-data">';
+    $displayOut = $displayOut.'<input name="uploaddoc" type="file" />'.
+        '<input type="hidden" name="currentpath" value="'.$currentPath.'" />'.
+        '<input type="submit" name="storeupl" value="Upload" />'.
+        '</form>';
+    $r->print($displayOut);
+	$r->print('</td></tr></table>');	  
     my @tree = split (/\//,$currentPath);
     $r->print('<font size="+2">'.makeAnchor('portfolio','/').'/');
     if (@tree > 1){