--- loncom/interface/lonnavmaps.pm 2007/09/01 00:41:42 1.401 +++ loncom/interface/lonnavmaps.pm 2007/10/05 18:48:20 1.402 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.401 2007/09/01 00:41:42 albertel Exp $ +# $Id: lonnavmaps.pm,v 1.402 2007/10/05 18:48:20 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -198,7 +198,11 @@ sub getDescription { } if ($status == $res->OPEN) { if ($res->duedate($part)) { - return &mt("Due")." " .timeToHumanString($res->duedate($part),'end'); + if ($res->is_practice()) { + return &mt("Closes ")." " .timeToHumanString($res->duedate($part),'start'); + } else { + return &mt("Due")." " .timeToHumanString($res->duedate($part),'end'); + } } else { return &mt("Open, no due date"); } @@ -207,7 +211,11 @@ sub getDescription { return &mt("Answer open")." " . timeToHumanString($res->answerdate($part),'start'); } if ($status == $res->PAST_DUE_NO_ANSWER) { - return &mt("Was due")." " . timeToHumanString($res->duedate($part),'end'); + if ($res->is_practice()) { + return &mt("Closed")." " . timeToHumanString($res->duedate($part),'start'); + } else { + return &mt("Was due")." " . timeToHumanString($res->duedate($part),'end'); + } } if (($status == $res->ANSWER_OPEN || $status == $res->PARTIALLY_CORRECT) && $res->handgrade($part) ne 'yes') { @@ -982,7 +990,7 @@ sub render_long_status { $params->{'multipart'} && $part eq "0"; my $color; - if ($resource->is_problem()) { + if ($resource->is_problem() || $resource->is_practice()) { $color = $colormap{$resource->status}; if (dueInLessThan24Hours($resource, $part) || @@ -992,13 +1000,13 @@ sub render_long_status { } if ($resource->kind() eq "res" && - $resource->is_problem() && + ($resource->is_problem() || $resource->is_practice()) && !$firstDisplayed) { if ($color) {$result .= ""; } $result .= getDescription($resource, $part); if ($color) {$result .= ""; } } - if ($resource->is_map() && advancedUser() && $resource->randompick()) { + if ($resource->is_map() && &advancedUser() && $resource->randompick()) { $result .= &mt('(randomly select [_1])', $resource->randompick()); } if ($resource->is_map() && &advancedUser() && $resource->randomorder()) {