I have just installed and been running Moodle 2.3.1+ (Build: 20120726), and trying to update some of the content in courses, specifically Scorm objects and Quiz objects. Uploading them and adding them to start with is fine, but any changes after the first save resulted in a less than helpful, pale yellow box on the screen saying 'Database Connection Failed'.
Doing some research into this turned up next to nothing - is your MySQL DB overloaded... are there write errors on your server. No, all that is fine...
Turn on debugging (Site Administration/development/debugging) and make sure you show the developer level debug. Get this written to a server log if you can, but if not, check the first box under the drop down at the top of that settings page and have the error written to the page instead of to a log file (this *will* stop other things from working, be prepared!)
I then tried the Quiz update process again, and this time, I got the following on screen:
"Debug info: Column 'completionexpected' cannot be null
UPDATE mdl_course_modules SET course = ?,module = ?,instance = ?,section = ?,idnumber = ?,added = ?,score = ?,indent = ?,visible = ?,visibleold = ?,groupmode = ?,groupingid = ?,groupmembersonly = ?,completion = ?,completiongradeitemnumber = ?,completionview = ?,completionexpected = ?,availablefrom = ?,availableuntil = ?,showavailability = ?,showdescription = ? WHERE id=?"
plus the usual array information to fill in all those questionmarks.
The interesting bit is right at the start - completionexpected cannot be NULL... this means a table in the database has a row that must have data written to it. In my case, it turned out to be the mdl_course_modules table (as you can see fromt the start of the SQL query), and the row 'completionexpected' was set to prevent 'null' returns written to it.
Using a MySQL client, I logged in to the database, found the table and displayed the structure. Sure enough, the row was not allowing 'Null', so ticked the checkbox allow it and tried the Quiz update again. This time, it worked - as did the Scorm update.
My guess is either I've completely destroyed the logic behind the update process by doing this, or in this version of Moodle, that particular row in that specific table needs to be set to allow NULL to start with!
Oh - if you turn on the debugging and cannot get back to the page display in your browser because of the other information now on the page, go back into the database, look for the table called 'mdl_config' and look for the rows called debugdisplay and debugpageinfo and set them to '0'... then reload your browser display and it should all re-appear. You can then go back in to site admin/developer/debugging and turn off the developer information.
Hope this helps someone! Alternatively, if I've done something completely wrong, I hope someone lets me know!