MDL-28014 - unpropitious use of bcmod()

This commit is contained in:
Andreas Grabs
2011-06-23 21:20:49 +02:00
parent ff555b58be
commit 3fcd1d05b9
2 changed files with 2 additions and 10 deletions
+1 -5
View File
@@ -213,11 +213,7 @@ class feedback_item_multichoice extends feedback_item_base {
$analysedVals = $analysedItem[2];
$pixnr = 0;
foreach($analysedVals as $val) {
if( function_exists("bcmod")) {
$intvalue = bcmod($pixnr, 10);
}else {
$intvalue = 0;
}
$intvalue = $pixnr % 10;
$pix = "pics/$intvalue.gif";
$pixnr++;
$pixwidth = intval($val->quotient * FEEDBACK_MAX_PIX_LENGTH);
+1 -5
View File
@@ -184,11 +184,7 @@ class feedback_item_multichoicerated extends feedback_item_base {
$pixnr = 0;
$avg = 0.0;
foreach($analysedVals as $val) {
if( function_exists("bcmod")) {
$intvalue = bcmod($pixnr, 10);
}else {
$intvalue = 0;
}
$intvalue = $pixnr % 10;
$pix = "pics/$intvalue.gif";
$pixnr++;
$pixwidth = intval($val->quotient * FEEDBACK_MAX_PIX_LENGTH);