Error writing to database

Error writing to database

- Ubongabasi Inyang の投稿
返信数: 6

I get the error message below when adding a question with either a quote (") or apostrophe (') in the test. Running Moodle 2 and my db is utf8

 

Error writing to database

More information about this error

Ubongabasi Inyang への返信

Re: Error writing to database

- Joseph Rézeau の投稿
画像 Core developers 画像 Particularly helpful Moodlers 画像 Plugin developers 画像 Testers 画像 Translators

You say "the test". Are you sure you are talking about the Moodle's Lesson activity or the Quiz activity? There is no activity called "Test" in moodle.

Which version of Moodle are you using?

Please post here the complete question text and responses that cause this problem.

Joseph

Joseph Rézeau への返信

Re: Error writing to database

- Ubongabasi Inyang の投稿

Hi Joseph,

It is text not test, sorry. Below is an example of a text that will give and error.  It occurs both in the Moodle Lesson and Quiz activity

Example

team’s operating effectiveness  or "what is right".

Thanks,

Ubongabasi

Ubongabasi Inyang への返信

Re: Error writing to database

- Joseph Rézeau の投稿
画像 Core developers 画像 Particularly helpful Moodlers 画像 Plugin developers 画像 Testers 画像 Translators

Hi Ubongabasi,

We need further information. Which version of Moodle are you using?

Which type of question are you using (multiple choice, shortanswer etc.).

Please give us the complete Question type, question text, expected answers, etc.

I hope none of your text is copy-pasted from a Word Processor (Word, etc) into Moodle' HTML editor but typed directly?

Joseph

Joseph Rézeau への返信

Re: Error writing to database

- Chris Collman の投稿
画像 Documentation writers

Hi Ubongabasi,

I just pasted the example text into demo.moodle.net in a new lesson I created. It seemed to work.

Since this is an issue for you in both Lesson and Quiz, I suspect this is a webserver or Moodle site problem.  I wonder if the same thing happens when you try to add an HTML block with this code?

Please paste the info about version that can be found under "notifications".

Another suggestion is to turn up the level of debug on the site and try it again.  You might see some error messages that are more helpful in figuring out what is going on with your site.

Chris

Chris Collman への返信

Re: Error writing to database

- Ubongabasi Inyang の投稿

I have resolve it.  I had to convert my database to utf8 and it is no longer giving the error.

 

Thanks Joseph and Chris,

 

Ubongabasi

Ubongabasi Inyang への返信

Re: Error writing to database

- Mauricio Salles の投稿
Hi there, I get this same error when trying to customize language ("Error writing to database"). Ubongabasi, how to convert the database to utf8? regards