version 1.127, 2007/12/01 03:43:49
|
version 1.128.2.2, 2009/03/21 06:12:05
|
Line 247 sub parse_resource {
|
Line 247 sub parse_resource {
|
$turi=~/\.(\w+)$/; |
$turi=~/\.(\w+)$/; |
my $embstyle=&Apache::loncommon::fileembstyle($1); |
my $embstyle=&Apache::loncommon::fileembstyle($1); |
if ($token->[2]->{'external'} eq 'true') { # external |
if ($token->[2]->{'external'} eq 'true') { # external |
$turi=~s/^http\:\/\//\/adm\/wrapper\/ext\//; |
$turi=~s/^https?\:\/\//\/adm\/wrapper\/ext\//; |
} elsif ($turi=~/^\/*uploaded\//) { # uploaded |
} elsif ($turi=~/^\/*uploaded\//) { # uploaded |
if (($embstyle eq 'img') |
if (($embstyle eq 'img') |
|| ($embstyle eq 'emb') |
|| ($embstyle eq 'emb') |
Line 573 sub accinit {
|
Line 573 sub accinit {
|
$acchash{'acc.res.'.$short.'.'}='&:0&'; |
$acchash{'acc.res.'.$short.'.'}='&:0&'; |
my $courseuri=$uri; |
my $courseuri=$uri; |
$courseuri=~s/^\/res\///; |
$courseuri=~s/^\/res\///; |
&Apache::lonnet::delenv('(acc\.|httpref\.)'); |
my $regexp = 1; |
&Apache::lonnet::appenv(%acchash); |
&Apache::lonnet::delenv('(acc\.|httpref\.)',$regexp); |
|
&Apache::lonnet::appenv(\%acchash); |
} |
} |
|
|
# ---------------- Selectively delete from randompick maps and hidden url parms |
# ---------------- Selectively delete from randompick maps and hidden url parms |
Line 630 sub hiddenurls {
|
Line 631 sub hiddenurls {
|
} |
} |
# --------------------------------------- append randomout entry to environment |
# --------------------------------------- append randomout entry to environment |
if ($randomoutentry) { |
if ($randomoutentry) { |
&Apache::lonnet::appenv('acc.randomout' => $randomoutentry); |
&Apache::lonnet::appenv({'acc.randomout' => $randomoutentry}); |
} |
} |
} |
} |
|
|
Line 678 sub readmap {
|
Line 679 sub readmap {
|
$hash{'is_map_0.0'}=1; |
$hash{'is_map_0.0'}=1; |
loadmap($uri,'0.0'); |
loadmap($uri,'0.0'); |
if (defined($hash{'map_start_'.$uri})) { |
if (defined($hash{'map_start_'.$uri})) { |
&Apache::lonnet::appenv("request.course.id" => $short, |
&Apache::lonnet::appenv({"request.course.id" => $short, |
"request.course.fn" => $fn, |
"request.course.fn" => $fn, |
"request.course.uri" => $uri); |
"request.course.uri" => $uri}); |
$env{'request.course.id'}=$short; |
$env{'request.course.id'}=$short; |
&traceroute('0',$hash{'map_start_'.$uri},'&'); |
&traceroute('0',$hash{'map_start_'.$uri},'&'); |
&accinit($uri,$short,$fn); |
&accinit($uri,$short,$fn); |
Line 751 sub readmap {
|
Line 752 sub readmap {
|
(tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640))) { |
(tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640))) { |
if (tie(%parmhash,'GDBM_File',$fn.'_parms.db',&GDBM_READER(),0640)) { |
if (tie(%parmhash,'GDBM_File',$fn.'_parms.db',&GDBM_READER(),0640)) { |
$retfurl='/adm/navmaps'; |
$retfurl='/adm/navmaps'; |
&Apache::lonnet::appenv("request.course.id" => $short, |
&Apache::lonnet::appenv({"request.course.id" => $short, |
"request.course.fn" => $fn, |
"request.course.fn" => $fn, |
"request.course.uri" => $uri); |
"request.course.uri" => $uri}); |
untie(%hash); |
untie(%hash); |
untie(%parmhash); |
untie(%parmhash); |
last; |
last; |
Line 814 sub evalstate {
|
Line 815 sub evalstate {
|
} |
} |
} |
} |
} |
} |
&Apache::lonnet::appenv('user.state.'.$env{'request.course.id'} => $state); |
&Apache::lonnet::appenv({'user.state.'.$env{'request.course.id'} => $state}); |
return $state; |
return $state; |
} |
} |
|
|