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
ການຈັດອັນດັບສະເລ່ຍ: -