Permalink
Browse files

MDL-30518 get_context_instance takes one parameter at the SYSTEM level

  • Loading branch information...
1 parent 1de9151 commit 59c1a98c05eedc1a92ef5e6d60fe7d36536f8a3e @mackensen mackensen committed Nov 30, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 tag/coursetags_edit.php
  2. +1 −1 user/profile/field/checkbox/field.class.php
@@ -41,7 +41,7 @@
}
// Permissions
-$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
+$sitecontext = get_context_instance(CONTEXT_SYSTEM);
require_login($course->id);
$canedit = has_capability('moodle/tag:create', $sitecontext);
@@ -29,7 +29,7 @@ function edit_field_add(&$mform) {
$checkbox->setChecked(true);
}
$mform->setType($this->inputname, PARAM_BOOL);
- if ($this->is_required() and !has_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
+ if ($this->is_required() and !has_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM))) {
$mform->addRule($this->inputname, get_string('required'), 'nonzero', null, 'client');
}
}

0 comments on commit 59c1a98

Please sign in to comment.