version 1.33, 2000/09/29 14:36:30
|
version 1.34, 2000/09/30 17:25:04
|
Line 33
|
Line 33
|
# dump(namesp) : dumps the complete namespace into a hash |
# dump(namesp) : dumps the complete namespace into a hash |
# ssi(url,hash) : does a complete request cycle on url to localhost, posts |
# ssi(url,hash) : does a complete request cycle on url to localhost, posts |
# hash |
# hash |
|
# coursedescription(id) : returns and caches course description for id |
# repcopy(filename) : replicate file |
# repcopy(filename) : replicate file |
# dirlist(url) : gets a directory listing |
# dirlist(url) : gets a directory listing |
# condval(index) : value of condition index based on state |
# condval(index) : value of condition index based on state |
Line 51
|
Line 52
|
# 06/26 Ben Tyszka |
# 06/26 Ben Tyszka |
# 06/30,07/15,07/17,07/18,07/20,07/21,07/22,07/25 Gerd Kortemeyer |
# 06/30,07/15,07/17,07/18,07/20,07/21,07/22,07/25 Gerd Kortemeyer |
# 08/14 Ben Tyszka |
# 08/14 Ben Tyszka |
# 08/22,08/28,08/31,09/01,09/02,09/04,09/05,09/25,09/28 Gerd Kortemeyer |
# 08/22,08/28,08/31,09/01,09/02,09/04,09/05,09/25,09/28,09/30 Gerd Kortemeyer |
|
|
package Apache::lonnet; |
package Apache::lonnet; |
|
|
Line 445 sub restore {
|
Line 446 sub restore {
|
return %returnhash; |
return %returnhash; |
} |
} |
|
|
|
# ---------------------------------------------------------- Course Description |
|
|
|
sub coursedescription { |
|
my $courseid=shift; |
|
$courseid=~s/^\///; |
|
my ($cdomain,$cnum)=split(/\//,$courseid); |
|
my $chome=homeserver($cnum,$cdomain); |
|
if ($chome ne 'no_host') { |
|
my $rep=reply("dump:$cdomain:$cnum:environment",$chome); |
|
if ($rep ne 'con_lost') { |
|
my %cachehash=(); |
|
my %returnhash=('home' => $chome, |
|
'domain' => $cdomain, |
|
'num' => $cnum); |
|
map { |
|
my ($name,$value)=split(/\=/,$_); |
|
$name=&unescape($name); |
|
$value=&unescape($value); |
|
$returnhash{$name}=$value; |
|
if ($name eq 'description') { |
|
$cachehash{$courseid}=$value; |
|
} |
|
} split(/\&/,$rep); |
|
$returnhash{'url'}='/res/'.declutter($returnhash{'url'}); |
|
$returnhash{'fn'}=$perlvar{'lonDaemons'}.'/tmp/'. |
|
$ENV{'user.name.'}.'_'.$cdomain.'_'.$cnum; |
|
put ('coursedescriptions',%cachehash); |
|
return %returnhash; |
|
} |
|
} |
|
return (); |
|
} |
|
|
# -------------------------------------------------------- Get user priviledges |
# -------------------------------------------------------- Get user priviledges |
|
|
sub rolesinit { |
sub rolesinit { |