Fix filters for activity settings.
This commit is contained in:
parent
7467fd56b9
commit
3271259e66
|
@ -75,25 +75,20 @@ class plagiarism_pchkorg_config_model {
|
||||||
public function get_filter_for_module($module, $name) {
|
public function get_filter_for_module($module, $name) {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
static $resultmap = array();
|
$configs = $DB->get_records('plagiarism_pchkorg_config', array(
|
||||||
// This will be called only once per module.
|
'cm' => $module,
|
||||||
if (!array_key_exists($module, $resultmap)) {
|
'name' => $name,
|
||||||
$configs = $DB->get_records('plagiarism_pchkorg_config', array(
|
));
|
||||||
'cm' => $module,
|
|
||||||
'name' => $name
|
|
||||||
));
|
|
||||||
|
|
||||||
$value = null;
|
$value = null;
|
||||||
foreach ($configs as $record) {
|
foreach ($configs as $record) {
|
||||||
if ($record->name === $name) {
|
if ($record->name === $name) {
|
||||||
$value = $record->value;
|
$value = $record->value;
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$resultmap[$module] = $value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $resultmap[$module];
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||||
if (!isset($plugin)) {
|
if (!isset($plugin)) {
|
||||||
$plugin = new stdClass();
|
$plugin = new stdClass();
|
||||||
}
|
}
|
||||||
$plugin->version = 2022050517;
|
$plugin->version = 2022050519;
|
||||||
$plugin->requires = 2017051500; // Requires Moodle 3.3 .
|
$plugin->requires = 2017051500; // Requires Moodle 3.3 .
|
||||||
$plugin->release = 'v3.8.4';
|
$plugin->release = 'v3.8.4';
|
||||||
$plugin->maturity = MATURITY_STABLE;
|
$plugin->maturity = MATURITY_STABLE;
|
||||||
|
|
Loading…
Reference in New Issue