--- loncom/interface/lonnavmaps.pm 2009/05/04 16:45:57 1.434
+++ loncom/interface/lonnavmaps.pm 2009/12/03 17:50:42 1.440
@@ -1,7 +1,8 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.434 2009/05/04 16:45:57 bisitz Exp $
+# $Id: lonnavmaps.pm,v 1.440 2009/12/03 17:50:42 bisitz Exp $
+
#
# Copyright Michigan State University Board of Trustees
#
@@ -31,7 +32,7 @@
=head1 NAME
-Apache::lonnavmaps.pm
+Apache::lonnavmaps - Subroutines to handle and render the navigation
=head1 SYNOPSIS
@@ -504,10 +505,13 @@ my %statusIconMap =
$resObj->ERROR => ''
);
-my %iconAltTags =
- ( 'navmap.correct.gif' => 'Correct',
- 'navmap.wrong.gif' => 'Incorrect',
- 'navmap.open.gif' => 'Open' );
+my %iconAltTags = #texthash does not work here
+ ( 'navmap.correct.gif' => 'Correct',
+ 'navmap.wrong.gif' => 'Incorrect',
+ 'navmap.open.gif' => 'Open',
+ 'navmap.partial.gif' => 'Partially Correct',
+ 'navmap.ellipsis.gif' => 'Attempted',
+ );
# Defines a status->color mapping, null string means don't color
my %colormap =
@@ -597,7 +601,7 @@ sub getLinkForResource {
my ($map,$id,$src)=&Apache::lonnet::decode_symb($res->symb());
if ($map=~/\.page$/) {
my $url=&Apache::lonnet::clutter($map);
- $anchor=&escape($src->shown_symb());
+ $anchor=&escape($res->shown_symb());
return ($url,$res->shown_symb(),$anchor);
}
}
@@ -880,11 +884,6 @@ sub render_resource {
my $link = $params->{"resourceLink"};
# The URL part is not escaped at this point, but the symb is...
- # The stuff to the left of the ? must have ' replaced by \' since
- # it will be quoted with ' in the href.
-
- my ($left,$right) = split(/\?/, $link);
- $link = $left.'?'.$right;
my $src = $resource->src();
my $it = $params->{"iterator"};
@@ -1095,7 +1094,7 @@ sub render_quick_status {
if ($icon) {
my $location=
&Apache::loncommon::lonhttpdurl("/adm/lonIcons/$icon");
- $result .= "$linkopen$linkclose";
+ $result .= $linkopen.''.$linkclose;
} else {
$result .= " ";
}
@@ -1529,7 +1528,6 @@ END
( $res->NETWORK_FAILURE => 1,
$res->NOTHING_SET => 1,
$res->CORRECT => 1 );
- my @backgroundColors = ("LC_trEven", "LC_trOdd");
# Shared variables
$args->{'counter'} = 0; # counts the rows
@@ -1764,7 +1762,6 @@ END
# show them.
foreach my $part (@parts) {
$rownum ++;
- my $backgroundColor = $backgroundColors[$rownum % scalar(@backgroundColors)];
$result .= &Apache::loncommon::start_data_table_row();