[LON-CAPA-cvs] cvs: loncom /homework hint.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 06 Dec 2004 19:48:22 -0000


albertel		Mon Dec  6 14:48:22 2004 EDT

  Modified files:              
    /loncom/homework	hint.pm 
  Log:
  - BUG#3680, leaking info in showoncorrect="no"
  
  
  
Index: loncom/homework/hint.pm
diff -u loncom/homework/hint.pm:1.57 loncom/homework/hint.pm:1.58
--- loncom/homework/hint.pm:1.57	Fri Nov 19 17:26:37 2004
+++ loncom/homework/hint.pm	Mon Dec  6 14:48:22 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # implements the tags that control the hints
 #
-# $Id: hint.pm,v 1.57 2004/11/19 22:26:37 albertel Exp $
+# $Id: hint.pm,v 1.58 2004/12/06 19:48:22 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -54,7 +54,7 @@
 	    $Apache::lonhomework::history{"resource.$id.solved"};
 	my $showoncorrect=lc(&Apache::lonxml::get_param('showoncorrect',$parstack,$safeeval));	
 	&Apache::lonxml::debug("onc orrect $showoncorrect, $gradestatus");
-	if ( ($showoncorrect ne 'yes' && $gradestatus =~ /^correct/) ||
+	if ( ($showoncorrect ne 'yes' && &Apache::response::show_answer()) ||
 	     ( $numtries < $hinttries) ) {
 	    &Apache::lonxml::debug("Grabbin all");
 	    &Apache::lonxml::get_all_text("/hintgroup",$parser);