mirror of
https://github.com/PlagiarismCheck/moodle-plagiarism_pchkorg.git
synced 2024-12-22 12:10:08 +00:00
Fix for search filters
This commit is contained in:
parent
e8838f35ed
commit
7467fd56b9
16
lib.php
16
lib.php
@ -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) {
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user