I don't think that is necessary.
Joseph Rézeau
Joseph Rézeau による投稿
Moodle in English -> Lesson -> Bug in Text. -> Re: Bug in Text.
I expect Yvette is right in her interpretation of the error message. Here is some more info about the problem at hand.
1.- It appears that the chunk of text copied from the Wikipedia article (Flesh-Kincaid readability test) is formatted as utf-8. This is not immediately obvious, but there are two utf-8 characters in the last paragraph, the minus signs in "The lowest grade level score in theory is −3.40,..." and "... with a grade level of −1.3." This, by the way, explains why - as mentioned in your screencast - when you remove that last paragraph your question text saves OK in the Lesson! And I was wrong in blaming the Latex bit in the Wikipedia text.
2.- Further to Yvette's remark I conducted the following experiment.
a. As reported in my previous messages, on my local Moodle 2.0 site I do not have the error you mention and I can save my question including the Wikipedia text as a Lesson question text.
b. This is what I did to replicate your problem, on my local Moodle 2.0 test site. My local site is set to utf-8, as required by Moodle. I changed the mdl_lesson_pages table from utf8_general_ci to latin1_general_ci.
c. Then I edited my Lesson question page contents by pasting the last paragraph from the Wikipedia text:
The lowest grade level score in theory is −3.40, but there are few real passages where every sentence consists of a single one-syllable word. Green Eggs and Ham by Dr. Seuss comes close, averaging 5.7 words per sentence and 1.02 syllables per word, with a grade level of −1.3. (Most of the 50 used words are monosyllabic; "anywhere", which occurs 8 times, is the only exception.)
And saved. Got the error message (similar to the one you get):
Error writing to database
More information about this error
Debug info: Incorrect string value: '\xE2\x88\x923.4...' for column 'contents' at row 1
UPDATE mdl_lesson_pages SET qtype = ?,title = ?,lessonid = ?,qoption = ?,contents = ?,contentsformat = ? WHERE id=?
[array (
0 => '3',
1 => 'Flesch–Kincaid Scale',
2 => '1',
3 => '0',
4 => '<p>The lowest grade level score in theory is −3.40, but there are few real passages where every sentence consists of a single one-syllable word. Green Eggs and Ham by Dr. Seuss comes close, averaging 5.7 words per sentence and 1.02 syllables per word, with a grade level of −1.3. (Most of the 50 used words are monosyllabic; "anywhere", which occurs 8 times, is the only exception.)</p>',
5 => '1',
6 => '1',
)]
Stack trace:
line 394 of \lib\dml\moodle_database.php: dml_write_exception thrown
line 980 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1012 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
line 2133 of \mod\lesson\locallib.php: call to mysqli_native_moodle_database->update_record()
line 119 of \mod\lesson\editpage.php: call to lesson_page->update()
Note.- "Incorrect string value: '\xE2\x88\x92" refers to the Unicode value of the "minus" sign used in the Wikipedia article. See UTF-8 encoding table and Unicode characters, page with code points U+2200 to U+227F.
d. Then, I reset my mdl_lesson_pages table back to utf8_general_ci and re-edited the question text, and saved it without any problem, as before the coding switch experiment.
3.- From this little experiment it seems likely to me that your moodle site's database is not set to Collation = utf8_general_ci. Or the mdl_lesson_pages table is not set to Collation = utf8_general_ci (which would be surprising, but...).
I know you have double-checked, but you might like to treble-check (& maybe post a screenshot).
4.- Have you tried the little experiment I suggested in my post dated Monday, 18 April 2011, 11:43 PM:
Try creating a simple "Page" (from the Add a resource menu) in your moodle course, and paste that Wikipedia chunk of text and see what happens.
5.- Is your current Moodle 2.0 site a brand new installation or an upgrade from a previous 1.9 version site?
ATB
Joseph
Moodle in English -> Lesson -> Bug in Text. -> Re: Bug in Text.
"unused answers" in a matching question? Could you provide an example, please, Adriane. I'd always thought that if some of the matches are left unanswered by the student, then the maximum score is not allocated...