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

raeburn raeburn@source.lon-capa.org
Mon, 23 Aug 2010 03:21:26 -0000


raeburn		Mon Aug 23 03:21:26 2010 EDT

  Modified files:              
    /loncom/homework	essayresponse.pm 
  Log:
  - PartID in HWFILE and HWPORT form element names has . replaced with _ to
    support bridgetasks.  HWFILETOOBIG does not.
  
  
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.109 loncom/homework/essayresponse.pm:1.110
--- loncom/homework/essayresponse.pm:1.109	Sun Aug 22 19:00:15 2010
+++ loncom/homework/essayresponse.pm	Mon Aug 23 03:21:26 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.109 2010/08/22 19:00:15 raeburn Exp $
+# $Id: essayresponse.pm,v 1.110 2010/08/23 03:21:26 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -155,10 +155,12 @@
 	    $increment=&Apache::response::scored_response($part,$id);
 	} elsif ( &Apache::response::submitted() ) {
 	    my $response      = $env{'form.HWVAL_'.$id};
-            my $filename = $env{'form.HWFILE'.$part.'_'.$id.'.filename'} || 
+            my $jspart=$part;
+            $jspart=~s/\./_/g;
+            my $filename = $env{'form.HWFILE'.$jspart.'_'.$id.'.filename'} || 
                            $env{'form.HWFILETOOBIG'.$part.'_'.$id};
-            my $portfiles = $env{'form.HWPORT'.$part.'_'.$id};
-            my @deletions = &Apache::loncommon::get_env_multiple('form.HWFILE'.$part.'_'.$id.'_delete');
+            my $portfiles = $env{'form.HWPORT'.$jspart.'_'.$id};
+            my @deletions = &Apache::loncommon::get_env_multiple('form.HWFILE'.$jspart.'_'.$id.'_delete');
             my ($is_submit,$was_draft);
             if ($env{'form.HWDRAFT'.$part.'_'.$id} eq 'yes') {
                  $is_submit = 1;
@@ -331,7 +333,7 @@
             }
         }
     }
-    if ($env{'form.HWFILETOOBIG'.$jspart.'_'.$id} ne '') {
+    if ($env{'form.HWFILETOOBIG'.$part.'_'.$id} ne '') {
         $$award = 'EXCESS_FILESIZE';
     } elsif ($env{'form.HWFILE'.$jspart.'_'.$id.'.filename'} ne '') {
         my $newfile = $env{'form.HWFILE'.$jspart.'_'.$id.'.filename'};