mirror of
https://github.com/PlagiarismCheck/moodle-plagiarism_pchkorg.git
synced 2024-12-22 04:10:07 +00:00
Fix deprecation notice. Version 3.15.5
This commit is contained in:
parent
e1000d9384
commit
c1db1f2fc7
@ -88,5 +88,23 @@ function xmldb_plagiarism_pchkorg_upgrade($oldversion) {
|
|||||||
upgrade_plugin_savepoint(true, 2024072918, 'plagiarism', 'pchkorg');
|
upgrade_plugin_savepoint(true, 2024072918, 'plagiarism', 'pchkorg');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($oldversion < 2024102818) {
|
||||||
|
$configs = get_config('plagiarism');
|
||||||
|
|
||||||
|
foreach ($configs as $field => $value) {
|
||||||
|
if (strpos($field, 'pchkorg') === 0) {
|
||||||
|
if ($field === 'pchkorg_use') {
|
||||||
|
$DB->delete_records('config_plugins', ['name' => $field, 'plugin' => 'plagiarism']);
|
||||||
|
|
||||||
|
$field = 'enabled';
|
||||||
|
}
|
||||||
|
|
||||||
|
set_config($field, $value, 'plagiarism_pchkorg');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
upgrade_plugin_savepoint(true, 2024102818, 'plagiarism', 'pchkorg');
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ if (($data = $mform->get_data()) && confirm_sesskey()) {
|
|||||||
foreach ($data as $field => $value) {
|
foreach ($data as $field => $value) {
|
||||||
if (strpos($field, 'pchkorg') === 0) {
|
if (strpos($field, 'pchkorg') === 0) {
|
||||||
if ('pchkorg_use' === $field) {
|
if ('pchkorg_use' === $field) {
|
||||||
set_config('enabled', $value, 'plagiarism_pchkorg');
|
$field = 'enabled';
|
||||||
}
|
}
|
||||||
set_config($field, $value, 'plagiarism_pchkorg');
|
set_config($field, $value, 'plagiarism_pchkorg');
|
||||||
$pchkorgconfigmodel->set_system_config($field, $value);
|
$pchkorgconfigmodel->set_system_config($field, $value);
|
||||||
|
@ -26,9 +26,9 @@ defined('MOODLE_INTERNAL') || die();
|
|||||||
if (!isset($plugin)) {
|
if (!isset($plugin)) {
|
||||||
$plugin = new stdClass();
|
$plugin = new stdClass();
|
||||||
}
|
}
|
||||||
$plugin->version = 2024102817;
|
$plugin->version = 2024102818;
|
||||||
$plugin->requires = 2020061501; // Requires Moodle 3.9 .
|
$plugin->requires = 2020061501; // Requires Moodle 3.9 .
|
||||||
$plugin->release = 'v3.15.4';
|
$plugin->release = 'v3.15.5';
|
||||||
$plugin->component = 'plagiarism_pchkorg';
|
$plugin->component = 'plagiarism_pchkorg';
|
||||||
$plugin->maturity = MATURITY_STABLE;
|
$plugin->maturity = MATURITY_STABLE;
|
||||||
$plugin->dependencies = array(
|
$plugin->dependencies = array(
|
||||||
|
Loading…
Reference in New Issue
Block a user