-
Bug
-
Resolution: Fixed
-
Minor
-
3.8.3, 3.10.4, 3.11, 4.0
-
MySQL, PostgreSQL
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_38_STABLE, MOODLE_400_STABLE
-
MOODLE_311_STABLE
-
MDL-69078-better-error-message-for-wrong-encoding -
If someone uploads a question file in GIFT format with a non-UTF-8 encoding (eg. windows-1252) it fails ungracefully with "error writing to database" giving the user no idea what is actually wrong.
I suggest to test the encoding of the file if it's valid UTF-8 or not prior to importing and giving hints to the user what needs to be corrected.
The debug output is more helpful, but debug output is not enabled in production and therefore not visible to the average user.
FULL STEPS:
- open question import (/question/import.php)
- select "GIFT format" as file format
- upload GIFT file with windows-1252 encoding
- click "Import"
WHAT WAS EXPECTED
- error message with hint "wrong encoding"
WHAT ACTUALLY HAPPENS
- Error writing to database
- has been marked as being related by
-
MDL-74041 Question bank view - page size should be 100
- Closed