version 1.1, 2013/02/02 00:22:34
|
version 1.2, 2013/02/08 14:51:47
|
Line 37 use LONCAPA::Configuration();
|
Line 37 use LONCAPA::Configuration();
|
use LONCAPA::loncgi(); |
use LONCAPA::loncgi(); |
use LONCAPA::lonauthcgi(); |
use LONCAPA::lonauthcgi(); |
use LONCAPA::Checksumming(); |
use LONCAPA::Checksumming(); |
|
use LONCAPA; |
|
|
my $perlvar=&LONCAPA::Configuration::read_conf('loncapa.conf'); |
my $perlvar=&LONCAPA::Configuration::read_conf('loncapa.conf'); |
my ($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost); |
my ($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost); |
Line 71 sub main {
|
Line 72 sub main {
|
} |
} |
} |
} |
|
|
&Apache::lonlocal::get_language_handle(); |
|
&print_differences($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost); |
&print_differences($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost); |
return; |
return; |
} |
} |
Line 81 sub print_differences {
|
Line 81 sub print_differences {
|
my $machine_dom = &Apache::lonnet::host_domain($lonhost); |
my $machine_dom = &Apache::lonnet::host_domain($lonhost); |
my $loncaparev = &Apache::lonnet::get_server_loncaparev($machine_dom); |
my $loncaparev = &Apache::lonnet::get_server_loncaparev($machine_dom); |
my ($version,$timestamp) = split(/\-/,$loncaparev); |
my ($version,$timestamp) = split(/\-/,$loncaparev); |
print(&Apache::loncommon::start_page('LON-CAPA code integrity checking')); |
&Apache::lonlocal::get_language_handle(); |
|
print(&Apache::loncommon::start_page('Code integrity check')); |
if ($loncaparev =~ /CVS_HEAD/) { |
if ($loncaparev =~ /CVS_HEAD/) { |
print(&Apache::lonlocal::mt('Code checking unavailable for LON-CAPA CVS HEAD'). |
print('<h3>'. |
"\n"); |
&Apache::lonlocal::mt('Code checking unavailable for LON-CAPA CVS HEAD'). |
|
'</h3>'); |
} else { |
} else { |
print('<h2>'. |
print('<h3>'. |
&Apache::lonlocal::mt('Code integrity check -- LONCAPA version: [_1]', |
&Apache::lonlocal::mt('Code integrity check -- LONCAPA version: [_1]', |
$version). |
$version). |
'</h2>'); |
'</h3>'); |
my $distro; |
my $distro = &LONCAPA::distro(); |
if (open(my $disth,"$londaemons/distprobe |")) { |
|
$distro = <$disth>; |
|
close($disth); |
|
} |
|
if ($distro) { |
if ($distro) { |
my ($serversums,$serverversions) = |
my ($serversums,$serverversions) = |
&LONCAPA::Checksumming::get_checksums($distro,$londaemons,$lonlib, |
&LONCAPA::Checksumming::get_checksums($distro,$londaemons,$lonlib, |