version 1.55, 2000/10/30 22:45:21
|
version 1.56, 2000/10/31 19:28:11
|
Line 24
|
Line 24
|
# revokerole (udom,uname,url,role) : Revoke a role for url |
# revokerole (udom,uname,url,role) : Revoke a role for url |
# revokecustomrole (udom,uname,url,rdom,rnam,rolename) : Revoke a custom role |
# revokecustomrole (udom,uname,url,rdom,rnam,rolename) : Revoke a custom role |
# appenv(hash) : adds hash to session environment |
# appenv(hash) : adds hash to session environment |
|
# delenv(varname) : deletes all environment entries starting with varname |
# store(hash) : stores hash permanently for this url |
# store(hash) : stores hash permanently for this url |
# cstore(hash) : critical store |
# cstore(hash) : critical store |
# restore : returns hash for this url |
# restore : returns hash for this url |
Line 67
|
Line 68
|
# 10/04 Gerd Kortemeyer |
# 10/04 Gerd Kortemeyer |
# 10/04 Guy Albertelli |
# 10/04 Guy Albertelli |
# 10/06,10/09,10/10,10/11,10/14,10/20,10/23,10/25,10/26,10/27,10/28,10/29, |
# 10/06,10/09,10/10,10/11,10/14,10/20,10/23,10/25,10/26,10/27,10/28,10/29, |
# 10/30 Gerd Kortemeyer |
# 10/30,10/31 Gerd Kortemeyer |
|
|
package Apache::lonnet; |
package Apache::lonnet; |
|
|
Line 250 sub appenv {
|
Line 251 sub appenv {
|
} |
} |
return 'ok'; |
return 'ok'; |
} |
} |
|
# ----------------------------------------------------- Delete from Environment |
|
|
|
sub delenv { |
|
my $delthis=shift; |
|
my %newenv=(); |
|
if (($delthis=~/user\.role/) || ($delthis=~/user\.priv/)) { |
|
&logthis("<font color=blue>WARNING: ". |
|
"Attempt to delete from environment ".$delthis); |
|
return 'error'; |
|
} |
|
my @oldenv; |
|
{ |
|
my $fh; |
|
unless ($fh=Apache::File->new("$ENV{'user.environment'}")) { |
|
return 'error'; |
|
} |
|
@oldenv=<$fh>; |
|
} |
|
{ |
|
my $fh; |
|
unless ($fh=Apache::File->new(">$ENV{'user.environment'}")) { |
|
return 'error'; |
|
} |
|
map { |
|
unless ($_=~/^$delthis/) { print $fh $_; } |
|
} @oldenv; |
|
} |
|
return 'ok'; |
|
} |
|
|
# ------------------------------ Find server with least workload from spare.tab |
# ------------------------------ Find server with least workload from spare.tab |
|
|