turn off WYSIWYG editor for students?

turn off WYSIWYG editor for students?

by Lary Stucker -
Number of replies: 5
Can you tun off the HTML ditor for students and only give them the option to enter in plain text? I have multiple essays in a quiz and I don't want my students being confussed by all of the HTML editor options.

-Lary
Average of ratings: -
In reply to Lary Stucker

Re: turn off WYSIWYG editor for students?

by Michael Vollmer -

Has anyone figured this out yet?  I was wondering the same thing!  Thank you!

In reply to Michael Vollmer

Re: turn off WYSIWYG editor for students?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

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.

In reply to Michael Vollmer

Re: turn off WYSIWYG editor for students?

by Mauno Korpelainen -

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

In reply to Mauno Korpelainen

Re: turn off WYSIWYG editor for students?

by Brian Peat -

Any change someone could rewrite this for moodle 2.4?

In reply to Brian Peat

Re: turn off WYSIWYG editor for students?

by Brian Peat -

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!