I use Feedback (ver. 2008050129) on Moodle 1.9.11+.
The bar graph on the analysis result page is in brown color only as shown on the attached image.
I found in the HTML source the color of the bar (GIF image) of each item is same like
<img alt="0" src="pics/0.gif" ...
<img alt="0" src="pics/0.gif" ...
Is this a bug in Feedback module for Moodle 1.9 and is there any way to fix it?
# Feedback module for Moodle 2.0 looked fine when I tested on demo.moodle.net.
I solved the problem by modifying the code as follows:
mod/feedback/item/multichoice/lib.php (around line 155) and
mod/feedback/item/multichoicerated/lib.php (around line 132)
if( function_exists("bcmod")) {
$intvalue = bcmod($pixnr, 10);
}else {
$intvalue = 0;
}
should be changed to
$intvalue = $pixnr - floor($pixnr/10)*10;
# I do not know why the function 'bcmod' must be used in the code if it is not always available...
# On some PHP setup (ex. CentOS 5.5) bcmod seems not available unless you recompile PHP with --enable-bcmath.
mod/feedback/item/multichoice/lib.php (around line 155) and
mod/feedback/item/multichoicerated/lib.php (around line 132)
if( function_exists("bcmod")) {
$intvalue = bcmod($pixnr, 10);
}else {
$intvalue = 0;
}
should be changed to
$intvalue = $pixnr - floor($pixnr/10)*10;
# I do not know why the function 'bcmod' must be used in the code if it is not always available...
# On some PHP setup (ex. CentOS 5.5) bcmod seems not available unless you recompile PHP with --enable-bcmath.
Hi Toshihiro,
that is old code I never changed . I should do this.
Thank you for reminding my!
Andreas
Hi,
Oh, I guessed so.
Thank you very much for developing this useful module.
I am letting students use Feedback via mobile phones including iPhone and Android phones
(thanks to MFM).
Oh, I guessed so.
Thank you very much for developing this useful module.
I am letting students use Feedback via mobile phones including iPhone and Android phones
(thanks to MFM).
Hi Toshihiro,
I changed the code now in feedback for 1.9 and 2.x
from
$intvalue = bcmod($pixnr, 10);
to
$intvalue = $pixnr % 10;
Thank you for reminding!
Andreas
Oh, % operator is available in PHP!
I did not notice that.
Thank you for your quick revision.
I did not notice that.
Thank you for your quick revision.