From c2f62f8670d611f32fd0c2711b708909819d75bc Mon Sep 17 00:00:00 2001 From: wwdillingham Date: Fri, 07 Aug 2009 18:31:57 +0000 Subject: or not --- diff --git a/4.N.10_Parser.php b/4.N.10_Parser.php index 8f2f34c..9123494 100644 --- a/4.N.10_Parser.php +++ b/4.N.10_Parser.php @@ -155,7 +155,7 @@ for (i=0;i<=$numRecords;i++) $previous_response[$question_id] = "u" } - + }//end while() //*******************************************************Output**************************************************** // addition can be determined if a student gets > 70% of the questions correct on their first attempt. @@ -167,15 +167,25 @@ for (i=0;i<=$numRecords;i++) // * If for > 10% of the questions the student makes this mistake. He or she gets a "no" for addition and subtraction. + + //****************** Addition Yes / No *************** -foreach ($Class as $student_id) +foreach ($Class as $student) { - if( + if( $num_correct[$student] >= ( .7 * ($num_submissions)) + { + $understands_addition = "no" + } + else + { + $understands_addition = "yes" + } + } //end foreach - } + } fclose($fp); //close 4.n.10.dat diff --git a/4.N.10_Parser.php~ b/4.N.10_Parser.php~ index bf2e7a8..8f2f34c 100644 --- a/4.N.10_Parser.php~ +++ b/4.N.10_Parser.php~ @@ -70,12 +70,15 @@ for (i=0;i<=$numRecords;i++) //Need to determine which attempt this is for this particular question $attempts[$question_id]++; + + //determine total number of submissions of a student + $num_submissions[$student_id]++; //$num_incorrect[] = (num_submissions[] - num_correct[]) //*****************************Case: Correct Submission ****************************** //How many correct submissions are there - important for determining percentages for yes/no if ($submitted_sum == $correct_sum) { - $student_num_correct[$student_id]++; + $num_correct[$student_id]++; //$question_num_correct[$question_id]++; will only ever be one @@ -160,12 +163,14 @@ for (i=0;i<=$numRecords;i++) // 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 /ddition 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. +//****************** Addition Yes / No *************** foreach ($Class as $student_id) { - + if( } //end foreach -- cgit v0.9.1