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-06 18:55:17 (GMT)
committer wwdillingham <WWdillingham@sugarlabs.org>2009-08-06 18:55:17 (GMT)
commita155ff0ccba3dfa1291c48bf982b224a75f1d1e8 (patch)
tree4e80306ac0a14f582313bc6075f111dd6050529f
parent2b708e8ff826e0a7d2cac61e528892aebdbf2bcb (diff)
determining attempt number in all payment scenarios
-rw-r--r--4.N.10_Parser.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/4.N.10_Parser.php b/4.N.10_Parser.php
index 2cc9a28..2cae2ee 100644
--- a/4.N.10_Parser.php
+++ b/4.N.10_Parser.php
@@ -52,7 +52,11 @@ for (i=0;i<=$numRecords;i++)
for (i=0;i<=$numRecords;i++)
{
$tok = strtok($lines, " ");
-
+ //this if-statement allows us to determine if a student is on his/her second attempt
+ if ($attempts[$question_id] == 1)
+ {
+
+ }
while ($tok !== false)
{
$student_id = $tok[0];
@@ -72,6 +76,13 @@ for (i=0;i<=$numRecords;i++)
if ($submitted_sum == $correct_sum)
{
$num_correct[$student_id]++;
+
+ //this if-statement allows us to determine if a student is on his/her second attempt
+ if ($attempts[$question_id] == 1)
+ {
+
+ }
+
}
//How many times does each student overpay - important for determining subraction understanding
@@ -79,7 +90,7 @@ for (i=0;i<=$numRecords;i++)
{
$num_overpaid[$student_id]++;
- //this if-statement allows us to
+ //this if-statement allows us to determine if a student is on his/her second attempt
if ($attempts[$question_id] == 1)
{
@@ -90,6 +101,12 @@ for (i=0;i<=$numRecords;i++)
if($submitted_sum < $correct_sum)
{
$num_underpaid[$student_id]++;
+
+ //this if-statement allows us to determine if a student is on his/her second attempt
+ if ($attempts[$question_id] == 1)
+ {
+
+ }
}
}
}