[LON-CAPA-cvs] cvs: loncom /auth lonstatusacc.pm /interface domainprefs.pm domainstatus.pm
raeburn
raeburn@source.lon-capa.org
Thu, 25 Dec 2008 01:52:56 -0000
raeburn Thu Dec 25 01:52:56 2008 EDT
Modified files:
/loncom/interface domainprefs.pm domainstatus.pm
/loncom/auth lonstatusacc.pm
Log:
- Changes resulting from movement of subroutines from loncgi.pm
to lonauthcgi.pm.
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.80 loncom/interface/domainprefs.pm:1.81
--- loncom/interface/domainprefs.pm:1.80 Thu Dec 18 16:58:26 2008
+++ loncom/interface/domainprefs.pm Thu Dec 25 01:52:49 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.80 2008/12/18 16:58:26 raeburn Exp $
+# $Id: domainprefs.pm,v 1.81 2008/12/25 01:52:49 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -39,7 +39,7 @@
use Apache::lonmsg();
use LONCAPA qw(:DEFAULT :match);
use LONCAPA::Enrollment;
-use LONCAPA::loncgi();
+use LONCAPA::lonauthcgi();
use File::Copy;
use Locale::Language;
use DateTime::TimeZone;
@@ -2373,7 +2373,7 @@
}
}
}
- my $titles= &LONCAPA::loncgi::serverstatus_titles();
+ my $titles= &LONCAPA::lonauthcgi::serverstatus_titles();
my $rownum = 0;
my $css_class;
foreach my $type (@pages) {
@@ -3619,10 +3619,8 @@
&Apache::lonnet::usertools_access($env{'user.name'},
$env{'user.domain'},
$item,'reload');
- if ($env{'environment.tools.'.$item} ne '') {
- if ($env{'environment.availabletools.'.$item} ne $newacc) {
- $newenv{'environment.availabletools.'.$item} = $newacc;
- }
+ if ($env{'environment.availabletools.'.$item} ne $newacc) {
+ $newenv{'environment.availabletools.'.$item} = $newacc;
}
$resulttext .= '<li>'.$titles{$item}.'<ul>';
foreach my $type (@{$types},'default','_LC_adv') {
@@ -5016,7 +5014,7 @@
}
}
if (keys(%changes) > 0) {
- my $titles= &LONCAPA::loncgi::serverstatus_titles();
+ my $titles= &LONCAPA::lonauthcgi::serverstatus_titles();
my $putresult = &Apache::lonnet::put_dom('configuration',
\%serverstatushash,$dom);
if ($putresult eq 'ok') {
Index: loncom/interface/domainstatus.pm
diff -u loncom/interface/domainstatus.pm:1.1 loncom/interface/domainstatus.pm:1.2
--- loncom/interface/domainstatus.pm:1.1 Mon Dec 22 21:13:25 2008
+++ loncom/interface/domainstatus.pm Thu Dec 25 01:52:50 2008
@@ -2,7 +2,7 @@
# Generate a menu page containing links to server status pages accessible
# to user.
#
-# $Id: domainstatus.pm,v 1.1 2008/12/22 21:13:25 raeburn Exp $
+# $Id: domainstatus.pm,v 1.2 2008/12/25 01:52:50 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -35,7 +35,7 @@
use Apache::loncommon;
use Apache::lonhtmlcommon;
use Apache::lonlocal;
-use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
sub handler {
my $r = shift;
@@ -57,12 +57,12 @@
my $domdesc = &Apache::lonnet::domain($dom,'description');
my %candisplay;
- my $titles = &LONCAPA::loncgi::serverstatus_titles();
+ my $titles = &LONCAPA::lonauthcgi::serverstatus_titles();
if (ref($titles) eq 'HASH') {
foreach my $page (keys(%{$titles})) {
- if (&LONCAPA::loncgi::can_view($page)) {
+ if (&LONCAPA::lonauthcgi::can_view($page)) {
$candisplay{$page} = 'F';
- } elsif (&LONCAPA::loncgi::check_ipbased_access($page)) {
+ } elsif (&LONCAPA::lonauthcgi::check_ipbased_access($page)) {
$candisplay{$page} = 'F';
}
}
@@ -128,7 +128,7 @@
sub servermenu_items {
my ($candisplay) = @_;
- my $titles = &LONCAPA::loncgi::serverstatus_titles();
+ my $titles = &LONCAPA::lonauthcgi::serverstatus_titles();
my $linknames = &serverstatus_links();
my @menu;
if ((ref($candisplay) eq 'HASH') && (ref($titles) eq 'HASH') &&
Index: loncom/auth/lonstatusacc.pm
diff -u loncom/auth/lonstatusacc.pm:1.3 loncom/auth/lonstatusacc.pm:1.4
--- loncom/auth/lonstatusacc.pm:1.3 Mon Dec 22 21:13:19 2008
+++ loncom/auth/lonstatusacc.pm Thu Dec 25 01:52:56 2008
@@ -1,7 +1,7 @@
#
# LON-CAPA authorization for pages generated by server-status reports
#
-# $Id: lonstatusacc.pm,v 1.3 2008/12/22 21:13:19 raeburn Exp $
+# $Id: lonstatusacc.pm,v 1.4 2008/12/25 01:52:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -34,6 +34,7 @@
use Apache::Constants qw(:common :http :remotehost);
use Apache::lonnet;
use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
sub handler {
my $r = shift;
@@ -46,9 +47,9 @@
return OK;
} elsif ($r->uri eq '/adm/test') {
$page = 'showenv';
- if (&LONCAPA::loncgi::can_view($page)) {
+ if (&LONCAPA::lonauthcgi::can_view($page)) {
return OK;
- } elsif (&LONCAPA::loncgi::check_ipbased_access($page,$reqhost)) {
+ } elsif (&LONCAPA::lonauthcgi::check_ipbased_access($page,$reqhost)) {
return OK;
} else {
$Apache::lonnet::env{'user.error.msg'} =
@@ -81,11 +82,11 @@
}
}
}
- } elsif (&LONCAPA::loncgi::check_ipbased_access($page,$reqhost)) {
+ } elsif (&LONCAPA::lonauthcgi::check_ipbased_access($page,$reqhost)) {
return OK;
} else {
if (&LONCAPA::loncgi::check_cookie_and_load_env($r)) {
- if (&LONCAPA::loncgi::can_view($page)) {
+ if (&LONCAPA::lonauthcgi::can_view($page)) {
return OK;
}
}