mirror of
https://github.com/PlagiarismCheck/moodle-plagiarism_pchkorg.git
synced 2024-12-22 04:10:07 +00:00
Fix plugin when context is null. Version 3.7.5
This commit is contained in:
parent
7f5a888f97
commit
10b4ac6dd3
4
lib.php
4
lib.php
@ -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 '';
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user