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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 02 Dec 2003 04:50:26 -0000


albertel		Mon Dec  1 23:50:26 2003 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - BUG#2318, show problem text and answer on submission page by default
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.164 loncom/homework/grades.pm:1.165
--- loncom/homework/grades.pm:1.164	Mon Dec  1 21:52:10 2003
+++ loncom/homework/grades.pm	Mon Dec  1 23:50:26 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.164 2003/12/02 02:52:10 albertel Exp $
+# $Id: grades.pm,v 1.165 2003/12/02 04:50:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1376,7 +1376,9 @@
 	return;
     }
 
-    $ENV{'form.lastSub'} = ($ENV{'form.lastSub'} eq '' ? 'datesub' : $ENV{'form.lastSub'});
+    if (!$ENV{'form.lastSub'}) { $ENV{'form.lastSub'} = 'datesub'; }
+    if (!$ENV{'form.vProb'}) { $ENV{'form.vProb'} = 'yes'; }
+    if (!$ENV{'form.vAns'}) { $ENV{'form.vAns'} = 'yes'; }
     my $last = ($ENV{'form.lastSub'} eq 'last' ? 'last' : '');
     my $checkIcon = '<img src="'.$request->dir_config('lonIconsURL').
 	'/check.gif" height="16" border="0" />';