[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
bowersj2
lon-capa-cvs@mail.lon-capa.org
Tue, 30 Sep 2003 15:37:19 -0000
bowersj2 Tue Sep 30 11:37:19 2003 EDT
Modified files:
/loncom/interface lonnavmaps.pm
Log:
Forward port from 1.0.2 leak status information answer date opens.
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.235 loncom/interface/lonnavmaps.pm:1.236
--- loncom/interface/lonnavmaps.pm:1.235 Mon Sep 29 17:07:10 2003
+++ loncom/interface/lonnavmaps.pm Tue Sep 30 11:37:18 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.235 2003/09/29 21:07:10 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.236 2003/09/30 15:37:18 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -127,7 +127,6 @@
# Create the nav map
my $navmap = Apache::lonnavmaps::navmap->new();
-
if (!defined($navmap)) {
my $requrl = $r->uri;
$ENV{'user.error.msg'} = "$requrl:bre:0:0:Course not initialized";
@@ -3369,7 +3368,7 @@
}
sub problemstatus {
(my $self, my $part) = @_;
- return $self->parmval("problemstatus", $part);
+ return lc $self->parmval("problemstatus", $part);
}
sub sig {
(my $self, my $part) = @_;
@@ -3955,7 +3954,12 @@
#if ($self->{RESOURCE_ERROR}) { return NETWORK_FAILURE; }
if ($completionStatus == NETWORK_FAILURE) { return NETWORK_FAILURE; }
- my $suppressFeedback = lc($self->parmval("problemstatus", $part)) eq 'no';
+ my $suppressFeedback = $self->problemstatus($part) eq 'no';
+ # If there's an answer date and we're past it, don't
+ # suppress the feedback; student should know
+ if ($self->answerdate($part) && $self->answerdate($part) < time()) {
+ $suppressFeedback = 0;
+ }
# There are a few whole rows we can dispose of:
if ($completionStatus == CORRECT ||