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

Critical fix for 3.9.2

This commit is contained in:
Jane Adelmann 2022-05-31 11:45:18 +03:00
parent 2ca771a686
commit fc5e7039da
No known key found for this signature in database
GPG Key ID: 4CCF39DF30B8AF72
2 changed files with 14 additions and 11 deletions

21
lib.php
View File

@ -66,23 +66,26 @@ function plagiarism_pchkorg_coursemodule_standard_elements($formwrapper, $mform)
$defaultcmid = null;
$cm = optional_param('update', $defaultcmid, PARAM_INT);
$minpercent = $pchkorgconfigmodel->get_system_config('pchkorg_min_percent');
if (!isset($mform->exportValues()['pchkorg_exclude_self_plagiarism'])
|| is_null($mform->exportValues()['pchkorg_exclude_self_plagiarism'])) {
$exportedvalues = $mform->exportValues([]);
if (!is_array($exportedvalues)) {
$exportedvalues = array();
}
if (!isset($exportedvalues['pchkorg_exclude_self_plagiarism'])
|| is_null($exportedvalues['pchkorg_exclude_self_plagiarism'])) {
$mform->setDefault('pchkorg_exclude_self_plagiarism', 1);
}
if (!isset($mform->exportValues()['pchkorg_include_referenced'])
|| is_null($mform->exportValues()['pchkorg_include_referenced'])) {
if (!isset($exportedvalues['pchkorg_include_referenced'])
|| is_null($exportedvalues['pchkorg_include_referenced'])) {
$mform->setDefault('pchkorg_include_referenced', 0);
}
if (!isset($mform->exportValues()['pchkorg_include_citation'])
|| is_null($mform->exportValues()['pchkorg_include_citation'])) {
if (!isset($exportedvalues['pchkorg_include_citation'])
|| is_null($exportedvalues['pchkorg_include_citation'])) {
$mform->setDefault('pchkorg_include_citation', 0);
}
if (null === $cm) {
if (!isset($mform->exportValues()['pchkorg_module_use'])
|| is_null($mform->exportValues()['pchkorg_module_use'])) {
if (!isset($exportedvalues['pchkorg_module_use'])
|| is_null($exportedvalues['pchkorg_module_use'])) {
$mform->setDefault('pchkorg_module_use', '1');
}
} else {

View File

@ -26,9 +26,9 @@ defined('MOODLE_INTERNAL') || die();
if (!isset($plugin)) {
$plugin = new stdClass();
}
$plugin->version = 2022052621;
$plugin->version = 2022053111;
$plugin->requires = 2020061501; // Requires Moodle 3.9 .
$plugin->release = 'v3.9.2';
$plugin->release = 'v3.9.3';
$plugin->component = 'plagiarism_pchkorg';
$plugin->maturity = MATURITY_STABLE;
$plugin->dependencies = array(