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

banghart lon-capa-cvs@mail.lon-capa.org
Sun, 02 Jul 2006 00:51:25 -0000


banghart		Sat Jul  1 20:51:25 2006 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  	Bug #4869. Don't show handback box for uploaded files.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.367 loncom/homework/grades.pm:1.368
--- loncom/homework/grades.pm:1.367	Thu Jun 29 20:30:00 2006
+++ loncom/homework/grades.pm	Sat Jul  1 20:51:25 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.367 2006/06/30 00:30:00 albertel Exp $
+# $Id: grades.pm,v 1.368 2006/07/02 00:51:25 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1551,15 +1551,17 @@
 	next if (!@$files);
 	my $file_counter = 1;
 	foreach my $file (@$files) {
-	    my ($file_path, $file_disp) = ($file =~ m|(.+/)(.+)$|);
-	    my ($name,$version,$ext) = &file_name_version_ext($file_disp);
-	    $file_disp = "$name.$ext";
-	    $file = $file_path.$file_disp;
-	    $result.=&mt('Return commented version of [_1] to student.',
-			 '<span class="LC_filename">'.$file_disp.'</span>');
-	    $result.='<input type="file"   name="'.$prefix.'returndoc'.$file_counter.'" />'."\n";
-	    $result.='<input type="hidden" name="'.$prefix.'origdoc'.$file_counter.'" value="'.$file.'" /><br />';
-	    $file_counter++;
+	    if ($file =~ /\/portfolio\//) {
+    	        my ($file_path, $file_disp) = ($file =~ m|(.+/)(.+)$|);
+    	        my ($name,$version,$ext) = &file_name_version_ext($file_disp);
+    	        $file_disp = "$name.$ext";
+    	        $file = $file_path.$file_disp;
+    	        $result.=&mt('Return commented version of [_1] to student.',
+    			 '<span class="LC_filename">'.$file_disp.'</span>');
+    	        $result.='<input type="file"   name="'.$prefix.'returndoc'.$file_counter.'" />'."\n";
+    	        $result.='<input type="hidden" name="'.$prefix.'origdoc'.$file_counter.'" value="'.$file.'" /><br />';
+    	        $file_counter++;
+	    }
 	}
     }
     return $result;