--- loncom/lonmap.pm 2013/05/30 05:04:16 1.11 +++ loncom/lonmap.pm 2014/01/25 06:29:11 1.14 @@ -2,7 +2,7 @@ # # Read maps into a 'big hash'. # -# $Id: lonmap.pm,v 1.11 2013/05/30 05:04:16 raeburn Exp $ +# $Id: lonmap.pm,v 1.14 2014/01/25 06:29:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -213,9 +213,10 @@ sub get_mapalias_errors { $count++; } my ($mapid) = split(/\./,$id); - &mt('Resource "[_1]"
in Map "[_2]"', - $hash->{'title_'.$id}, - $hash->{'title_'.$hash->{'ids_'.$hash->{'map_id_'.$mapid}}}); + &mt('Resource [_1][_2]in Map [_3]', + '"'.$hash->{'title_'.$id}.'"', + '
', + '"'.$hash->{'title_'.$hash->{'ids_'.$hash->{'map_id_'.$mapid}}}.'"'); } (@{ $mapalias_cache{$mapalias} })); next if ($count < 2); $error_text .= '
'. @@ -615,9 +616,9 @@ sub traceroute { my $symb=&Apache::lonnet::encode_symb($hash->{'map_id_'.$mapid},$resid, $hash->{'src_'.$rid}); my $hidden=&Apache::lonnet::EXT('resource.0.hiddenresource',$symb); + my $ignorehidden; if ($hdnflag || lc($hidden) eq 'yes') { - my $ignorehidden; if (defined($hash->{'is_map_'.$rid})) { if (($hash->{'context.nohideurl'}) && ($hash->{'context.nohideurl'} eq $hash->{'src_'.$rid})) { $ignorehidden = 1; # Hidden parameter explicitly deleted @@ -656,12 +657,16 @@ sub traceroute { if (defined($hash->{'is_map_'.$rid})) { if (defined($hash->{'map_start_'.$hash->{'src_'.$rid}})) { + my $maphidden; + unless ($ignorehidden) { + $maphidden = $hdnflag || $hiddenurl{$rid}; + } $sofar=$newsofar= &traceroute($sofar, $hash->{'map_start_'.$hash->{'src_'.$rid}}, $beenhere, $encflag || $encurl{$rid}, - $hdnflag || $hiddenurl{$rid}, $hash); + $maphidden, $hash); } } @@ -681,7 +686,7 @@ sub traceroute { $further=simplify('('.'_'.$rid.')&('. $hash->{'condid_'.$hash->{'undercond_'.$id}}.')'); } else { - my $errtext.=&mt('
Undefined condition ID: [_1]',$hash->{'undercond_'.$id}); + my $errtext.='
'.&mt('Undefined condition ID: [_1]',$hash->{'undercond_'.$id}); throw Error::Simple($errtext); } } @@ -1252,7 +1257,7 @@ sub read_map { my $ispage = ($filename =~/\.page$/); unless ($ispage || ($filename =~ /\.sequence$/)) { &Apache::lonnet::logthis("invalid: $filename : $uri"); - throw Error::Simple(&mt("
Invalid map: [_1]", $filename)); + throw Error::Simple('
'.&mt('Invalid map: [_1]',''.$filename.'')); } $filename =~ /\.(\w+)$/; @@ -1263,8 +1268,8 @@ sub read_map { my $contents = &Apache::lonnet::getfile($filename); if($contents eq -1) { - throw Error::Simple(&mt('
Map not loaded: The file [_1] does not exist.', - $filename)); + throw Error::Simple('
'.&mt('Map not loaded: The file [_1] does not exist.', + ''.$filename.'')); } # Now that we succesfully retrieved the file we can make our parsing passes over it: # parsing is done in passes: