[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 31 Mar 2005 21:30:54 -0000


albertel		Thu Mar 31 16:30:54 2005 EDT

  Modified files:              
    /loncom/homework	inputtags.pm 
  Log:
  - for got to add in the commas between files
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.160 loncom/homework/inputtags.pm:1.161
--- loncom/homework/inputtags.pm:1.160	Thu Mar 31 16:24:29 2005
+++ loncom/homework/inputtags.pm	Thu Mar 31 16:30:54 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.160 2005/03/31 21:24:29 albertel Exp $
+# $Id: inputtags.pm,v 1.161 2005/03/31 21:30:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -335,15 +335,15 @@
 	    '<input type="text" size="50" name="HWPORT'.$part.'_'.$id.'" value="" />'.
 	    '<br />';
 	if ($Apache::lonhomework::history{"resource.$part.$id.portfiles"}=~/[^\s]/){
-	    my $filelist;
+	    my @filelist;
 	    foreach my $file (split(',',&Apache::lonnet::unescape($Apache::lonhomework::history{"resource.$part.$id.portfiles"}))) {
 		my (undef,undef,$domain,$user)=&Apache::lonxml::whichuser();
 		my $url="/uploaded/$domain/$user/portfolio$file";
 		my $icon=&Apache::loncommon::icon($url);
-		$filelist.='<a href="'.$url.'"><img src="'.$icon.
-		    '" border="0" />'.$file.'</a>';
+		push(@filelist,'<a href="'.$url.'"><img src="'.$icon.
+		     '" border="0" />'.$file.'</a>');
 	    }
-	    $result.=&mt("Portfolio files previously selected: <strong>[_1]</strong>",$filelist);
+	    $result.=&mt("Portfolio files previously selected: <strong>[_1]</strong>",join(', ',@filelist));
 	}
     }
     $result.='</td></tr>';