Is this a bug or is it me?

Is this a bug or is it me?

by Steve Power -
Number of replies: 3

Apologies if this is not the correct place to ask this but all searches for grade_category ended up in this forum.

I have just moved my development Moodle server onto a production box. In doing so I did a backup and restore of the MySQL tables. This failed on restore since the six entries in my mdl_grade_category table all had values of weight stored as 100.00. MySQL correctly would not import this into a field defined as decimal(4,2). I got around the problem by editing the values in the backup to 99.99 which allowed the import to proceed.

Some version numbers

DevelopmentProduction
OS Win XP SP2Win 2003 server
php5.0.45.1.2
MySQL4.1.145.0.18
Moodle1.5.3+ (2005060230)1.5.3+ (2005060230)

I appreciate that I have changed several things at once but in setting up a new server I chose to use the latest stable versions.

I have checked with phpMyAdmin and the values in the original table are truly 100.00 despite the definition of the weight field not supporting this.

Regards
Steve


In reply to Steve Power

Re: Is this a bug or is it me?

by Steve Power -

Just replying to myself to add some more information.

This appears to be caused by a change in behaviour of MySQL. When I use phpMyAdmin to change the data in the weight field I am able to enter 100.00 successfully under MySQL 4.1.14. In fact I can enter any number without error although anything greater than 999.99 gets reduced in value to this.

Under MySQL 5.1.2 entering anything greater than 99.99 causes an error to be reported.

Now is this a change in code or simply me selecting different and stricter options in the rather different MySQL installer.

Steve

In reply to Steve Power

Re: Is this a bug or is it me?

by Drew Keller -

We have had a similiar problem. Students with 100% are not given a grade because we cannot set the letter grade to 100... if we do it bounces back to 99.99. Does anybody know of a work around for this issue. We suspect this is an issue with MySQL 5.

Moodle 1.5.3

MYSQL 5

PHP 5

In reply to Drew Keller

Re: Is this a bug or is it me?

by Steve Power -

Drew

Not really a reply but I thought I would try to keep this alive. I had several problems with moving to MySQL 5 in particular it did not seem to want to restore backups created with MySQL 4. In the end decided that I would be safer reverting to 4.1.16 which I had been using on my development box until more people moved to version 5 and the bugs I thought were in Moodle were resolved.

Steve