From 544c4b9aa3f182df40fdb9394bcf8a07a6c4865f Mon Sep 17 00:00:00 2001 From: trobb Date: Thu, 11 Dec 2003 23:53:46 +0000 Subject: [PATCH] *** empty log message *** --- mod/quiz/report/fullstat/report.php | 59 ++++++++++++++++------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/mod/quiz/report/fullstat/report.php b/mod/quiz/report/fullstat/report.php index 2f816f7516..eb0fee0eac 100755 --- a/mod/quiz/report/fullstat/report.php +++ b/mod/quiz/report/fullstat/report.php @@ -1,19 +1,21 @@ 0){ + delete_records('quiz_attempts', 'id', $del); + } + $strindivresp = get_string("indivresp", "quiz"); $strname = get_string("name", "quiz"); + $strgrade = get_string("grade", "quiz"); $stritemanal = get_string("itemanal", "quiz"); $strcorrresp = get_string("corrresp", "quiz"); $strnoresponse = get_string("noresponse", "quiz"); @@ -644,7 +651,9 @@ $string['discrimination'] = "Discrim. Index"; //else the data to be printed is in $thisitem['data'] and $thisitem['score'] == 1 shows that the item was correct if ($thisitem['score'] < 1) {$thiscolor = "ff0000";} else {$thiscolor = "000000";} if ($thisitemkey == 0){ - print("$thisitem "); + //modified to add DEL Dec. 12, 2003 + $delstring = get_string('delete'); + print("$thisitem
  ($delstring)"); } elseif ($thisitemkey == 1){ print(" $thisitem%  "); } elseif ($thisitemkey['qtype'] == 2){ @@ -784,6 +793,7 @@ $string['discrimination'] = "Discrim. Index"; } ////just functions below here---------------------------------------------- + function qr_quiz_responses($quiz) { // Given any quiz number, get all responses and place in // $response object @@ -916,22 +926,20 @@ function qr_answer_lookup($qid,$thisanswer){ $qtally[$qid]['qtype'] = $thistype; switch ($thistype) { case 1: //SHORTANSWER - if($returndata['data'] = $thisanswer) {; - $qtally[$qid]['response'][$thisanswer]++; - //convert all to lowercase to allow for mismatching cases to be correct - if (strpos(strtolower($quests[$qid]['correct']),trim(strtolower($thisanswer))) >-1){ - $qtally[$qid]['correct']++; - $returndata['score'] = 1; - } + $returndata['data'] = $thisanswer; + $qtally[$qid]['response'][$thisanswer]++; + //convert all to lowercase to allow for mismatching cases to be correct + if (strpos(strtolower($quests[$qid]['correct']),trim(strtolower($thisanswer))) >-1){ + $qtally[$qid]['correct']++; + $returndata['score'] = 1; } break; case 2: //TRUEFALSE - if ($returndata['data'] = $quests[$qid]['choice'][$thisanswer]['answer']) { - $qtally[$qid][$quests[$qid]['choice'][$thisanswer]['answer']]++; - if ($quests[$qid]['correct']==$quests[$qid]['choice'][$thisanswer]['answer']){ - $returndata['score'] = 1; - $qtally[$qid]['correct']++; - } + $returndata['data'] = $quests[$qid]['choice'][$thisanswer]['answer']; + $qtally[$qid][$quests[$qid]['choice'][$thisanswer]['answer']]++; + if ($quests[$qid]['correct']==$quests[$qid]['choice'][$thisanswer]['answer']){ + $returndata['score'] = 1; + $qtally[$qid]['correct']++; } break; case 3: //MULTICHOICE @@ -950,13 +958,12 @@ function qr_answer_lookup($qid,$thisanswer){ } break; case 8: //NUMERICAL - if ($returndata['data'] = $thisanswer) { + $returndata['data'] = $thisanswer; // $returndata['data'] = $thismin . "<" . $thisanswer . ">" . $thismax; - $qtally[$qid]['response'][$thisanswer]++; - if ($thisanswer >= $thismin[$qid] and $thisanswer <= $thismax[$qid]){ - $qtally[$qid]['correct']++; - $returndata['score'] = 1; - } + $qtally[$qid]['response'][$thisanswer]++; + if ($thisanswer >= $thismin[$qid] and $thisanswer <= $thismax[$qid]){ + $qtally[$qid]['correct']++; + $returndata['score'] = 1; } break; } @@ -1015,4 +1022,4 @@ function qr_match_table($resplist){ $tbl = $tbl . "\n\n"; return $tbl; } -?> +?> \ No newline at end of file -- 2.39.5