Hi - I'm wondering if I can get any other thoughts on whether this might be a bug that I should submit to the moodle issue tracker. Thank you ahead of time for your thoughts.
The moodle function count_words is counting the HTML markup "&nbps;" as a word, thus the word count is different in MS word and Moodle.
In the online assignment, it will show the student and the instructor a word count. Often instructors might impose word counts on an assignment. Many students will do a copy/paste from word. Unfortunately, this can create "noisy/busy" html in the paste. There can be many "&nbps;" which is white space in an html document. The current moodle word count in 1.9, 2.x count these as words. Generally, there might be 10 or 20 of these, but we've seen up to 1000 (bumping a 500 word document to a 1500 word document).
The fix is easy, just 1 line in moodlelib.php.
$string = preg_replace("/ /"," ",$string);
Thoughts on submitting this as a bug?
Steve