Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/4.N.10_Parser.php
diff options
context:
space:
mode:
Diffstat (limited to '4.N.10_Parser.php')
-rw-r--r--4.N.10_Parser.php19
1 files changed, 16 insertions, 3 deletions
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