[LON-CAPA-cvs] cvs: loncom /interface printout.pl

foxr lon-capa-cvs@mail.lon-capa.org
Mon, 12 Sep 2005 10:16:56 -0000


foxr		Mon Sep 12 06:16:56 2005 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  Add help links for print failures.
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.89 loncom/interface/printout.pl:1.90
--- loncom/interface/printout.pl:1.89	Thu Aug  4 17:26:23 2005
+++ loncom/interface/printout.pl	Mon Sep 12 06:16:52 2005
@@ -381,6 +381,7 @@
 	      print "It probably has errors in it.<br />";
 	      print "With very high probability this error occured in ".$badtext."<br /><br />";
 	      print "Here are the error messages in the LaTeX log file<br /><pre>";
+
 	      my $sygnal = 0;
 	      for (my $i=0;$i<=$#content_of_file;$i++) {
 		  if ($content_of_file[$i]=~m/^Runaway argument?/ or $content_of_file[$i]=~m/^!/) {
@@ -412,6 +413,9 @@
 	      $texfile=~s/\/home\/httpd//;
 	      print "<a href=\"$texfile\">Your original LaTeX file </a></big></b>";
 	      print "\n";
+	      my $help_text = &Apache::loncommon::help_open_topic("Print_Resource", "Help on printing");
+	      print ("$help_text");
+
 	  } else {		# Student role...
 	      #  at this point:
 	      #    $body_log_file - contains the log file.
@@ -423,7 +427,10 @@
 	      my $tex_handle = IO::File->new($name_file);
 	      my @tex_contents = <$tex_handle>;
 	      &send_error_mail($identifier, $badresource, $body_log_file, \@tex_contents);
-	      print "<br />A message has been sent to the instructor describing this failure<br />"
+	      print "<br />A message has been sent to the instructor describing this failure<br />";
+	      my $help_text = &Apache::loncommon::help_open_topic("Print_Resource", "Help on printing");
+	      print  ("$help_text");
+
 	  }
 
       } elsif ($body_log_file=~m/<inserted text>/) {