[LON-CAPA-cvs] cvs: rat / lonwrapper.pm loncom/interface lonhtmlcommon.pm
raeburn
raeburn at source.lon-capa.org
Thu Nov 29 15:13:49 EST 2012
raeburn Thu Nov 29 20:13:49 2012 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm
/rat lonwrapper.pm
Log:
- Title of content item shown in breadcrumbs for supplemental content for
both uploaded documents, and external resource.
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.332 loncom/interface/lonhtmlcommon.pm:1.333
--- loncom/interface/lonhtmlcommon.pm:1.332 Tue Nov 27 23:45:08 2012
+++ loncom/interface/lonhtmlcommon.pm Thu Nov 29 20:13:43 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.332 2012/11/27 23:45:08 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.333 2012/11/29 20:13:43 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1933,14 +1933,18 @@
'no_mt' => 1,
});
}
+ if ($title) {
+ push(@docs_crumbs,
+ {'title' => $title,
+ 'text' => $title,
+ 'no_mt' => 1,}
+ );
+ }
if (wantarray) {
unless ($precleared) {
&clear_breadcrumbs();
}
&add_breadcrumb(@docs_crumbs);
- if ($title) {
- &add_breadcrumb({text => $title});
- }
if ($contenteditor) {
$plain=~s/\>\;\s*$//;
}
Index: rat/lonwrapper.pm
diff -u rat/lonwrapper.pm:1.42 rat/lonwrapper.pm:1.43
--- rat/lonwrapper.pm:1.42 Tue Nov 27 23:45:15 2012
+++ rat/lonwrapper.pm Thu Nov 29 20:13:49 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Wrapper for external and binary files as standalone resources
#
-# $Id: lonwrapper.pm,v 1.42 2012/11/27 23:45:15 raeburn Exp $
+# $Id: lonwrapper.pm,v 1.43 2012/11/29 20:13:49 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -126,20 +126,12 @@
return OK;
} elsif ($env{'form.folderpath'} =~ /^supplemental/) {
my $crstype = &Apache::loncommon::course_type();
- $brcrum =
- &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$env{'form.title'},1);
- if (ref($brcrum) eq 'ARRAY') {
- my $last = $env{'form.title'};
- if ($last eq '') {
- $last = &mt('External Resource');
- }
- push(@{$brcrum},
- {'title' => $last,
- 'text' => $last,
- 'no_mt' => 1,
- });
-
+ my $title = $env{'form.title'};
+ if ($title eq '') {
+ $title = &mt('External Resource');
}
+ $brcrum =
+ &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1);
}
}
More information about the LON-CAPA-cvs
mailing list