mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 12:34:28 +01:00
Merge branch 'master_MDL-31360' of git://github.com/danmarsden/moodle
This commit is contained in:
commit
b0ce209054
@ -6380,6 +6380,7 @@ class context_module extends context {
|
||||
}
|
||||
|
||||
$modfile = "$CFG->dirroot/mod/$module->name/lib.php";
|
||||
$extracaps = array();
|
||||
if (file_exists($modfile)) {
|
||||
include_once($modfile);
|
||||
$modfunction = $module->name.'_get_extra_capabilities';
|
||||
@ -6387,16 +6388,14 @@ class context_module extends context {
|
||||
$extracaps = $modfunction();
|
||||
}
|
||||
}
|
||||
if (empty($extracaps)) {
|
||||
$extracaps = array();
|
||||
}
|
||||
|
||||
$extracaps = array_merge($subcaps, $extracaps);
|
||||
|
||||
$extra = '';
|
||||
list($extra, $params) = $DB->get_in_or_equal(
|
||||
$extracaps, SQL_PARAMS_NAMED, 'cap0');
|
||||
$extra = "OR name $extra";
|
||||
|
||||
$extracaps, SQL_PARAMS_NAMED, 'cap0', true, '');
|
||||
if (!empty($extra)) {
|
||||
$extra = "OR name $extra";
|
||||
}
|
||||
$sql = "SELECT *
|
||||
FROM {capabilities}
|
||||
WHERE (contextlevel = ".CONTEXT_MODULE."
|
||||
|
Loading…
x
Reference in New Issue
Block a user