From 7deab5085ad59efafcaa850909c2bab5e43e0799 Mon Sep 17 00:00:00 2001 From: wwdillingham Date: Fri, 07 Aug 2009 20:32:33 +0000 Subject: subtraction yes no determination --- diff --git a/4.N.10_Parser.php b/4.N.10_Parser.php index 2900d83..d36f07a 100644 --- a/4.N.10_Parser.php +++ b/4.N.10_Parser.php @@ -176,18 +176,31 @@ foreach ($Class as $student) { if( $num_correct[$student] >= ( .7 * ($num_submissions)) { - $understands_addition = "yes" + $understands_addition = true; } else { - $understands_addition = "no" + $understands_addition = false; } //*************Subtraction Yes/No ************* - if($subtraction_correct[$student] >= .10 * $ + if($incorrect_subtraction[$student] / $correct_subtraction[$student] <= .10) + { + $understands_subtraction = "y"; //we cannot use bool as there is a third case of "undetermined" with subtraction. + } + elseif($incorrect_subtraction[$student] == NULL || $incorrect_subtraction[$student] == 0) + { + $understands_subtraction = "u" + } + else + { + $understands_subtraction = "n" + } + + } //end foreach diff --git a/4.N.10_Parser.php~ b/4.N.10_Parser.php~ index 4d7c6ba..2900d83 100644 --- a/4.N.10_Parser.php~ +++ b/4.N.10_Parser.php~ @@ -95,7 +95,7 @@ for (i=0;i<=$numRecords;i++) //determine subtraction if ($previous_response[$question_id] == "o") // if you previously overpaid { - $correct_subtraction[$student_id]++; + $correct_subtraction[$student_id]++; //The amount of times a student invoked subtractions correctly } @@ -124,6 +124,7 @@ for (i=0;i<=$numRecords;i++) elseif($previous_response[$question_id] == "o") { $strikes[$student_id]++; + $incorrect_subtraction[$student_id] } } @@ -148,6 +149,7 @@ for (i=0;i<=$numRecords;i++) } elseif($previous_response[$question_id] == "o") { + $incorrect_subtraction[$student_id]++; } @@ -180,7 +182,12 @@ foreach ($Class as $student) { $understands_addition = "no" } - + + +//*************Subtraction Yes/No ************* + + + if($subtraction_correct[$student] >= .10 * $ } //end foreach -- cgit v0.9.1