Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-27896 editor - parent context will be respected by editor in case…

… context is not created.
  • Loading branch information...
commit 56d57a9a4ecc9655e312d9f16eca2b86256b93c0 1 parent 1449e4f
Rajesh Taneja authored
2  course/edit.php
@@ -82,6 +82,8 @@
82 82 $course = file_prepare_standard_editor($course, 'summary', $editoroptions, $coursecontext, 'course', 'summary', 0);
83 83
84 84 } else {
  85 + //editor should respect category context if course context is not set.
  86 + $editoroptions['context'] = $catcontext;
85 87 $course = file_prepare_standard_editor($course, 'summary', $editoroptions, null, 'course', 'summary', null);
86 88 }
87 89
2  course/editcategory.php
@@ -42,7 +42,7 @@
42 42 $category->parent = $parent;
43 43 require_capability('moodle/category:manage', $context);
44 44 $strtitle = get_string("addnewcategory");
45   - $editorcontext = null;
  45 + $editorcontext = $context;
46 46 $title = "$SITE->shortname: ".get_string('addnewcategory');
47 47 $fullname = $SITE->fullname;
48 48 }
8 user/editadvanced.php
@@ -125,7 +125,13 @@
125 125 } else {
126 126 $usercontext = null;
127 127 // This is a new user, we don't want to add files here
128   - $editoroptions = array('maxfiles'=>0, 'maxbytes'=>0, 'trusttext'=>false, 'forcehttps'=>false);
  128 + $editoroptions = array(
  129 + 'maxfiles'=>0,
  130 + 'maxbytes'=>0,
  131 + 'trusttext'=>false,
  132 + 'forcehttps'=>false,
  133 + 'context' => $coursecontext
  134 + );
129 135 }
130 136
131 137 //create form

0 comments on commit 56d57a9

Please sign in to comment.
Something went wrong with that request. Please try again.