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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 28 Apr 2006 21:58:37 -0000


albertel		Fri Apr 28 17:58:37 2006 EDT

  Modified files:              
    /loncom/interface/statistics	lonstudentassessment.pm 
    /loncom/interface	loncoursedata.pm 
  Log:
  - .task 'version' is really tries for them
  - 'correct_by_override' is the normal stat of affairs for a .task
  
  
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.136 loncom/interface/statistics/lonstudentassessment.pm:1.137
--- loncom/interface/statistics/lonstudentassessment.pm:1.136	Sat Apr  8 02:59:44 2006
+++ loncom/interface/statistics/lonstudentassessment.pm	Fri Apr 28 17:58:33 2006
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentassessment.pm,v 1.136 2006/04/08 06:59:44 albertel Exp $
+# $Id: lonstudentassessment.pm,v 1.137 2006/04/28 21:58:33 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1893,7 +1893,7 @@
                 if ($status eq 'excused') {
                     $symbol = 'x';
                     $max--;
-                } elsif ($status eq 'correct_by_override') {
+                } elsif ($status eq 'correct_by_override' && !$resource->is_task()) {
                     $symbol = '+';
                     $sum++;
                 } elsif ($tries > 0) {
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.163 loncom/interface/loncoursedata.pm:1.164
--- loncom/interface/loncoursedata.pm:1.163	Fri Apr 28 17:55:26 2006
+++ loncom/interface/loncoursedata.pm	Fri Apr 28 17:58:37 2006
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursedata.pm,v 1.163 2006/04/28 21:55:26 albertel Exp $
+# $Id: loncoursedata.pm,v 1.164 2006/04/28 21:58:37 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -902,6 +902,15 @@
     undef(%students_by_id);
 }
 
+
+################################################
+################################################
+
+sub symb_is_for_task {
+    my ($symb) = @_;
+    return ($symb =~ /\.task$/);
+}
+
 ################################################
 ################################################
 
@@ -1292,7 +1301,10 @@
             my $award   = $param_hash->{'resource.'.$part.'.award'};
             my $awarddetail = $param_hash->{'resource.'.$part.'.awarddetail'};
             my $timestamp = $param_hash->{'timestamp'};
-            my $tries   = $param_hash->{'resource.'.$part.'.tries'};
+	    my $tries   = $param_hash->{'resource.'.$part.'.tries'};
+	    if (&symb_is_for_task($current_symb)) {
+		$tries   = $param_hash->{'resource.'.$part.'.version'};
+	    }
             #
             $solved      = '' if (! defined($solved));
             $tries       = '' if (! defined($tries));