--- loncom/interface/londocs.pm 2002/10/18 14:50:22 1.33 +++ loncom/interface/londocs.pm 2002/10/20 18:42:53 1.34 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.33 2002/10/18 14:50:22 www Exp $ +# $Id: londocs.pm,v 1.34 2002/10/20 18:42:53 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -260,6 +260,38 @@ sub checkonthis { if ($result==OK) { $r->print('ok'); $r->rflush(); + &Apache::lonnet::countacc($url); + $url=~/\.(\w+)$/; + if (&Apache::loncommon::fileembstyle($1) eq 'ssi') { + $r->print('
'); + $r->rflush(); + my $default=''; + if ($1=~/(problem|exam|quiz|assess|survey|form|library)/) { + $default=&Apache::lonnet::getfile( + '/home/httpd/html/res/adm/includes/default_homework.lcpm'); + } + for (my $i=0;$i<=$level*5;$i++) { + $r->print(' '); + } + $r->print('- Rendering: '); + &Apache::lonxml::xmlparse($r,'web', + &Apache::lonnet::getfile( + &Apache::lonnet::filelocation('',$url)),$default); + if (($Apache::lonxml::errorcount) || + ($Apache::lonxml::warningcount)) { + if ($Apache::lonxml::errorcount) { + $r->print(''. + $Apache::lonxml::errorcount.' error(s) '); + } + if ($Apache::lonxml::warningcount) { + $r->print(''. + $Apache::lonxml::warningcount.' warning(s)'); + } + } else { + $r->print('ok'); + } + $r->rflush(); + } my $dependencies= &Apache::lonnet::metadata($url,'dependencies'); foreach (split(/\,/,$dependencies)) {