[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

raeburn raeburn at source.lon-capa.org
Thu Jul 13 15:38:43 EDT 2023


raeburn		Thu Jul 13 19:38:43 2023 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  - Breadcrumbs text when displaying/editing resource in Course Authoring Space.
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.560 loncom/xml/lonxml.pm:1.561
--- loncom/xml/lonxml.pm:1.560	Wed Sep 12 21:10:57 2018
+++ loncom/xml/lonxml.pm	Thu Jul 13 19:38:43 2023
@@ -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 @@
                 }
                 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 @@
                     '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(




More information about the LON-CAPA-cvs mailing list