version 1.185, 2011/10/31 01:20:05
|
version 1.189, 2012/10/29 17:38:56
|
Line 261 sub real_handler {
|
Line 261 sub real_handler {
|
my $uri = shift; |
my $uri = shift; |
if (!defined($uri)) { $uri = $r->uri(); } |
if (!defined($uri)) { $uri = $r->uri(); } |
$env{'request.uri'} = $uri; |
$env{'request.uri'} = $uri; |
my $filename = '/home/httpd/html' . $uri; |
my $filename = $r->dir_config('lonDocRoot').$uri; |
my $fh = Apache::File->new($filename); |
my $fh = Apache::File->new($filename); |
my $file; |
my $file; |
read $fh, $file, 100000000; |
read $fh, $file, 100000000; |
Line 1913 CHECK
|
Line 1913 CHECK
|
if ($anytime) { |
if ($anytime) { |
$result.=' checked="checked" ' |
$result.=' checked="checked" ' |
} |
} |
$result.="name='${var}anytime'/>".&mt('Any time').'</label>' |
my $anytimetext = &mt('Any time'); |
|
if (($var eq 'startreserve') || ($var eq 'endreserve')) { |
|
$anytimetext = &mt('Any time before slot starts'); |
|
} elsif (($var eq 'startunique') || ($var eq 'endunique')) { |
|
$anytimetext = &mt('No restriction on uniqueness'); |
|
} |
|
$result.="name='${var}anytime'/>".$anytimetext.'</label>' |
} |
} |
return $result; |
return $result; |
|
|
Line 2976 BUTTONS
|
Line 2982 BUTTONS
|
# If the subdirectory is in local CSTR space |
# If the subdirectory is in local CSTR space |
my $metadir; |
my $metadir; |
my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; |
my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; |
if ($subdir =~ m{^\Q$londocroot/priv/\E[^/]+/[^/]+/(.*)$}) { |
if ($subdir =~ m{^(?:\Q$londocroot\E)*/priv/[^/]+/[^/]+/(.*)$}) { |
my $innerpath=$1; |
my $innerpath=$1; |
|
unless ($subdir=~m{^\Q$londocroot\E}) { |
|
$subdir=$londocroot.$subdir; |
|
} |
my ($user,$domain)= |
my ($user,$domain)= |
&Apache::loncacc::constructaccess($subdir); |
&Apache::lonnet::constructaccess($subdir); |
$metadir='/res/'.$domain.'/'.$user.'/'.$innerpath; |
$metadir='/res/'.$domain.'/'.$user.'/'.$innerpath; |
($listref,$listerror) = |
($listref,$listerror) = |
&Apache::lonnet::dirlist($subdir,$domain,$user,undef,undef,'/'); |
&Apache::lonnet::dirlist($subdir,$domain,$user,undef,undef,'/'); |