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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 28 Jun 2004 16:12:07 -0000


albertel		Mon Jun 28 12:12:07 2004 EDT

  Modified files:              
    /loncom/interface	portfolio.pm 
  Log:
  - adding some FIXMEs and xhtmlizing the HTML
  
  
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.8 loncom/interface/portfolio.pm:1.9
--- loncom/interface/portfolio.pm:1.8	Mon Jun 28 12:07:47 2004
+++ loncom/interface/portfolio.pm	Mon Jun 28 12:12:06 2004
@@ -40,8 +40,8 @@
     my $anchor = '<a href="/adm/portfolio?selectfile='.$fileName.'&currentpath='.$currentPath.'">'.$fileName.'</a>';
 #    my $button = '
 #		<form method="POST" action="/adm/portfolio">
-#		<input type="hidden" name="selectfile" value="'.$fileName.'">
-#		<input type="submit" value="'.$fileName.'" name="storeupl">
+#		<input type="hidden" name="selectfile" value="'.$fileName.'" />
+#		<input type="submit" value="'.$fileName.'" name="storeupl" />
 #		</form>
 #		';
     return $anchor;
@@ -108,34 +108,34 @@
     
     $displayOut = $displayOut.'<form method="POST">
 			<input type="hidden" name="selectfile" 
-			value="'.$currentFile.'">
-			<input type="hidden" name="fileaction" value="delete"> 
+			value="'.$currentFile.'" />
+			<input type="hidden" name="fileaction" value="delete" /> 
 			<center>
 			<input type="submit" 
 			
-			value="Delete '.$currentFile.'">
+			value="Delete '.$currentFile.'" />
 			</center>
 			</form>
 			<hr />
 			<form method="POST">
 			<input type="hidden" name="selectfile" 
-			value="'.$currentFile.'">
-			<input type="hidden" name="fileaction" value="rename"> 
-			<input type="input" name="filenewname" value="Type new name here"> 
+			value="'.$currentFile.'" />
+			<input type="hidden" name="fileaction" value="rename" /> 
+			<input type="input" name="filenewname" value="Type new name here" /> 
 			<input type="submit" 
-			value="Rename '.$currentFile.'">
+			value="Rename '.$currentFile.'" />
 			</form>
-			<hr>';
-    $displayOut = $displayOut.'<hr>Add a file to your portfolio';
+			<hr />';
+    $displayOut = $displayOut.'<hr />Add a file to your portfolio';
     # file upload form 
     $displayOut = $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">'.
+    $displayOut = $displayOut.'<input name="uploaddoc" type="file" />'.
+	'<input type="hidden" name="currentpath" value="'.$currentPath.'" />'.
+	'<input type="submit" name="storeupl" value="Upload" />'.
 	'</form><hr>';
     $displayOut = $displayOut.'<form method="POST">
-		<input name="subdir" type="text" >
-		<input type="submit" value="Create Subdirectory">
+		<input name="subdir" type="text" />
+		<input type="submit" value="Create Subdirectory" />
 		</form>
 			';
     return $displayOut;
@@ -153,12 +153,16 @@
     my $isFile;
     my $isDir;
     # send header
+    # FIXME need to start using
+    # &Apache::loncommon::content_type()
     $r->content_type('text/html');
     $r->send_http_header;
     $r->print('<html><head><title>'.
               'Portfolio Management'.
               "</title></head>\n");
 
+    # FIXME need to start using
+    # &Apache::loncommon::bodytag()
     $r->print('
 	<body bgcolor="dogfood">
 	<blockquote>');
@@ -246,11 +250,11 @@
     ##############################
     $r->print('<hr /> start ');
     $r->print($udir);
-    $r->print('<table border=1><tr><td>');
+    $r->print('<table border="1"><tr><td>');
     $r->print(&displayDirectory($currentPath, $currentFile, $isDir, @dirList));
-    $r->print('</td>><td>');
+    $r->print('</td><td>');
     $r->print(&displayActions($currentPath, $currentFile, $isDir, $isFile));
-    $r->print('</td>></tr></table>');
+    $r->print('</td></tr></table>');
     $r->print('<br />end display<br /><hr />');
     $r->print('</blockquote></body>');
     return OK;