--- loncom/homework/lonhomework.pm 2011/09/09 16:56:35 1.328
+++ loncom/homework/lonhomework.pm 2011/11/14 00:20:39 1.330
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.328 2011/09/09 16:56:35 bisitz Exp $
+# $Id: lonhomework.pm,v 1.330 2011/11/14 00:20:39 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -698,7 +698,7 @@ sub analyze_header {
my $js = &Apache::structuretags::setmode_javascript();
# Breadcrumbs
- my $brcrum = [{'href' => &Apache::loncommon::authorspace(),
+ my $brcrum = [{'href' => &Apache::loncommon::authorspace($request->uri),
'text' => 'Construction Space'},
{'href' => '',
'text' => 'Problem Testing'},
@@ -936,7 +936,7 @@ sub editxmlmode {
&Apache::lonhtmlcommon::dragmath_js("EditMathPopup");
# Breadcrumbs
- my $brcrum = [{'href' => &Apache::loncommon::authorspace(),
+ my $brcrum = [{'href' => &Apache::loncommon::authorspace($request->uri),
'text' => 'Construction Space'},
{'href' => '',
'text' => 'Problem Editing'}];
@@ -1099,6 +1099,7 @@ sub get_template_list {
my $count = 0;
my $currentcategory='';
my $first = 1;
+ my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'};
foreach my $file (@files) {
next if ($file->[1] !~ /\S/);
if ($file->[2] ne $currentcategory) {
@@ -1122,7 +1123,7 @@ sub get_template_list {
$result.=&Apache::loncommon::help_open_topic($file->[3]);
}
my $filename=$file->[0];
- $filename=~s/^\/home\/httpd\/html//;
+ $filename=~s{^\Q$londocroot\E}{};
$result.=' '
.''.&mt('Example').''
.'
'."\n";
@@ -1158,12 +1159,10 @@ sub newproblem {
&renderpage($request,$dest);
} else {
my $url=&HTML::Entities::encode($request->uri,'<>&"');
- my $shownurl=$url;
- $shownurl=~s-^/~-/priv/-;
my $dest = &Apache::lonnet::filelocation("",$request->uri);
my $errormsg;
my $instructions;
- my $brcrum = [{'href' => &Apache::loncommon::authorspace(),
+ my $brcrum = [{'href' => &Apache::loncommon::authorspace($request->uri),
'text' => 'Construction Space'},
{'href' => '',
'text' => "Create New $extension"}];
@@ -1178,7 +1177,7 @@ sub newproblem {
.'
'.&mt("To create a new $extension, select a template from the". " list below. Then click on the \"Create $extension\" button.").'