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 21:12:53 (GMT)
committer wwdillingham <wwdillingham@sugarlabs.org>2009-08-07 21:12:53 (GMT)
commitb0759bd5e94a8440a6663ba1b4620f42ff593cb2 (patch)
treea731c74226e478ebc37e3ff55325ddba801502d5
parent66e13ac9d8d3999a4f98a3c88be412c0c2060c45 (diff)
incorporating strikes (inability to correct an over or under payment)
-rw-r--r--4.N.10_Parser.php35
-rw-r--r--4.N.10_Parser.php~39
2 files changed, 47 insertions, 27 deletions
diff --git a/4.N.10_Parser.php b/4.N.10_Parser.php
index 8a3c497..593d5e7 100644
--- a/4.N.10_Parser.php
+++ b/4.N.10_Parser.php
@@ -186,27 +186,34 @@ foreach ($Class as $student)
//*************Subtraction Yes/No *************
-
- if($incorrect_subtraction[$student] / ($correct_subtraction[$student] + $incorrect_subtractions[$student]) <= .70)
- {
- $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" //undetermined
- }
- else
- {
- $understands_subtraction = "n"
- }
+
+ if($incorrect_subtraction[$student] / ($correct_subtraction[$student] + $incorrect_subtractions[$student]) <= .70)
+ {
+ $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" //undetermined
+ }
+ else
+ {
+ $understands_subtraction = "n"
+ }
/*************** Strikes *******************
*
* If a student overpays and then increases their payment, or underpays, followed by an even lower payment
* it can be inferred the student does not understand the concepts of addition or subtraction with money.
-* If for > 10% of the questions the student makes this mistake. He or she gets a "no" for addition and subtraction.
+* If for > 10% of the total question_id's the student makes this mistake. He or she gets a "no" for addition and subtraction.
*/
+ if(!($strikes[$student] / $num_questions[$student] <= .10))
+ {
+ $understands_addition = false;
+ $understands_subtraction = "n";
+ }
+
+
} //end foreach
diff --git a/4.N.10_Parser.php~ b/4.N.10_Parser.php~
index d36f07a..593d5e7 100644
--- a/4.N.10_Parser.php~
+++ b/4.N.10_Parser.php~
@@ -186,20 +186,33 @@ foreach ($Class as $student)
//*************Subtraction Yes/No *************
-
- 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"
- }
+ if($incorrect_subtraction[$student] / ($correct_subtraction[$student] + $incorrect_subtractions[$student]) <= .70)
+ {
+ $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" //undetermined
+ }
+ else
+ {
+ $understands_subtraction = "n"
+ }
+
+/*************** Strikes *******************
+*
+* If a student overpays and then increases their payment, or underpays, followed by an even lower payment
+* it can be inferred the student does not understand the concepts of addition or subtraction with money.
+* If for > 10% of the total question_id's the student makes this mistake. He or she gets a "no" for addition and subtraction.
+*/
+
+ if(!($strikes[$student] / $num_questions[$student] <= .10))
+ {
+ $understands_addition = false;
+ $understands_subtraction = "n";
+ }
+
} //end foreach