version 1.2, 2001/09/25 17:35:03
|
version 1.3, 2002/05/11 21:31:00
|
Line 7
|
Line 7
|
# YEAR=2001 |
# YEAR=2001 |
# 9/25 Scott Harrison |
# 9/25 Scott Harrison |
# |
# |
|
# YEAR=2002 |
|
# 5/11 Scott Harrison |
|
# |
|
|
############################################################################### |
############################################################################### |
## ## |
## ## |
Line 26
|
Line 29
|
# 1=horrible 2=poor 3=fair 4=good 5=excellent |
# 1=horrible 2=poor 3=fair 4=good 5=excellent |
# Organization 5 |
# Organization 5 |
# Functionality 4 |
# Functionality 4 |
# Has it been tested? 3 |
# Has it been tested? 4 |
# |
# |
|
|
# ------------------------------------------ Purpose and description of program |
# ------------------------------------------ Purpose and description of program |
Line 42
|
Line 45
|
# should reflect this information) instead. This is a speedier approach. |
# should reflect this information) instead. This is a speedier approach. |
|
|
# ------------------------------------------------- Modules used by this script |
# ------------------------------------------------- Modules used by this script |
|
|
|
use lib '/home/httpd/lib/perl/'; |
|
use LONCAPA::Configuration; |
|
|
use strict; |
use strict; |
use DBI; |
use DBI; |
|
|
Line 51 print 'Content-type: text/plain'."\n\n";
|
Line 58 print 'Content-type: text/plain'."\n\n";
|
|
|
# --- Make sure that database can be accessed and that this is a library server |
# --- Make sure that database can be accessed and that this is a library server |
# library server test |
# library server test |
my %perlvar; |
my $perlvarref=LONCAPA::Configuration::read_conf('access.conf','loncapa.conf'); |
open (CONFIG,"/etc/httpd/conf/access.conf") || |
my %perlvar=%{$perlvarref}; |
(print "Can't read access.conf\n" && exit); |
undef($perlvarref); |
while (my $configline=<CONFIG>) { |
|
if ($configline =~ /PerlSetVar/) { |
|
my ($dummy,$varname,$varvalue)=split(/\s+/,$configline); |
|
chomp($varvalue); |
|
$perlvar{$varname}=$varvalue; |
|
} |
|
} |
|
close(CONFIG); |
|
unless ($perlvar{'lonRole'} eq 'library') { |
unless ($perlvar{'lonRole'} eq 'library') { |
print "This can only be run on a library server!\n"; |
print "This can only be run on a library server!\n"; |
exit; |
exit; |