Diff for /loncom/interface/londocs.pm between versions 1.168 and 1.170

version 1.168, 2005/02/21 00:32:45 version 1.170, 2005/03/10 02:34:58
Line 1489  sub checkonthis { Line 1489  sub checkonthis {
        if ($url=~/^\/res\//) {         if ($url=~/^\/res\//) {
   my $result=&Apache::lonnet::repcopy(    my $result=&Apache::lonnet::repcopy(
                               &Apache::lonnet::filelocation('',$url));                                &Apache::lonnet::filelocation('',$url));
           if ($result==OK) {            if ($result eq 'OK') {
              $r->print('<font color="green">'.&mt('ok').'</font>');               $r->print('<font color="green">'.&mt('ok').'</font>');
              $r->rflush();               $r->rflush();
              &Apache::lonnet::countacc($url);               &Apache::lonnet::countacc($url);
Line 1501  sub checkonthis { Line 1501  sub checkonthis {
                      $r->print('&nbsp;');                       $r->print('&nbsp;');
                  }                   }
                  $r->print('- '.&mt('Rendering').': ');                   $r->print('- '.&mt('Rendering').': ');
                  my $oldpath=$ENV{'request.filename'};   my ($errorcount,$warningcount)=split(/:/,
                  $ENV{'request.filename'}=&Apache::lonnet::filelocation('',$url);         &Apache::lonnet::ssi_body($url,
                  &Apache::lonxml::xmlparse($r,'web',         ('return_only_error_and_warning_counts' => 1)));
                    &Apache::lonnet::getfile(                   if (($errorcount) ||
                     &Apache::lonnet::filelocation('',$url)));                       ($warningcount)) {
  undef($Apache::lonhomework::parsing_a_problem);       if ($errorcount) {
  $ENV{'request.filename'}=$oldpath;  
                  if (($Apache::lonxml::errorcount) ||  
                      ($Apache::lonxml::warningcount)) {  
      if ($Apache::lonxml::errorcount) {  
                         $r->print('<img src="/adm/lonMisc/bomb.gif" /><font color="red"><b>'.                          $r->print('<img src="/adm/lonMisc/bomb.gif" /><font color="red"><b>'.
   $Apache::lonxml::errorcount.' '.    $errorcount.' '.
   &mt('error(s)').'</b></font> ');    &mt('error(s)').'</b></font> ');
                      }                       }
      if ($Apache::lonxml::warningcount) {       if ($warningcount) {
                         $r->print('<font color="blue">'.                          $r->print('<font color="blue">'.
   $Apache::lonxml::warningcount.' '.    $warningcount.' '.
   &mt('warning(s)').'</font>');    &mt('warning(s)').'</font>');
                      }                       }
                  } else {                   } else {
Line 1532  sub checkonthis { Line 1528  sub checkonthis {
                     &checkonthis($r,$_,$level+1);                      &checkonthis($r,$_,$level+1);
                  }                   }
              }               }
           } elsif ($result==HTTP_SERVICE_UNAVAILABLE) {            } elsif ($result eq 'HTTP_SERVICE_UNAVAILABLE') {
              $r->print('<font color="red"><b>'.&mt('connection down').'</b></font>');               $r->print('<font color="red"><b>'.&mt('connection down').'</b></font>');
           } elsif ($result==HTTP_NOT_FOUND) {            } elsif ($result eq 'HTTP_NOT_FOUND') {
       unless ($url=~/\$/) {        unless ($url=~/\$/) {
   $r->print('<font color="red"><b>'.&mt('not found').'</b></font>');    $r->print('<font color="red"><b>'.&mt('not found').'</b></font>');
       } else {        } else {

Removed from v.1.168  
changed lines
  Added in v.1.170


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