--- loncom/interface/lonnavmaps.pm 2004/05/06 15:04:00 1.242.2.1 +++ loncom/interface/lonnavmaps.pm 2004/01/30 23:38:19 1.244 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.242.2.1 2004/05/06 15:04:00 albertel Exp $ +# $Id: lonnavmaps.pm,v 1.244 2004/01/30 23:38:19 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -371,7 +371,7 @@ sub getDescription { $triesString = "$triesString"; } } - if ($res->duedate()) { + if ($res->duedate($part)) { return &mt("Due")." " . timeToHumanString($res->duedate($part)) . " $triesString"; } else { @@ -393,8 +393,8 @@ sub dueInLessThen24Hours { return ($status == $res->OPEN() || $status == $res->TRIES_LEFT()) && - $res->duedate() && $res->duedate() < time()+(24*60*60) && - $res->duedate() > time(); + $res->duedate($part) && $res->duedate($part) < time()+(24*60*60) && + $res->duedate($part) > time(); } # Convenience function, so others can use it: Is there only one try remaining for the @@ -406,8 +406,8 @@ sub lastTry { my $tries = $res->tries($part); my $maxtries = $res->maxtries($part); return $tries && $maxtries && $maxtries > 1 && - $maxtries - $tries == 1 && $res->duedate() && - $res->duedate() > time(); + $maxtries - $tries == 1 && $res->duedate($part) && + $res->duedate($part) > time(); } # This puts a human-readable name on the ENV variable. @@ -895,12 +895,8 @@ sub render_resource { $icon = $params->{'indentString'}; } } else { - my $curfext= (split (/\./,$resource->src))[-1]; - my $embstyle = &Apache::loncommon::fileembstyle($curfext); - # The unless conditional that follows is a bit of overkill - if (!(!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn')) { - $icon = ""; - } + $icon = ""; } # Display the correct map icon to open or shut map @@ -3167,7 +3163,7 @@ sub is_page { sub is_problem { my $self=shift; my $src = $self->src(); - return ($src =~ /\.(problem|exam|quiz|assess|survey|form|library)$/); + return ($src =~ /problem$/); } sub is_sequence { my $self=shift;