From 59c1a98c05eedc1a92ef5e6d60fe7d36536f8a3e Mon Sep 17 00:00:00 2001 From: Charles Fulton Date: Wed, 30 Nov 2011 05:47:50 -0800 Subject: [PATCH] MDL-30518 get_context_instance takes one parameter at the SYSTEM level --- tag/coursetags_edit.php | 2 +- user/profile/field/checkbox/field.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tag/coursetags_edit.php b/tag/coursetags_edit.php index be710fe1e56..18d40a45da8 100644 --- a/tag/coursetags_edit.php +++ b/tag/coursetags_edit.php @@ -41,7 +41,7 @@ if ($courseid != SITEID) { } // 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); diff --git a/user/profile/field/checkbox/field.class.php b/user/profile/field/checkbox/field.class.php index 75c955d54ed..29aaf3dd9b4 100644 --- a/user/profile/field/checkbox/field.class.php +++ b/user/profile/field/checkbox/field.class.php @@ -29,7 +29,7 @@ class profile_field_checkbox extends profile_field_base { $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'); } }