--- loncom/interface/lonhtmlcommon.pm 2012/12/18 15:27:46 1.338
+++ loncom/interface/lonhtmlcommon.pm 2013/02/05 16:22:27 1.341
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.338 2012/12/18 15:27:46 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.341 2013/02/05 16:22:27 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1761,11 +1761,24 @@ returns: nothing
.$links
;
}
-
- &render_tools(\$links);
- $links = &htmltag('div', $links,
- { id => "LC_breadcrumbs" }) unless ($CourseBreadcrumbs) ;
- &render_advtools(\$links);
+ my $nav_and_tools = 0;
+ foreach my $item ('navigation','tools') {
+ if (ref($tools{$item}) eq 'ARRAY') {
+ $nav_and_tools += scalar(@{$tools{$item}})
+ }
+ }
+ if (($links ne '') || ($nav_and_tools)) {
+ &render_tools(\$links);
+ $links = &htmltag('div', $links,
+ { id => "LC_breadcrumbs" }) unless ($CourseBreadcrumbs) ;
+ }
+ my $adv_tools = 0;
+ if (ref($tools{'advtools'}) eq 'ARRAY') {
+ $adv_tools = scalar(@{$tools{'advtools'}});
+ }
+ if (($links ne '') || ($adv_tools)) {
+ &render_advtools(\$links);
+ }
# Return the @Crumbs stack to what we started with
push(@Crumbs,$last);
@@ -1896,7 +1909,7 @@ returns: nothing
sub docs_breadcrumbs {
my ($allowed,$crstype,$contenteditor,$title,$precleared)=@_;
my ($folderpath,@folders);
- my @folders = split('&',$env{'form.folderpath'});
+ @folders = split('&',$env{'form.folderpath'});
my $plain='';
my $container = 'sequence';
my ($randompick,$isencrypted,$ishidden,$is_random_order) = (-1,0,0,0);
@@ -2196,11 +2209,11 @@ sub course_selection {
my $courseform=''.&Apache::loncommon::selectcourse_link
($formname,'pickcourse','pickdomain','coursedesc','',1,$crstype).'';
- $output .= ''.$allcrs.'
';
+ $output .= '
';
if ($totcodes > 0) {
my $numtitles = @$codetitles;
if ($numtitles > 0) {
- $output .= ''.&mt('Pick courses by category:').'
';
+ $output .= '
';
$output .= '
'.$$codetitles[0].' '."\n". ' |