Skip to content

Commit

Permalink
MDL-55425 user: allow to update another user editor pref
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Aug 5, 2016
1 parent e7c8da0 commit 6ed74fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion user/editor.php
Expand Up @@ -36,7 +36,7 @@
list($user, $course) = useredit_setup_preference_page($userid, $courseid);

// Create form.
$editorform = new user_edit_editor_form(null, array('userid' => $user->id));
$editorform = new user_edit_editor_form();

$user->preference_htmleditor = get_user_preferences( 'htmleditor', '', $user->id);
$editorform->set_data($user);
Expand Down
4 changes: 4 additions & 0 deletions user/editor_form.php
Expand Up @@ -45,6 +45,10 @@ public function definition () {
$mform = $this->_form;

$editors = editors_get_enabled();

$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);

if (count($editors) > 1) {
$choices = array('' => get_string('defaulteditor'));
$firsteditor = '';
Expand Down

0 comments on commit 6ed74fa

Please sign in to comment.