--- loncom/interface/lonnavmaps.pm 2008/02/03 00:05:23 1.412 +++ loncom/interface/lonnavmaps.pm 2008/12/12 22:27:20 1.415.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.412 2008/02/03 00:05:23 www Exp $ +# $Id: lonnavmaps.pm,v 1.415.2.2 2008/12/12 22:27:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -198,7 +198,7 @@ sub getDescription { return &mt("Not currently assigned."); } if ($status == $res->OPEN_LATER) { - return "Open " .timeToHumanString($open,'start'); + return &mt("Open ") .timeToHumanString($open,'start'); } if ($status == $res->OPEN) { if ($due) { @@ -236,7 +236,7 @@ sub getDescription { my $maxtries = $res->maxtries($part); my $triesString = ""; if ($tries && $maxtries) { - $triesString = "($tries of $maxtries tries used)"; + $triesString = '('.&mt('[_1] of [quant,_2,try,tries] used',$tries,$maxtries).')'; if ($maxtries > 1 && $maxtries - $tries == 1) { $triesString = "$triesString"; } @@ -854,7 +854,7 @@ sub render_resource { if (!$resource->condval()) { $nonLinkedText .= ' ('.&mt('conditionally hidden').') '; } - if ($resource->is_practice()) { + if (($resource->is_practice()) && ($resource->is_raw_problem())) { $nonLinkedText .=' '.&mt('not graded').''; } @@ -1741,7 +1741,7 @@ ENDBLOCK $result.='}
- '."\n"; foreach my $link (@linkorder) { if (defined($linkitems->{$link})) { if ($linkitems->{$link}{'text'} ne '') { @@ -1752,7 +1752,7 @@ ENDBLOCK } $result .= '  -
'."\n"; + '."\n"; return $result; } @@ -3613,6 +3613,15 @@ sub is_problem { } return 0; } +sub is_raw_problem { + my $self=shift; + my $src = $self->src(); + if ($src =~ /\.(problem|exam|quiz|assess|survey|form|library|task)$/) { + return 1; + } + return 0; +} + sub contains_problem { my $self=shift; if ($self->is_page()) {