From 7467fd56b96d586c2ea99f1ee211813b0ee932da Mon Sep 17 00:00:00 2001 From: Jane Adelmann Date: Thu, 5 May 2022 15:42:41 +0300 Subject: [PATCH] Fix for search filters --- lib.php | 16 +++++++++++----- version.php | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib.php b/lib.php index b448dbb..1156527 100644 --- a/lib.php +++ b/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) { diff --git a/version.php b/version.php index 8c3f3a7..ea9fc16 100644 --- a/version.php +++ b/version.php @@ -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(