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

foxr lon-capa-cvs@mail.lon-capa.org
Mon, 04 Apr 2005 10:04:09 -0000


foxr		Mon Apr  4 06:04:09 2005 EDT

  Modified files:              
    /loncom/homework	response.pm 
  Log:
  Correct error in figuring out privilege to show all foils.
  
  
  
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.117 loncom/homework/response.pm:1.118
--- loncom/homework/response.pm:1.117	Fri Apr  1 13:08:14 2005
+++ loncom/homework/response.pm	Mon Apr  4 06:04:09 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # various response type definitons response definition
 #
-# $Id: response.pm,v 1.117 2005/04/01 18:08:14 albertel Exp $
+# $Id: response.pm,v 1.118 2005/04/04 10:04:09 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -513,8 +513,9 @@
 sub showallfoils {
     if (defined($ENV{'form.showallfoils'})) {
 	my ($symb)=&Apache::lonxml::whichuser();
-	if ($ENV{'request.state'} eq 'construct' || 
-	    $ENV{'user.adv'} ) {
+	if (($ENV{'request.state'} eq 'construct') || 
+	    ($ENV{'user.adv'} && $symb eq '')      ||
+            ($Apache::lonhomework::viewgrades) ) {
 	    return 1;
 	}
     }