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

raeburn raeburn@source.lon-capa.org
Mon, 15 Dec 2008 20:24:53 -0000


raeburn		Mon Dec 15 20:24:53 2008 EDT

  Modified files:              
    /loncom/homework	inputtags.pm 
  Log:
  - Exclude HTML from printouts when printing resource with file(s) returned by instructor. 
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.253 loncom/homework/inputtags.pm:1.254
--- loncom/homework/inputtags.pm:1.253	Thu Dec 11 14:52:30 2008
+++ loncom/homework/inputtags.pm	Mon Dec 15 20:24:53 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.253 2008/12/11 14:52:30 bisitz Exp $
+# $Id: inputtags.pm,v 1.254 2008/12/15 20:24:53 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -894,14 +894,27 @@
     my (undef,undef,$domain,$user)=&Apache::lonnet::whichuser();
     foreach my $resid(@Apache::inputtags::response){
         if ($Apache::lonhomework::history{"resource.$part.$resid.handback"}) {
-	    $message.='<br />';
+            if ($target eq 'tex') {
+                $message.= "\\\\\n";
+            } else {
+                $message.='<br />';
+            }
 	    my @files = split(/\s*,\s*/,
 			      $Apache::lonhomework::history{"resource.$part.$resid.handback"});
 	    my $file_msg;
 	    foreach my $file (@files) {
-		$file_msg.= '<br /><a href="/uploaded/'."$domain/$user".'/'.$file.'">'.$file.'</a>';
+                if ($target eq 'tex') {
+                    $file_msg.= "\\\\\n".$file;
+                } else {
+                    $file_msg.= '<br /><a href="/uploaded/'."$domain/$user".'/'.$file.'">'.$file.'</a>';
+                }
 	    }
 	    $message .= &mt('Returned file(s): [_1]',$file_msg);
+            if ($target eq 'tex') {
+                $message.= "\\\\\n";
+            } else {
+                $message.='<br />';
+            }
 	}
     }