djplaner / moodle-mod_bim

A Moodle activity module the provides support for managing/marking individual student blogs hosted on external services.
http://davidtjones.wordpress.com/research/bam-blog-aggregation-management/
7 stars 2 forks source link

Error in database when marking #95

Closed djplaner closed 9 years ago

djplaner commented 10 years ago

In EDU8117 (AT's post) an attempt to mark is generating a database error

djplaner commented 10 years ago

Bugger - only integer for mark!!!!!!! Son of a b&*^# - it is too. That will need to be fixed.

ERROR: invalid input syntax for integer: "9.25" UPDATE mdl_bim_marking SET bim = $1,userid = $2,marker = $3,question = $4,mark = $5,status = $6,timemarked = $7,timereleased = $8,link = $9,timepublished = $10,title = $11,post = $12,comments = $13 WHERE id=$14 [array (

djplaner commented 9 years ago

It appears that this fix had been done before via the upgrade process (db/upgrade.php). However, the problem is that I should have also updated the db/install.php as well. The upgrade only works if you're at an earlier version and with all the changes I've made, the most recent versions of BIM are well past this.

Process

  1. Update upgrade.php and modify an existing fix to update the grade to a float. Appears to have been there all along but the versions have changed. May need to explore further changes to install.php to make this change no longer necessary.
  2. Update version in version.php to get the update
  3. See if I can set a mark to a real
  4. Set up a version of m27 and install and test the existing version of BIM
  5. Upgrade to the fixed version of BIM and see if it now passes the test

Done. All seems to be working.

In step #3 discovered that a similar problem exists with the min and max marks in mdl_bim_questions. Need to at least allow the possibility of these being real. So re-do steps #1 and #2. And also make the changes with XML_DB editor so that the upgrade thing won't be required later.

Update Moodle contrib.

Need to replace the moodle contrib version. DONE.