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

raeburn raeburn@source.lon-capa.org
Thu, 18 Dec 2008 13:03:50 -0000


raeburn		Thu Dec 18 13:03:50 2008 EDT

  Modified files:              (Branch: version_2_8_X)
    /loncom/homework	inputtags.pm 
  Log:
  - Backport 1.253, 1.254.
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.248.2.3 loncom/homework/inputtags.pm:1.248.2.4
--- loncom/homework/inputtags.pm:1.248.2.3	Wed Dec 10 22:58:46 2008
+++ loncom/homework/inputtags.pm	Thu Dec 18 13:03:50 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.248.2.3 2008/12/10 22:58:46 raeburn Exp $
+# $Id: inputtags.pm,v 1.248.2.4 2008/12/18 13:03:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -854,14 +854,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 />';
+            }
 	}
     }
 
@@ -1183,7 +1196,7 @@
 		$trystr = '\vskip 0 mm ';
 	    }
 	} else {
-	    $trystr = "<td><nobr>".$tries_text." $tries";
+	    $trystr = "<td><span class="LC_nobreak">".$tries_text." $tries";
 	    if ($Apache::lonhomework::parsing_a_task) {
 	    } elsif($env{'request.state'} ne 'construct') {
 		$trystr.="/$maxtries";
@@ -1192,7 +1205,7 @@
 		    $trystr.="/".$Apache::inputtags::params{'maxtries'};
 		}
 	    }
-	    $trystr.="</nobr></td>";
+	    $trystr.="</span></td>";
 	}
     }