[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm

raeburn raeburn at source.lon-capa.org
Wed Jul 12 13:43:24 EDT 2023


raeburn		Wed Jul 12 17:43:24 2023 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - Breadcrumbs text when displaying/editing resource in Course Authoring Space.
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.576 loncom/homework/structuretags.pm:1.577
--- loncom/homework/structuretags.pm:1.576	Sun Jun  4 13:25:21 2023
+++ loncom/homework/structuretags.pm	Wed Jul 12 17:43:24 2023
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.576 2023/06/04 13:25:21 raeburn Exp $
+# $Id: structuretags.pm,v 1.577 2023/07/12 17:43:24 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -554,11 +554,20 @@
 	     && $env{'request.state'} eq 'construct') {
 	if ($target eq 'web' || $target eq 'edit') {
             unless ($env{'form.inhibitmenu'} eq 'yes') {
+                my $text = 'Authoring Space';
+                my $href = &Apache::loncommon::authorspace($env{'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 = &mt('Course Authoring Space');
+                    }
+                }
                 # Breadcrumbs for Authoring Space
                 &Apache::lonhtmlcommon::clear_breadcrumbs();
                 &Apache::lonhtmlcommon::add_breadcrumb({
-                    'text'  => 'Authoring Space',
-                    'href'  => &Apache::loncommon::authorspace($env{'request.uri'}),
+                    'text'  => $text,
+                    'href'  => $href,
                 });
                 # breadcrumbs (and tools) will be created 
                 # in start_page->bodytag->innerregister




More information about the LON-CAPA-cvs mailing list