--- loncom/interface/lonhtmlcommon.pm 2012/12/07 17:15:56 1.337 +++ 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.337 2012/12/07 17:15:56 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.341 2013/02/05 16:22:27 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1396,7 +1396,8 @@ sub htmlareaselectactive { # is used to determine when the countdown timer turns red to warn the user # to think about submitting. - my $dueDateLayout = &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn} [_1]',""); + my $dueDateLayout = &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn} [_1]', + ""); my $early = '- '.&mt('Submit Early').''; my $pastdue = '- '.&mt('Past Due').''; $output .= < "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); @@ -1895,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); @@ -2195,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". '

'; } } - $output .= ''.$pickspec.' '.$courseform.'  selected.
'."\n"; + $output .= + '' + .' '.$courseform.'  ' + .&mt('[_1] selected.', + '' + .'') + .'
'."\n"; return $output; } @@ -3025,7 +3047,10 @@ PARAMSONE } if ((chkh == 1) || (listwchange)) { var primaryheight = document.getElementById('LC_nav_bar').offsetHeight; - var secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight; + var secondaryheight; + if (document.getElementById('LC_secondary_menu') != null) { + secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight; + } var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight; var dccidheight = 0; if (document.getElementById('dccid') != null) {