version 1.123, 2001/04/17 13:53:26
|
version 1.124, 2001/05/26 19:57:47
|
Line 28
|
Line 28
|
# 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 |
# delenv(varname) : deletes all environment entries starting with varname |
# store(hashref,symb,courseid,udom,uname,homeserver) |
# store(hashref,symb,courseid,udom,uname) |
# : stores hash permanently for this url |
# : stores hash permanently for this url |
# hashref needs to be given, and should be a \%hashname |
# hashref needs to be given, and should be a \%hashname |
# the remaining args aren't required and if they aren't |
# the remaining args aren't required and if they aren't |
# passed or are '' they will be derived from the ENV |
# passed or are '' they will be derived from the ENV |
# cstore(hashref,symb,courseid,udom,uname,homeserver) |
# cstore(hashref,symb,courseid,udom,uname) |
# : same as store but uses the critical interface to |
# : same as store but uses the critical interface to |
# guarentee a store |
# guarentee a store |
# restore(symb,courseid,udom,uname,homeserver) |
# restore(symb,courseid,udom,uname) |
# : returns hash for this symb, all args are optional |
# : returns hash for this symb, all args are optional |
# if they aren't given they will be derived from the current |
# if they aren't given they will be derived from the |
# enviroment |
# current enviroment |
# eget(namesp,array) : returns hash with keys from array filled in from namesp |
# eget(namesp,array) : returns hash with keys from array filled in from namesp |
# get(namesp,array) : returns hash with keys from array filled in from namesp |
# get(namesp,array) : returns hash with keys from array filled in from namesp |
# del(namesp,array) : deletes keys out of array from namesp |
# del(namesp,array) : deletes keys out of array from namesp |
Line 103
|
Line 103
|
# 3/15,3/19 Scott Harrison |
# 3/15,3/19 Scott Harrison |
# 3/19,3/20 Gerd Kortemeyer |
# 3/19,3/20 Gerd Kortemeyer |
# 3/22,3/27,4/2,4/16,4/17 Scott Harrison |
# 3/22,3/27,4/2,4/16,4/17 Scott Harrison |
|
# 5/26 Gerd Kortemeyer |
|
# |
package Apache::lonnet; |
package Apache::lonnet; |
|
|
use strict; |
use strict; |
Line 686 sub devalidate {
|
Line 687 sub devalidate {
|
# ----------------------------------------------------------------------- Store |
# ----------------------------------------------------------------------- Store |
|
|
sub store { |
sub store { |
my ($storehash,$symb,$namespace,$domain,$stuname,$home) = @_; |
my ($storehash,$symb,$namespace,$domain,$stuname) = @_; |
|
my $home=''; |
|
|
|
if ($stuname) { |
|
$home=&homeserver($stuname,$domain); |
|
} |
|
|
if (!$symb) { unless ($symb=&symbread()) { return ''; } } |
if (!$symb) { unless ($symb=&symbread()) { return ''; } } |
|
|
&devalidate($symb); |
&devalidate($symb); |
Line 701 sub store {
|
Line 708 sub store {
|
$namevalue.=escape($_).'='.escape($$storehash{$_}).'&'; |
$namevalue.=escape($_).'='.escape($$storehash{$_}).'&'; |
} keys %$storehash; |
} keys %$storehash; |
$namevalue=~s/\&$//; |
$namevalue=~s/\&$//; |
return critical("store:$domain:$stuname:$namespace:$symb:$namevalue","$home"); |
return reply("store:$domain:$stuname:$namespace:$symb:$namevalue","$home"); |
} |
} |
|
|
# -------------------------------------------------------------- Critical Store |
# -------------------------------------------------------------- Critical Store |
|
|
sub cstore { |
sub cstore { |
my ($storehash,$symb,$namespace,$domain,$stuname,$home) = @_; |
my ($storehash,$symb,$namespace,$domain,$stuname) = @_; |
|
my $home=''; |
|
|
|
if ($stuname) { |
|
$home=&homeserver($stuname,$domain); |
|
} |
|
|
if (!$symb) { unless ($symb=&symbread()) { return ''; } } |
if (!$symb) { unless ($symb=&symbread()) { return ''; } } |
|
|
&devalidate($symb); |
&devalidate($symb); |
Line 729 sub cstore {
|
Line 742 sub cstore {
|
# --------------------------------------------------------------------- Restore |
# --------------------------------------------------------------------- Restore |
|
|
sub restore { |
sub restore { |
my ($symb,$namespace,$domain,$stuname,$home) = @_; |
my ($symb,$namespace,$domain,$stuname) = @_; |
|
my $home=''; |
|
|
|
if ($stuname) { |
|
$home=&homeserver($stuname,$domain); |
|
} |
|
|
if (!$symb) { |
if (!$symb) { |
unless ($symb=escape(&symbread())) { return ''; } |
unless ($symb=escape(&symbread())) { return ''; } |
} else { |
} else { |