--- loncom/interface/lonnavmaps.pm 2022/06/27 20:35:51 1.560 +++ loncom/interface/lonnavmaps.pm 2022/10/04 14:38:08 1.561 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.560 2022/06/27 20:35:51 raeburn Exp $ +# $Id: lonnavmaps.pm,v 1.561 2022/10/04 14:38:08 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3078,8 +3078,12 @@ sub recursed_crumbs { my $pc = $map->map_pc(); next if ((!$pc) || ($pc == 1)); push(@links,$map); - push(@revmapinfo,{'href' => $env{'request.use_absolute'}.$map->link().'?navmap=1','text' => $map->title(),'no_mt' => 1,}); - $totallength += length($map->title()); + my $text = $map->title(); + if ($text eq '') { + $text = '...'; + } + push(@revmapinfo,{'href' => $env{'request.use_absolute'}.$map->link().'?navmap=1','text' => $text,'no_mt' => 1,}); + $totallength += length($text); } my $numlinks = scalar(@links); if ($numlinks) { @@ -3091,7 +3095,11 @@ sub recursed_crumbs { } @revmapinfo = (); foreach my $map (@links) { - my $showntitle = &truncate_crumb_text($map->title(),$avg); + my $title = $map->title(); + if ($title eq '') { + $title = '...'; + } + my $showntitle = &truncate_crumb_text($title,$avg); if ($showntitle ne '') { push(@revmapinfo,{'href' => $env{'request.use_absolute'}.$map->link().'?navmap=1','text' => $showntitle,'no_mt' => 1,}); }