Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwwdillingham <wwdillingham@sugarlabs.org>2009-08-07 20:32:33 (GMT)
committer wwdillingham <wwdillingham@sugarlabs.org>2009-08-07 20:32:33 (GMT)
commit7deab5085ad59efafcaa850909c2bab5e43e0799 (patch)
tree8b0f2fde924ff4ea9b5ca64713a4584b8ae46205
parentde030dab878a000feca739984bb79200acb99513 (diff)
subtraction yes no determination
-rw-r--r--4.N.10_Parser.php19
-rw-r--r--4.N.10_Parser.php~11
2 files changed, 25 insertions, 5 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
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