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

matthew lon-capa-cvs@mail.lon-capa.org
Fri, 29 Oct 2004 16:39:42 -0000


matthew		Fri Oct 29 12:39:42 2004 EDT

  Modified files:              
    /loncom/interface/statistics	lonproblemanalysis.pm 
  Log:
  RR_create_percent_selected_plot:
  Fixed bug in prior commit where radiobutton submissions were plotted in
  the column corresponding to the correct answer and not the submitted answer.
  
  
Index: loncom/interface/statistics/lonproblemanalysis.pm
diff -u loncom/interface/statistics/lonproblemanalysis.pm:1.100 loncom/interface/statistics/lonproblemanalysis.pm:1.101
--- loncom/interface/statistics/lonproblemanalysis.pm:1.100	Fri Oct 29 12:13:45 2004
+++ loncom/interface/statistics/lonproblemanalysis.pm	Fri Oct 29 12:39:42 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemanalysis.pm,v 1.100 2004/10/29 16:13:45 matthew Exp $
+# $Id: lonproblemanalysis.pm,v 1.101 2004/10/29 16:39:42 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -635,13 +635,13 @@
     my %correct_selections;
     my %incorrect_selections;
     foreach my $foil (@$foils) {
-        # foil_data has format $foil_data->{true_foil}->{selected foil}
+        # foil_data has format $foil_data->{true_foil}->{selected foil}=count
         next if (! exists($foil_data->{$foil}));
         while (my ($f,$count)= each(%{$foil_data->{$foil}})) {
             if ($f eq $foil) {
                 $correct_selections{$foil} += $count;
             } else {
-                $incorrect_selections{$foil} += $count;
+                $incorrect_selections{$f} += $count;
             }
         }
     }