Commit d2ff5a09 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review

Merge "Making sure user is logged in before they can see the tinymce"

parents 6e80232e 962c9c48
......@@ -3891,8 +3891,10 @@ function mahara_log($logname, $string) {
function is_html_editor_enabled () {
global $USER, $SESSION;
return ((!get_config('wysiwyg') && $USER->get_account_preference('wysiwyg')) ||
get_config('wysiwyg') == 'enable') && $SESSION->get('handheld_device') == false;
return (
(!get_config('wysiwyg') && $USER->get_account_preference('wysiwyg')) ||
(get_config('wysiwyg') == 'enable' && $USER->is_logged_in())
) && $SESSION->get('handheld_device') == false;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment