--- loncom/xml/lonxml.pm 2018/09/12 21:10:57 1.560 +++ loncom/xml/lonxml.pm 2023/07/13 19:38:43 1.561 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.560 2018/09/12 21:10:57 raeburn Exp $ +# $Id: lonxml.pm,v 1.561 2023/07/13 19:38:43 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1857,8 +1857,17 @@ ENDNOTFOUND } my $brcrum; if ($env{'request.state'} eq 'construct') { - $brcrum = [{'href' => &Apache::loncommon::authorspace($request->uri), - 'text' => 'Authoring Space'}, + my $text = 'Authoring Space'; + my $href = &Apache::loncommon::authorspace($request->uri); + if ($env{'request.course.id'}) { + my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; + my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + if ($href eq "/priv/$cdom/$cnum/") { + $text = 'Course Authoring Space'; + } + } + $brcrum = [{'href' => $href, + 'text' => $text, {'href' => '', 'text' => $breadcrumbtext}]; } else { @@ -1919,9 +1928,18 @@ ENDNOTFOUND 'onload' => $add_to_onload, }); my $header; if ($env{'request.state'} eq 'construct') { + my $text = 'Authoring Space'; + my $href = &Apache::loncommon::authorspace($request->uri); + if ($env{'request.course.id'}) { + my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; + my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + if ($href eq "/priv/$cdom/$cnum/") { + $text = 'Course Authoring Space'; + } + } $options{'bread_crumbs'} = [{ - 'href' => &Apache::loncommon::authorspace($request->uri), - 'text' => 'Authoring Space'}, + 'href' => $href, + 'text' => $text}, {'href' => '', 'text' => $breadcrumbtext}]; $header = &Apache::loncommon::head_subbox(