mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 00:20:37 +01:00
Merge branch 'MDL-70261-master' of git://github.com/ilya-catalyst/moodle
This commit is contained in:
commit
9c83fc0399
@ -102,8 +102,13 @@ class course_handler extends \core_customfield\handler {
|
||||
has_capability('moodle/course:changelockedcustomfields', $context));
|
||||
} else {
|
||||
$context = $this->get_parent_context();
|
||||
return (!$field->get_configdata_property('locked') ||
|
||||
guess_if_creator_will_have_course_capability('moodle/course:changelockedcustomfields', $context));
|
||||
if ($context->contextlevel == CONTEXT_SYSTEM) {
|
||||
return (!$field->get_configdata_property('locked') ||
|
||||
has_capability('moodle/course:changelockedcustomfields', $context));
|
||||
} else {
|
||||
return (!$field->get_configdata_property('locked') ||
|
||||
guess_if_creator_will_have_course_capability('moodle/course:changelockedcustomfields', $context));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user