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

Check group access before file status

This commit is contained in:
Jane Adelmann 2019-01-30 17:36:04 +02:00
parent 82bbc85fd6
commit 7dfcf3831f
No known key found for this signature in database
GPG Key ID: 4CCF39DF30B8AF72
2 changed files with 5 additions and 4 deletions

View File

@ -55,6 +55,10 @@ class plagiarism_plugin_pchkorg extends plagiarism_plugin {
return '';
}
if (!$apiprovider->is_group_member($USER->email)) {
return '';
}
$where = new \stdClass();
$where->cm = $cmid;
$where->fileid = $file->get_id();
@ -66,9 +70,6 @@ class plagiarism_plugin_pchkorg extends plagiarism_plugin {
if ($filerecord) {
$label = sprintf('%.2f', $filerecord->score) . '%';
} else {
if (!$apiprovider->is_group_member($USER->email)) {
return '';
}
$label = get_string('pchkorg_check_for_plagiarism', 'plagiarism_pchkorg');
}

View File

@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die();
if (!isset($plugin)) {
$plugin = new stdClass();
}
$plugin->version = 2019013001;
$plugin->version = 2019013002;
$plugin->requires = 2017051501; // Requires Moodle 3.3 .
$plugin->release = 'v2.0';
$plugin->maturity = MATURITY_STABLE;