mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-28014 - unpropitious use of bcmod()
This commit is contained in:
parent
9867711fd7
commit
b7030c3def
2 changed files with 2 additions and 10 deletions
|
@ -213,11 +213,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||||
$analysedVals = $analysedItem[2];
|
$analysedVals = $analysedItem[2];
|
||||||
$pixnr = 0;
|
$pixnr = 0;
|
||||||
foreach($analysedVals as $val) {
|
foreach($analysedVals as $val) {
|
||||||
if( function_exists("bcmod")) {
|
$intvalue = $pixnr % 10;
|
||||||
$intvalue = bcmod($pixnr, 10);
|
|
||||||
}else {
|
|
||||||
$intvalue = 0;
|
|
||||||
}
|
|
||||||
$pix = "pics/$intvalue.gif";
|
$pix = "pics/$intvalue.gif";
|
||||||
$pixnr++;
|
$pixnr++;
|
||||||
$pixwidth = intval($val->quotient * FEEDBACK_MAX_PIX_LENGTH);
|
$pixwidth = intval($val->quotient * FEEDBACK_MAX_PIX_LENGTH);
|
||||||
|
|
|
@ -184,11 +184,7 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||||
$pixnr = 0;
|
$pixnr = 0;
|
||||||
$avg = 0.0;
|
$avg = 0.0;
|
||||||
foreach($analysedVals as $val) {
|
foreach($analysedVals as $val) {
|
||||||
if( function_exists("bcmod")) {
|
$intvalue = $pixnr % 10;
|
||||||
$intvalue = bcmod($pixnr, 10);
|
|
||||||
}else {
|
|
||||||
$intvalue = 0;
|
|
||||||
}
|
|
||||||
$pix = "pics/$intvalue.gif";
|
$pix = "pics/$intvalue.gif";
|
||||||
$pixnr++;
|
$pixnr++;
|
||||||
$pixwidth = intval($val->quotient * FEEDBACK_MAX_PIX_LENGTH);
|
$pixwidth = intval($val->quotient * FEEDBACK_MAX_PIX_LENGTH);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue