Details
Description
Moodle does not currently perform hankaku/zenkaku (half-width/full-width) text conversion. For example, it's possible for a short answer question (or any other text comparison situation) to expect a response like:
Foobar
and when given a response of
Foobar
even though the answer is technically correct, it'll be flagged as incorrect (as it is not written "correctly").
While it is of course possible to request students answer in a specified format, in practice this has some drawbacks:
- it does not account for mixed-format strings that can often be generated by IME systems, e.g.
CDNサービス (first three characters are half-width)
IT資産管理 (first two characters are half-width) - it catches students out on a technicality
- overly-specific requirements negatively impact end-user impressions of Moodle's robustness - we should be able to handle this!
After some discussion with abgreeve, a potential solution has been identified:
- create an activity-level setting to enable/disable this new functionality
- with the new functionality enabled:
- when comparing strings in quiz and other places, compare strings that've been passed through mb_convert_kana($str, "KVas"); instead of raw strings - don't store these converted strings though, it's just for comparison
Additional discussion of this issue can be found on the Moodle Association of Japan's forum, at http://moodlejapan.org/home/mod/forum/discuss.php?d=882