version 1.27, 2002/10/15 20:50:19
|
version 1.28, 2002/10/16 18:48:12
|
Line 29
|
Line 29
|
package Apache::londocs; |
package Apache::londocs; |
|
|
use strict; |
use strict; |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common :http); |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonratedt; |
use Apache::lonratedt; |
Line 256 sub handler {
|
Line 256 sub handler {
|
$r->print('<html><head><title>Verify Content</title></head>'. |
$r->print('<html><head><title>Verify Content</title></head>'. |
&Apache::loncommon::bodytag('Verify Course Documents')); |
&Apache::loncommon::bodytag('Verify Course Documents')); |
$hashtied=0; |
$hashtied=0; |
|
my %alreadyseen=(); |
&tiehash(); |
&tiehash(); |
foreach (keys %hash) { |
foreach (keys %hash) { |
if ($_=~/^src\_(.+)$/) { |
if (($_=~/^src\_(.+)$/) && (!$alreadyseen{$hash{$_}})) { |
|
$alreadyseen{$hash{$_}}=1; |
my $resid=$1; |
my $resid=$1; |
$r->rflush(); |
$r->rflush(); |
if ($hash{$_}) { |
if ($hash{$_}) { |
Line 266 sub handler {
|
Line 268 sub handler {
|
$r->print('<br /><a href="'.$fn.'" target="cat">'. |
$r->print('<br /><a href="'.$fn.'" target="cat">'. |
($hash{'title_'.$resid}?$hash{'title_'.$resid}:$fn).'</a> '); |
($hash{'title_'.$resid}?$hash{'title_'.$resid}:$fn).'</a> '); |
if ($fn=~/^\/res\//) { |
if ($fn=~/^\/res\//) { |
my $result=&Apache::lonnet::repcopy($fn); |
my $result=&Apache::lonnet::repcopy( |
if ($result eq OK) { |
&Apache::lonnet::filelocation('',$fn)); |
|
if ($result==OK) { |
$r->print('<font color="green">ok</font>'); |
$r->print('<font color="green">ok</font>'); |
$r->rflush(); |
$r->rflush(); |
my $dependencies= |
my $dependencies= |
&Apache::lonnet::metadata($_,'dependencies'); |
&Apache::lonnet::metadata($hash{$_},'dependencies'); |
$r->print('Dependencies: '.$dependencies.'<br>'); |
$r->print('Dependencies: '.$dependencies.'<br />'); |
} elsif ($result eq HTTP_SERVICE_UNAVAILABLE) { |
} elsif ($result==HTTP_SERVICE_UNAVAILABLE) { |
$r->print( |
$r->print( |
'<font color="red"><b>connection down</b></font>'); |
'<font color="red"><b>connection down</b></font>'); |
} elsif ($result eq HTTP_NOT_FOUND) { |
} elsif ($result==HTTP_NOT_FOUND) { |
$r->print('<font color="red"><b>not found</b></font>'); |
$r->print('<font color="red"><b>not found</b></font>'); |
} else { |
} else { |
$r->print( |
$r->print( |