Fix plugin when context is null. Version 3.7.5

This commit is contained in:
Jane Adelmann 2021-10-01 14:12:47 +03:00
parent 7f5a888f97
commit 10b4ac6dd3
No known key found for this signature in database
GPG Key ID: 4CCF39DF30B8AF72
2 changed files with 6 additions and 2 deletions

View File

@ -77,6 +77,10 @@ class plagiarism_plugin_pchkorg extends plagiarism_plugin {
$context = context_module::instance($cmid);// Get context of course.
}
if (empty($context)) {
return '';
}
$canview = has_capability(capability::VIEW_SIMILARITY, $context);
if (!$canview) {
return '';

View File

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