[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm /interface/statistics lonstudentassessment.pm

stredwic lon-capa-cvs@mail.lon-capa.org
Sat, 31 Aug 2002 18:31:15 -0000


stredwic		Sat Aug 31 14:31:15 2002 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
    /loncom/interface/statistics	lonstudentassessment.pm 
  Log:
  Fixed the problem where lonstudentassessment would not update after the
  data had been downloaded once, even though the student had done more 
  work.  Now it updates properly.  Simply set the value to false instead
  of checking to see if it was defined, since I define it if it true.  I
  noticed the columns getting off a little now, so I will look at it next
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.26 loncom/interface/loncoursedata.pm:1.27
--- loncom/interface/loncoursedata.pm:1.26	Fri Aug 30 13:11:43 2002
+++ loncom/interface/loncoursedata.pm	Sat Aug 31 14:31:15 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # (Publication Handler
 #
-# $Id: loncoursedata.pm,v 1.26 2002/08/30 17:11:43 stredwic Exp $
+# $Id: loncoursedata.pm,v 1.27 2002/08/31 18:31:15 stredwic Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -786,6 +786,8 @@
 
             # Output dashes for all the parts of this problem if there
             # is no version information about the current problem.
+            $output->{$name.':'.$problemID.':NoVersion'} = 'false';
+            $allkeys{$name.':'.$problemID.':NoVersion'}++;
             if(!$LatestVersion) {
                 foreach my $part (split(/\:/,$data->{$sequence.':'.
                                                       $problemID.
@@ -799,7 +801,6 @@
                     $totalProblems++;
                 }
                 $output->{$name.':'.$problemID.':NoVersion'} = 'true';
-		$allkeys{$name.':'.$problemID.':NoVersion'}++;
                 next;
             }
 
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.8 loncom/interface/statistics/lonstudentassessment.pm:1.9
--- loncom/interface/statistics/lonstudentassessment.pm:1.8	Mon Aug 12 20:37:18 2002
+++ loncom/interface/statistics/lonstudentassessment.pm	Sat Aug 31 14:31:15 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # (Publication Handler
 #
-# $Id: lonstudentassessment.pm,v 1.8 2002/08/13 00:37:18 stredwic Exp $
+# $Id: lonstudentassessment.pm,v 1.9 2002/08/31 18:31:15 stredwic Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -290,7 +290,8 @@
 
     my $Str = '';
     if(defined($cache->{$name.':error'})) {
-        return $Str;
+        return '<br><br><br>';
+#        return 'ERROR in student report for '.$name.'<br>';
     }
     if($cache->{$name.':error'} =~ /course/) {
         $Str .= '<b><font color="blue">No course data for student </font>';
@@ -308,7 +309,7 @@
             foreach(split(/\:/,$cache->{$sequence.':'.$problemID.
                                         ':parts'})) {
                 $characterCount++;
-                if(defined($cache->{$name.':'.$problemID.':NoVersion'}) ||
+                if($cache->{$name.':'.$problemID.':NoVersion'} eq 'true' ||
                    $cache->{$name.':'.$problemID.':'.$_.':code'} eq ' ') {
                     $Str .= ' ';
                     next;