1
0
mirror of https://github.com/PlagiarismCheck/moodle-plagiarism_pchkorg.git synced 2024-12-22 04:10:07 +00:00

Fix for search filters

This commit is contained in:
Jane Adelmann 2022-05-05 15:42:41 +03:00
parent e8838f35ed
commit 7467fd56b9
No known key found for this signature in database
GPG Key ID: 4CCF39DF30B8AF72
2 changed files with 13 additions and 7 deletions

16
lib.php
View File

@ -215,7 +215,13 @@ display: inline-block;"
return;
}
$fields = array('pchkorg_module_use', 'pchkorg_min_percent');
$fields = array(
'pchkorg_module_use',
'pchkorg_min_percent',
'pchkorg_include_citation',
'pchkorg_include_referenced',
'pchkorg_exclude_self_plagiarism'
);
$records = $DB->get_records('plagiarism_pchkorg_config', array(
'cm' => $data->coursemodule
@ -647,7 +653,7 @@ display: inline-block;"
// Filter for future search.
$systemminpercent = $pchkorgconfigmodel->get_system_config('pchkorg_min_percent');
// Module filter value has a bigger priority then system config value.
$moduleminpercent = $pchkorgconfigmodel->get_filter_for_module($cm->id, 'source_min_percent');
$moduleminpercent = $pchkorgconfigmodel->get_filter_for_module($cm->id, 'pchkorg_min_percent');
if ($moduleminpercent) {
$minpercent = $moduleminpercent;
} else {
@ -656,15 +662,15 @@ display: inline-block;"
$filters = [
'include_references' => $pchkorgconfigmodel->get_filter_for_module(
$cm->id,
'include_references'
'pchkorg_include_referenced'
),
'include_quotes' => $pchkorgconfigmodel->get_filter_for_module(
$cm->id,
'include_quotes'
'pchkorg_include_citation'
),
'exclude_self_plagiarism' => $pchkorgconfigmodel->get_filter_for_module(
$cm->id,
'exclude_self_plagiarism'
'pchkorg_exclude_self_plagiarism'
),
];
if ($minpercent) {

View File

@ -26,9 +26,9 @@ defined('MOODLE_INTERNAL') || die();
if (!isset($plugin)) {
$plugin = new stdClass();
}
$plugin->version = 2022050420;
$plugin->version = 2022050517;
$plugin->requires = 2017051500; // Requires Moodle 3.3 .
$plugin->release = 'v3.8.3';
$plugin->release = 'v3.8.4';
$plugin->maturity = MATURITY_STABLE;
$plugin->component = 'plagiarism_pchkorg';
$plugin->dependencies = array(