[LON-CAPA-cvs] cvs: modules /gerd/discussions eval.pl
www
lon-capa-cvs@mail.lon-capa.org
Thu, 31 Mar 2005 17:50:56 -0000
www Thu Mar 31 12:50:56 2005 EDT
Modified files:
/modules/gerd/discussions eval.pl
Log:
More stats
Index: modules/gerd/discussions/eval.pl
diff -u modules/gerd/discussions/eval.pl:1.8 modules/gerd/discussions/eval.pl:1.9
--- modules/gerd/discussions/eval.pl:1.8 Thu Mar 31 12:15:16 2005
+++ modules/gerd/discussions/eval.pl Thu Mar 31 12:50:56 2005
@@ -125,9 +125,15 @@
&callsums('conceptual&diff'.$diffidx,$error,@entries);
# question type
my ($qtype,$ftype)=($entries[$type]=~/^(\d)(\w)$/);
- &callsums('procedural&type'.$qtype,$error,@entries);
+ &callsums('emotion&type'.$qtype,$error,@entries);
+ &callsums('emotion&type'.$ftype,$error,@entries);
+ &callsums('emotion&type'.$qtype.$ftype,$error,@entries);
+ &callsums('procedural&type'.$qtype,$error,@entries);
&callsums('procedural&type'.$ftype,$error,@entries);
&callsums('procedural&type'.$qtype.$ftype,$error,@entries);
+ &callsums('solution&type'.$qtype,$error,@entries);
+ &callsums('solution&type'.$ftype,$error,@entries);
+ &callsums('solution&type'.$qtype.$ftype,$error,@entries);
&callsums('math&type'.$qtype,$error,@entries);
&callsums('math&type'.$ftype,$error,@entries);
&callsums('math&type'.$qtype.$ftype,$error,@entries);
@@ -138,7 +144,10 @@
&callsums('conceptual&type'.$ftype,$error,@entries);
&callsums('conceptual&type'.$qtype.$ftype,$error,@entries);
# course
+ &callsums('emotion&course'.$entries[$course],$error,@entries);
+ &callsums('chat&course'.$entries[$course],$error,@entries);
&callsums('procedural&course'.$entries[$course],$error,@entries);
+ &callsums('solution&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);
@@ -148,7 +157,10 @@
#
# Output
#
-print "\n\n==== Difficulty\n";
+print "\n\n==== Difficulty\n".&padded();
+foreach ('emot','','proc','','phys','','conc','') {
+ print ','.&padded($_);
+}
for (my $i=0;$i<=10;$i++) {
print "\n".&padded($i).','.
&reportout('emotion&diff'.$i).',',
@@ -156,10 +168,15 @@
&reportout('physics&diff'.$i).',',
&reportout('conceptual&diff'.$i);
}
-print "\n\n==== Questiontype\n";
+print "\n\n==== Questiontype\n".&padded();
+foreach ('emot','','proc','','solu','','math','','phys','','conc','') {
+ print ','.&padded($_);
+}
for (my $i=1;$i<=7;$i++) {
print "\n".&padded($i).','.
+ &reportout('emotion&type'.$i).',',
&reportout('procedural&type'.$i).',',
+ &reportout('solution&type'.$i).',',
&reportout('math&type'.$i).',',
&reportout('physics&type'.$i).',',
&reportout('conceptual&type'.$i);
@@ -167,16 +184,24 @@
print "\n";
foreach my $i ('a','b') {
print "\n".&padded($i).','.
+ &reportout('emotion&type'.$i).',',
&reportout('procedural&type'.$i).',',
+ &reportout('solution&type'.$i).',',
&reportout('math&type'.$i).',',
&reportout('physics&type'.$i).',',
&reportout('conceptual&type'.$i);
}
-print "\n\n==== Course\n";
+print "\n\n==== Course\n".&padded();
+foreach ('emot','','chat','','proc','','solu','','math','','phys','','conc','') {
+ print ','.&padded($_);
+}
foreach my $i ('phy231','lbs271','lbs272') {
print "\n".&padded($i).','.
+ &reportout('emotion&course'.$i).',',
+ &reportout('chat&course'.$i).',',
&reportout('procedural&course'.$i).',',
+ &reportout('solution&course'.$i).',',
&reportout('math&course'.$i).',',
&reportout('physics&course'.$i).',',
&reportout('conceptual&course'.$i);
@@ -250,6 +275,26 @@
return $sum;
}
+sub solution {
+ my @entries=@_;
+ return &solution_question(@entries)
+ +&solution_answer(@entries);
+}
+
+sub solution_question {
+ my @entries=@_;
+ return $entries[$disc{'3b'}]
+ +$entries[$disc{'5b'}]
+ +$entries[$disc{'7b'}];
+}
+
+sub solution_answer {
+ my @entries=@_;
+ return $entries[$disc{'4b'}]
+ +$entries[$disc{'6b'}]
+ +$entries[$disc{'8b'}];
+}
+
sub procedural {
my @entries=@_;
return &procedural_question(@entries)
@@ -338,4 +383,22 @@
-$entries[$disc{'2b'}]
-$entries[$disc{'2c'}]
-$entries[$disc{'2d'}];
-}
+}
+
+sub chat {
+ my @entries=@_;
+ return $entries[$disc{'1a'}]
+ +$entries[$disc{'2a'}]
+ +$entries[$disc{'3a'}]
+ +$entries[$disc{'4a'}]
+ +$entries[$disc{'5a'}]
+ +$entries[$disc{'6a'}]
+ +$entries[$disc{'7a'}]
+ +$entries[$disc{'8a'}]
+ +$entries[$disc{'1b'}]
+ +$entries[$disc{'2b'}]
+ +$entries[$disc{'1c'}]
+ +$entries[$disc{'2c'}]
+ +$entries[$disc{'1d'}]
+ +$entries[$disc{'2d'}];
+}