mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-30518' of git://github.com/mackensen/moodle
This commit is contained in:
commit
9c6b40c614
@ -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);
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user