Has anyone figured this out yet? I was wondering the same thing! Thank you!
The HTML editor can be controlled in each user's profile.
If you want to turn if off for everyone, the quickest way is probably to edit the contents of the htmleditor column in the the user table directly in the database.
It depends also on version of moodle and role of students - some people can be students on some courses and teachers on other courses so if you disable editor from user's profile or database with setting $USER->htmleditor to 0 it means that this person can not use editor anywhere - or can switch back to use editor by changing that setting from his/her user profile even if it is set to table of database to value 0.
If you add for example to your theme footer just before </body> the following code
<?php
if (!empty($USER->id)) {if ((!empty($COURSE->id)) and (has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $COURSE->id)))) {$USER->htmleditor = 1;} else {$USER->htmleditor = 0;}}
?>
HTMLArea in moodle 1.9.X is visible if the person has capability to manage files on course (usually administrators and teachers), otherwise editor is disabled.
Moodle 2 has a little different settings and editor so code for moodle 2 would probably look different too...
Edit: ... or you could add that previous code for example to standard theme meta.php because most moodle 1.9 themes use standard theme meta.php
Any change someone could rewrite this for moodle 2.4?
Actually, I think this works. I couldn't put it in the extra html area in the admin, I had to add it to the theme, but it appears to work (so far so good!).
thanks!