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

banghart lon-capa-cvs@mail.lon-capa.org
Thu, 22 Feb 2007 00:21:47 -0000


banghart		Wed Feb 21 19:21:47 2007 EDT

  Modified files:              
    /loncom/homework	inputtags.pm 
  Log:
  	Don't show receipt if not in a course (e.g., public view of 
  	problem. (Bug 5204)
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.212 loncom/homework/inputtags.pm:1.213
--- loncom/homework/inputtags.pm:1.212	Fri Dec 22 13:30:07 2006
+++ loncom/homework/inputtags.pm	Wed Feb 21 19:21:47 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.212 2006/12/22 18:30:07 albertel Exp $
+# $Id: inputtags.pm,v 1.213 2007/02/22 00:21:47 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -621,9 +621,11 @@
 		$message.= $computer;
 	    }
 	    $added_computer_text=1;
-	    unless ($env{'course.'.
+	    &Apache::lonnet::logthis("the course is ".$env{'request.course.id'});
+	    if ((!$env{'course.'.
 			     $env{'request.course.id'}.
-			     '.disable_receipt_display'} eq 'yes') { 
+			     '.disable_receipt_display'} eq 'yes')&&
+		    $env{'request.course.id'}) { 
 		$message.=(($target eq 'web')?'<br />':' ').
 		    &mt('Your receipt is').' '.&Apache::lonnet::receipt($Apache::inputtags::part).
 		    (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'');