Diff for /loncom/xml/lonxml.pm between versions 1.145 and 1.146

version 1.145, 2002/01/03 16:18:00 version 1.146, 2002/01/07 18:11:57
Line 1116  ENDNOTFOUND Line 1116  ENDNOTFOUND
     
 sub debug {  sub debug {
   if ($Apache::lonxml::debug eq 1) {    if ($Apache::lonxml::debug eq 1) {
     print("DEBUG:".$_[0]."<br />\n");      $|=1;
       print("DEBUG:".join('<br />',@_)."<br />\n");
   }    }
 }  }
   
 sub error {  sub error {
   if (($Apache::lonxml::debug eq 1) || ($ENV{'request.state'} eq 'construct') ) {    if (($Apache::lonxml::debug eq 1) || ($ENV{'request.state'} eq 'construct') ) {
     print "<b>ERROR:</b>".$_[0]."<br />\n";      print "<b>ERROR:</b>".join('<br />',@_)."<br />\n";
   } else {    } else {
     print "<b>An Error occured while processing this resource. The instructor has been notified.</b> <br />";      print "<b>An Error occured while processing this resource. The instructor has been notified.</b> <br />";
     #notify author      #notify author
     &Apache::lonmsg::author_res_msg($ENV{'request.filename'},$_[0]);      &Apache::lonmsg::author_res_msg($ENV{'request.filename'},join('<br />',@_));
     #notify course      #notify course
     if ( $ENV{'request.course.id'} ) {      if ( $ENV{'request.course.id'} ) {
       my $users=$ENV{'course.'.$ENV{'request.course.id'}.'.comment.email'};        my $users=$ENV{'course.'.$ENV{'request.course.id'}.'.comment.email'};
Line 1134  sub error { Line 1135  sub error {
       foreach my $user (split /\,/, $users) {        foreach my $user (split /\,/, $users) {
  ($user,my $domain) = split /:/, $user;   ($user,my $domain) = split /:/, $user;
  &Apache::lonmsg::user_normal_msg($user,$domain,   &Apache::lonmsg::user_normal_msg($user,$domain,
         "Error [$declutter]",$_[0]);          "Error [$declutter]",join('<br />',@_));
       }        }
     }      }
   
     #FIXME probably shouldn't have me get everything forever.      #FIXME probably shouldn't have me get everything forever.
     &Apache::lonmsg::user_normal_msg('albertel','msu',"Error in $ENV{'request.filename'}",$_[0]);      &Apache::lonmsg::user_normal_msg('albertel','msu',"Error in $ENV{'request.filename'}",join('<br />',@_));
     #&Apache::lonmsg::user_normal_msg('albertel','103',"Error in $ENV{'request.filename'}",$_[0]);      #&Apache::lonmsg::user_normal_msg('albertel','103',"Error in $ENV{'request.filename'}",$_[0]);
   }    }
 }  }
   
 sub warning {  sub warning {
   if ($ENV{'request.state'} eq 'construct') {    if ($ENV{'request.state'} eq 'construct') {
     print "<b>W</b>ARNING<b>:</b>".$_[0]."<br />\n";      print "<b>W</b>ARNING<b>:</b>".join('<br />',@_)."<br />\n";
   }    }
 }  }
   

Removed from v.1.145  
changed lines
  Added in v.1.146


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