[LON-CAPA-cvs] cvs: modules /gerd/discussions eval.pl

www lon-capa-cvs@mail.lon-capa.org
Thu, 31 Mar 2005 17:15:17 -0000


www		Thu Mar 31 12:15:17 2005 EDT

  Modified files:              
    /modules/gerd/discussions	eval.pl 
  Log:
  More stats eval
  
  
Index: modules/gerd/discussions/eval.pl
diff -u modules/gerd/discussions/eval.pl:1.7 modules/gerd/discussions/eval.pl:1.8
--- modules/gerd/discussions/eval.pl:1.7	Thu Mar 31 11:47:04 2005
+++ modules/gerd/discussions/eval.pl	Thu Mar 31 12:15:16 2005
@@ -117,12 +117,32 @@
 foreach my $error (0,1) {
     foreach (@q) {
 	my @entries=split(/\,/,$_);
+# difficulty
 	my $diffidx=int($entries[$diff]*10+0.5);
 	&callsums('emotion&diff'.$diffidx,$error,@entries);
 	&callsums('procedural&diff'.$diffidx,$error,@entries);
 	&callsums('physics&diff'.$diffidx,$error,@entries);
 	&callsums('conceptual&diff'.$diffidx,$error,@entries);
-    }
+# question type
+        my ($qtype,$ftype)=($entries[$type]=~/^(\d)(\w)$/);
+	&callsums('procedural&type'.$qtype,$error,@entries);
+	&callsums('procedural&type'.$ftype,$error,@entries);
+	&callsums('procedural&type'.$qtype.$ftype,$error,@entries);
+ 	&callsums('math&type'.$qtype,$error,@entries);
+	&callsums('math&type'.$ftype,$error,@entries);
+	&callsums('math&type'.$qtype.$ftype,$error,@entries);
+	&callsums('physics&type'.$qtype,$error,@entries);
+	&callsums('physics&type'.$ftype,$error,@entries);
+	&callsums('physics&type'.$qtype.$ftype,$error,@entries);
+	&callsums('conceptual&type'.$qtype,$error,@entries);
+	&callsums('conceptual&type'.$ftype,$error,@entries);
+	&callsums('conceptual&type'.$qtype.$ftype,$error,@entries);
+# course
+	&callsums('procedural&course'.$entries[$course],$error,@entries);
+ 	&callsums('math&course'.$entries[$course],$error,@entries);
+	&callsums('physics&course'.$entries[$course],$error,@entries);
+	&callsums('conceptual&course'.$entries[$course],$error,@entries);
+   }
 }
 
 #
@@ -136,6 +156,33 @@
                       &reportout('physics&diff'.$i).',',
                       &reportout('conceptual&diff'.$i);
 }
+print "\n\n==== Questiontype\n";
+for (my $i=1;$i<=7;$i++) {
+    print "\n".&padded($i).','.
+                      &reportout('procedural&type'.$i).',',
+                      &reportout('math&type'.$i).',',
+                      &reportout('physics&type'.$i).',',
+                      &reportout('conceptual&type'.$i);
+}
+print "\n";
+foreach my $i ('a','b') {
+    print "\n".&padded($i).','.
+                      &reportout('procedural&type'.$i).',',
+                      &reportout('math&type'.$i).',',
+                      &reportout('physics&type'.$i).',',
+                      &reportout('conceptual&type'.$i);
+}
+
+print "\n\n==== Course\n";
+foreach my $i ('phy231','lbs271','lbs272') {
+    print "\n".&padded($i).','.
+                      &reportout('procedural&course'.$i).',',
+                      &reportout('math&course'.$i).',',
+                      &reportout('physics&course'.$i).',',
+                      &reportout('conceptual&course'.$i);
+}
+
+
 print "\n";