version 1.630, 2005/04/29 18:38:13
|
version 1.633, 2005/05/05 20:50:38
|
Line 2614 sub put {
|
Line 2614 sub put {
|
return &reply("put:$udomain:$uname:$namespace:$items",$uhome); |
return &reply("put:$udomain:$uname:$namespace:$items",$uhome); |
} |
} |
|
|
# ---------------------------------------------------------- putstore interface |
# ------------------------------------------------------------ newput interface |
|
|
|
sub newput { |
|
my ($namespace,$storehash,$udomain,$uname)=@_; |
|
if (!$udomain) { $udomain=$env{'user.domain'}; } |
|
if (!$uname) { $uname=$env{'user.name'}; } |
|
my $uhome=&homeserver($uname,$udomain); |
|
my $items=''; |
|
foreach my $key (keys(%$storehash)) { |
|
$items.=&escape($key).'='.&freeze_escape($$storehash{$key}).'&'; |
|
} |
|
$items=~s/\&$//; |
|
return &reply("newput:$udomain:$uname:$namespace:$items",$uhome); |
|
} |
|
|
|
# --------------------------------------------------------- putstore interface |
|
|
sub putstore { |
sub putstore { |
my ($namespace,$storehash,$udomain,$uname)=@_; |
my ($namespace,$storehash,$udomain,$uname)=@_; |
if (!$udomain) { $udomain=$env{'user.domain'}; } |
if (!$udomain) { $udomain=$env{'user.domain'}; } |
Line 3898 sub unmark_as_readonly {
|
Line 3913 sub unmark_as_readonly {
|
my @del_keys; |
my @del_keys; |
if (ref($current_locks) eq "ARRAY"){ |
if (ref($current_locks) eq "ARRAY"){ |
foreach my $locker (@{$current_locks}) { |
foreach my $locker (@{$current_locks}) { |
if ($$locker[0].$$locker[1] eq $symb_crs) { |
my $compare=$locker; |
|
if (ref($locker)) { $compare=join('',@{$locker}) }; |
|
if ($compare eq $symb_crs) { |
if (defined($file_name) && ($file_name ne $file)) { |
if (defined($file_name) && ($file_name ne $file)) { |
push(@new_locks, $what); |
push(@new_locks, $what); |
} |
} |
Line 4128 sub get_courseresdata {
|
Line 4145 sub get_courseresdata {
|
return $result; |
return $result; |
} |
} |
|
|
|
sub devalidateuserresdata { |
|
my ($uname,$udom)=@_; |
|
my $hashid="$udom:$uname"; |
|
&devalidate_cache_new('userres',$hashid); |
|
} |
|
|
sub get_userresdata { |
sub get_userresdata { |
my ($uname,$udom)=@_; |
my ($uname,$udom)=@_; |
#most student don\'t have any data set, check if there is some data |
#most student don\'t have any data set, check if there is some data |
Line 4151 sub get_userresdata {
|
Line 4174 sub get_userresdata {
|
$uname." at ".$udom.": ". |
$uname." at ".$udom.": ". |
$tmp."</font>"); |
$tmp."</font>"); |
} elsif ($tmp=~/error: 2 /) { |
} elsif ($tmp=~/error: 2 /) { |
&EXT_cache_set($udom,$uname); |
#&EXT_cache_set($udom,$uname); |
|
&do_cache_new('userres',$hashid,undef,600); |
} |
} |
return $tmp; |
return $tmp; |
} |
} |
Line 4195 sub EXT_cache_status {
|
Line 4219 sub EXT_cache_status {
|
sub EXT_cache_set { |
sub EXT_cache_set { |
my ($target_domain,$target_user) = @_; |
my ($target_domain,$target_user) = @_; |
my $cachename = 'cache.EXT.'.$target_user.'.'.$target_domain; |
my $cachename = 'cache.EXT.'.$target_user.'.'.$target_domain; |
&appenv($cachename => time); |
#&appenv($cachename => time); |
} |
} |
|
|
# --------------------------------------------------------- Value of a Variable |
# --------------------------------------------------------- Value of a Variable |
Line 6178 revokecustomrole($udom,$uname,$url,$role
|
Line 6202 revokecustomrole($udom,$uname,$url,$role
|
|
|
=item * |
=item * |
|
|
coursedescription($courseid) : course description |
coursedescription($courseid) : returns a hash of information about the |
|
specified course id, including all environment settings for the |
|
course, the description of the course will be in the hash under the |
|
key 'description' |
|
|
=item * |
=item * |
|
|