--- loncom/interface/lonnavmaps.pm 2009/10/26 10:16:56 1.437 +++ loncom/interface/lonnavmaps.pm 2010/01/07 12:42:43 1.442 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.437 2009/10/26 10:16:56 foxr Exp $ +# $Id: lonnavmaps.pm,v 1.442 2010/01/07 12:42:43 wenzelju Exp $ # # Copyright Michigan State University Board of Trustees @@ -49,7 +49,7 @@ described at http://www.lon-capa.org. =head1 OVERVIEW -X When a user enters a course, LON-CAPA examines the course structure and caches it in what is often referred to as the "big hash" X. You can see it if you are logged into LON-CAPA, in a course, by going to /adm/test. (You may need to @@ -505,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 = @@ -1034,7 +1037,7 @@ sub render_communication_status { my $location=&Apache::loncommon::lonhttpdurl("/adm/lonMisc"); if ($resource->hasDiscussion()) { $discussionHTML = $linkopen . - ''.&mt('New Discussion').'' . + ''.&mt('New Discussion').'' . $linkclose; } @@ -1044,7 +1047,7 @@ sub render_communication_status { if ($msgid) { $feedbackHTML .= ' ' - . ''.&mt('New E-mail').''; + . ''.&mt('New E-mail').''; } } } @@ -1058,7 +1061,7 @@ sub render_communication_status { $errorcount++; $errorHTML .= ' ' - . ''.&mt('New Error').''; + . ''.&mt('New Error').''; } } } @@ -1091,7 +1094,7 @@ sub render_quick_status { if ($icon) { my $location= &Apache::loncommon::lonhttpdurl("/adm/lonIcons/$icon"); - $result .= "$linkopen$alt$linkclose"; + $result .= $linkopen.''.&mt($alt).''.$linkclose; } else { $result .= " "; } @@ -1525,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 @@ -1760,7 +1762,6 @@ END # show them. foreach my $part (@parts) { $rownum ++; - my $backgroundColor = $backgroundColors[$rownum % scalar(@backgroundColors)]; $result .= &Apache::loncommon::start_data_table_row(); @@ -3531,7 +3532,11 @@ sub navHash { my $self = shift; my $param = shift; my $id = shift; - return $self->{NAV_MAP}->navhash($param . ($id?$self->{ID}:"")); + my $arg = $param . ($id?$self->{ID}:""); + if (defined($arg)) { + return $self->{NAV_MAP}->navhash($arg); + } + return; } =pod