[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Mon Nov 7 21:27:48 EST 2011


raeburn		Tue Nov  8 02:27:48 2011 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/interface	loncommon.pm 
  Log:
  - Backport 1.1026 (part).
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.948.2.32 loncom/interface/loncommon.pm:1.948.2.33
--- loncom/interface/loncommon.pm:1.948.2.32	Fri Oct  7 14:55:24 2011
+++ loncom/interface/loncommon.pm	Tue Nov  8 02:27:47 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.948.2.32 2011/10/07 14:55:24 raeburn Exp $
+# $Id: loncommon.pm,v 1.948.2.33 2011/11/08 02:27:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4560,7 +4560,9 @@
 
 =item * &CSTR_pageheader()
 
-Inputs: ./.
+Input: (optional) filename from which breadcrumb trail is built.
+       In most cases no input is needed, as $env{'request.filename'}
+       is appropriate for use in building the breadcrumb trail.
 
 Returns: HTML div with CSTR path and recent box
          To be included on Construction Space pages
@@ -4568,10 +4570,16 @@
 =cut
 
 sub CSTR_pageheader {
-    # this is for resources; directories have customtitle, and crumbs
-            # and select recent are created in lonpubdir.pm  
+    my ($trailfile) = @_;
+    if ($trailfile eq '') {
+        $trailfile = $env{'request.filename'};
+    }
+
+# this is for resources; directories have customtitle, and crumbs
+# and select recent are created in lonpubdir.pm  
+
     my ($uname,$thisdisfn)=
-        ($env{'request.filename'} =~ m|^/home/([^/]+)/public_html/(.*)|);
+        ($trailfile =~ m|^/home/([^/]+)/public_html/(.*)|);
     my $formaction='/priv/'.$uname.'/'.$thisdisfn;
     $formaction=~s/\/+/\//g;
 




More information about the LON-CAPA-cvs mailing list