Diff for /loncom/interface/printout.pl between versions 1.83 and 1.84

version 1.83, 2005/07/05 10:23:35 version 1.84, 2005/07/05 13:31:27
Line 59  sub is_student { Line 59  sub is_student {
 #   Debugging:  Dump the environment for debugging.  #   Debugging:  Dump the environment for debugging.
 #  #
 sub dumpenv  {  sub dumpenv  {
     print "<br>-------------------<br>";      print "<br />-------------------<br />";
     foreach my $key (sort (keys %env)) {      foreach my $key (sort (keys %env)) {
  print "<br>$key -> $env{$key}";   print "<br />$key -> $env{$key}";
     }      }
     print "<br>-------------------<br>";      print "<br />-------------------<br />";
 }  }
   
 #  #
Line 113  sub send_error_mail { Line 113  sub send_error_mail {
   
  if (&is_student( $courseid, $coursedom)) {   if (&is_student( $courseid, $coursedom)) {
     # build the subject and message body:      # build the subject and message body:
     # print "sending message to course coordinators.<br>";      # print "sending message to course coordinators.<br />";
   
     # Todo: Convert badurl into a url from file path:      # Todo: Convert badurl into a url from file path:
   
Line 130  sub send_error_mail { Line 130  sub send_error_mail {
     }      }
     my (undef, %receivers) = &Apache::lonfeedback::decide_receiver(undef, 0,      my (undef, %receivers) = &Apache::lonfeedback::decide_receiver(undef, 0,
   1,1,1);    1,1,1);
     # print "<BR> sending...section:  $env{'request.course.sec'}";      # print "<br /> sending...section:  $env{'request.course.sec'}";
     foreach my $dest (keys %receivers) {      foreach my $dest (keys %receivers) {
  # print "<BR> dest is $dest";   # print "<br /> dest is $dest";
  my @destinfo = split(/:/,$dest);   my @destinfo = split(/:/,$dest);
  my $user = $destinfo[0];   my $user = $destinfo[0];
  my $dom  = $destinfo[1];   my $dom  = $destinfo[1];
Line 341  foreach $texfile (@texfile) { Line 341  foreach $texfile (@texfile) {
       
   $badresource = substr($badtext, $whereitbegins+27,     $badresource = substr($badtext, $whereitbegins+27, 
  length($badtext) - $whereitbegins - 48);   length($badtext) - $whereitbegins - 48);
   # print "<BR>failing resourcename: $badresource<BR>";    # print "<br />failing resourcename: $badresource<br />";
       }        }
   }    }
       
Line 350  foreach $texfile (@texfile) { Line 350  foreach $texfile (@texfile) {
       print "<h2>LaTeX could not successfully parse your tex file.</h2>";        print "<h2>LaTeX could not successfully parse your tex file.</h2>";
       print "It probably has errors in it.<br />";        print "It probably has errors in it.<br />";
       print "With very high probability this error occured in ".$badtext."<br /><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><br /><pre>";        print "Here are the error messages in the LaTeX log file<br /><pre>";
       my $sygnal = 0;        my $sygnal = 0;
       for (my $i=0;$i<=$#content_of_file;$i++) {        for (my $i=0;$i<=$#content_of_file;$i++) {
   if ($content_of_file[$i]=~m/^Runaway argument?/ or $content_of_file[$i]=~m/^!/) {    if ($content_of_file[$i]=~m/^Runaway argument?/ or $content_of_file[$i]=~m/^!/) {
Line 364  foreach $texfile (@texfile) { Line 364  foreach $texfile (@texfile) {
   }      }  
       }        }
       print "</pre>\n";        print "</pre>\n";
       # print "<br> Advanced role <br>";        # print "<br /> Advanced role <br />";
               print "<b><big>The link to ";                print "<b><big>The link to ";
               $logfilename=~s/\/home\/httpd//;                $logfilename=~s/\/home\/httpd//;
       print "<a href=\"$logfilename\">Your log file </a></big></b>";        print "<a href=\"$logfilename\">Your log file </a></big></b>";
Line 388  foreach $texfile (@texfile) { Line 388  foreach $texfile (@texfile) {
               #    $name_file     - is the name of the LaTeX file.                #    $name_file     - is the name of the LaTeX file.
               #    $identifier    - is the unique LaTeX identifier.l                #    $identifier    - is the unique LaTeX identifier.l
   
       print "<br>There are errors in $badtext";        print "<br />There are errors in $badtext";
       print "<br>These errors prevent this resource from printing correctly";        print "<br />These errors prevent this resource from printing correctly";
       my $tex_handle = IO::File->new($name_file);        my $tex_handle = IO::File->new($name_file);
       my @tex_contents = <$tex_handle>;        my @tex_contents = <$tex_handle>;
       &send_error_mail($identifier, $badresource, $body_log_file, \@tex_contents);        &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 />"
   }    }
   
       } elsif ($body_log_file=~m/<inserted text>/) {        } elsif ($body_log_file=~m/<inserted text>/) {

Removed from v.1.83  
changed lines
  Added in v.1.84


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>