Error writing to database

Error writing to database

Bởi Ubongabasi Inyang -
Số lượng các câu trả lời: 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

Trung bình điểm đánh giá: -
Để phản hồi tới Ubongabasi Inyang

Re: Error writing to database

Bởi Joseph Rézeau -
Hình của Core developers Hình của Particularly helpful Moodlers Hình của Plugin developers Hình của Testers Hình của 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

Để phản hồi tới Joseph Rézeau

Re: Error writing to database

Bởi 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

Để phản hồi tới Ubongabasi Inyang

Re: Error writing to database

Bởi Joseph Rézeau -
Hình của Core developers Hình của Particularly helpful Moodlers Hình của Plugin developers Hình của Testers Hình của 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

Để phản hồi tới Joseph Rézeau

Re: Error writing to database

Bởi Chris Collman -
Hình của 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

Để phản hồi tới Chris Collman

Re: Error writing to database

Bởi 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

Để phản hồi tới Ubongabasi Inyang

Re: Error writing to database

Bởi 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