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

banghart lon-capa-cvs@mail.lon-capa.org
Mon, 18 Oct 2004 22:14:15 -0000


banghart		Mon Oct 18 18:14:15 2004 EDT

  Modified files:              
    /loncom/homework	essayresponse.pm 
  Log:
  	Rename portfolio file field
  	 return $portfiles as comma delimited string of filenames
  
  
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.39 loncom/homework/essayresponse.pm:1.40
--- loncom/homework/essayresponse.pm:1.39	Mon Oct 11 20:08:44 2004
+++ loncom/homework/essayresponse.pm	Mon Oct 18 18:14:15 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.39 2004/10/12 00:08:44 banghart Exp $
+# $Id: essayresponse.pm,v 1.40 2004/10/18 22:14:15 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -51,10 +51,10 @@
 	my $uploadedfile= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.uploadedfile"},'<>&"');
 	$result='<br /><table border="1">';
 	$result.='<tr><td>'.
-        '<a href='."'".'javascript:void(window.open("/adm/portfolio?action=selectfile","cat","height=300,'.
+        '<a href='."'".'javascript:void(window.open("/adm/portfolio?action=selectfile&fieldname=HWPORT'.$part.'_'.$id.'","cat","height=400,'.
         'width=500,scrollbars=1,resizable=1,menubar=0,location=1"))'."'".'>Select Portfolio Files</a>'.
         '<br />'.
-            '<input type="textarea" name="selectedfiles" value="select files will appear here" /><br />'.
+            '<input type="text" name="HWPORT'.$part.'_'.$id.'" value="Selected files will appear here." /><br />'.
 	    '<input type="radio" name="HWDRAFT'.$part.'_'.$id.'" value="yes" checked> '.
 	    &mt('Submit entries below as answer to receive credit').' <br />'.
 	    '<input type="radio" name="HWDRAFT'.$part.'_'.$id.'" value="no"> '.
@@ -112,6 +112,7 @@
 	} elsif ( defined($ENV{'form.submitted'}) ) {
 	    my $response      = $ENV{'form.HWVAL_'.$id};
             my $filename= $ENV{'form.HWFILE'.$part.'_'.$id.'.filename'};
+            my $portfiles = $ENV{'form.HWPORT'.$part.'_'.$id.'.filename'};
 	    if (( $response =~ /[^\s]/) || ($filename =~ /[^\s]/)) {
  		my $award;
 		if ($ENV{'form.HWDRAFT'.$part.'_'.$id} eq 'yes') {