mirror of
https://github.com/PlagiarismCheck/moodle-plagiarism_pchkorg.git
synced 2024-12-22 12:10:08 +00:00
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) {
|
||||
global $DB;
|
||||
|
||||
static $resultmap = array();
|
||||
// This will be called only once per module.
|
||||
if (!array_key_exists($module, $resultmap)) {
|
||||
$configs = $DB->get_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => $module,
|
||||
'name' => $name
|
||||
));
|
||||
$configs = $DB->get_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => $module,
|
||||
'name' => $name,
|
||||
));
|
||||
|
||||
$value = null;
|
||||
foreach ($configs as $record) {
|
||||
if ($record->name === $name) {
|
||||
$value = $record->value;
|
||||
}
|
||||
$value = null;
|
||||
foreach ($configs as $record) {
|
||||
if ($record->name === $name) {
|
||||
$value = $record->value;
|
||||
break;
|
||||
}
|
||||
|
||||
$resultmap[$module] = $value;
|
||||
}
|
||||
|
||||
return $resultmap[$module];
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||
if (!isset($plugin)) {
|
||||
$plugin = new stdClass();
|
||||
}
|
||||
$plugin->version = 2022050517;
|
||||
$plugin->version = 2022050519;
|
||||
$plugin->requires = 2017051500; // Requires Moodle 3.3 .
|
||||
$plugin->release = 'v3.8.4';
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
Loading…
Reference in New Issue
Block a user