mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-51000 editor_atto: No autosave for guests
This commit is contained in:
parent
541c5b8552
commit
3f08e9b98a
@ -44,6 +44,14 @@ $PAGE->set_context($context);
|
||||
require_login($course, false, $cm);
|
||||
require_sesskey();
|
||||
|
||||
if (isguestuser()) {
|
||||
print_error('accessdenied', 'admin');
|
||||
}
|
||||
|
||||
if (!in_array('atto', explode(',', get_config('core', 'texteditors')))) {
|
||||
print_error('accessdenied', 'admin');
|
||||
}
|
||||
|
||||
$action = required_param('action', PARAM_ALPHA);
|
||||
|
||||
$response = array();
|
||||
|
@ -166,6 +166,10 @@ class atto_texteditor extends texteditor {
|
||||
}
|
||||
$contentcss = $PAGE->theme->editor_css_url()->out(false);
|
||||
|
||||
// Autosave disabled for guests.
|
||||
if (isguestuser()) {
|
||||
$autosave = false;
|
||||
}
|
||||
// Note <> is a safe separator, because it will not appear in the output of s().
|
||||
$pagehash = sha1($PAGE->url . '<>' . s($this->get_text()));
|
||||
$params = array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user