--- loncom/interface/lonhelper.pm 2011/10/31 01:20:05 1.185 +++ loncom/interface/lonhelper.pm 2011/12/18 17:15:03 1.188 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # .helper XML handler to implement the LON-CAPA helper # -# $Id: lonhelper.pm,v 1.185 2011/10/31 01:20:05 raeburn Exp $ +# $Id: lonhelper.pm,v 1.188 2011/12/18 17:15:03 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -261,7 +261,7 @@ sub real_handler { my $uri = shift; if (!defined($uri)) { $uri = $r->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 $file; read $fh, $file, 100000000; @@ -1913,7 +1913,13 @@ CHECK if ($anytime) { $result.=' checked="checked" ' } - $result.="name='${var}anytime'/>".&mt('Any time').'' + 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.'' } return $result; @@ -2976,8 +2982,11 @@ BUTTONS # If the subdirectory is in local CSTR space my $metadir; my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; - if ($subdir =~ m{^\Q$londocroot/priv/\E[^/]+/[^/]+/(.*)$}) { + if ($subdir =~ m{^(?:\Q$londocroot\E)*/priv/[^/]+/[^/]+/(.*)$}) { my $innerpath=$1; + unless ($subdir=~m{^\Q$londocroot\E}) { + $subdir=$londocroot.$subdir; + } my ($user,$domain)= &Apache::loncacc::constructaccess($subdir); $metadir='/res/'.$domain.'/'.$user.'/'.$innerpath;