From: michaelpenne Date: Mon, 6 Dec 2004 20:33:44 +0000 (+0000) Subject: fix class stats for essay questions X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bca6b842caba761a80532892aadd92012c1be52e;p=moodle.git fix class stats for essay questions --- diff --git a/mod/lesson/report.php b/mod/lesson/report.php index 728fdc9180..e1394fc9e3 100644 --- a/mod/lesson/report.php +++ b/mod/lesson/report.php @@ -688,14 +688,14 @@ } if (isset($pagestats[$page->id])) { - $percent = $pagestats[$page->id]->totalscore / $pagestats[$page->id]->total * 100; - $percent = round($percent, 2); - $percent = get_string("averagescore", "lesson").": ". $percent ."%"; + $avescore = $pagestats[$page->id]->totalscore / $pagestats[$page->id]->total; + $avescore = round($avescore, 2); + $avescore = get_string("averagescore", "lesson").": ". $avescore ; } else { // dont think this should ever be reached.... - $percent = get_string("nooneansweredthisquestion", "lesson"); + $avescore = get_string("nooneansweredthisquestion", "lesson"); } - $answerdata->answers[] = array($essayinfo->answer, $percent); + $answerdata->answers[] = array($essayinfo->answer, $avescore); break; case LESSON_BRANCHTABLE : $data = "id\" value=\"$answer->answer\" disabled=\"disabled\"> ";