Permalink
Browse files

MDL-28014 - unpropitious use of bcmod()

  • Loading branch information...
1 parent ff555b5 commit 3fcd1d05b9e9ff704116f72597f0eac8b22b997a @grabs grabs committed Jun 23, 2011
Showing with 2 additions and 10 deletions.
  1. +1 −5 mod/feedback/item/multichoice/lib.php
  2. +1 −5 mod/feedback/item/multichoicerated/lib.php
@@ -213,11 +213,7 @@ function print_analysed($item, $itemnr = '', $groupid = false, $courseid = false
$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);
@@ -184,11 +184,7 @@ function print_analysed($item, $itemnr = '', $groupid = false, $courseid = false
$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);

0 comments on commit 3fcd1d0

Please sign in to comment.