mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-51693 mod/assign: Added plagiarism links to full text
This commit is contained in:
parent
c18acb8997
commit
acf9e30086
@ -423,6 +423,7 @@ class assign_submission_onlinetext extends assign_submission_plugin {
|
||||
* @return string
|
||||
*/
|
||||
public function view(stdClass $submission) {
|
||||
global $CFG;
|
||||
$result = '';
|
||||
|
||||
$onlinetextsubmission = $this->get_onlinetext_submission($submission->id);
|
||||
@ -436,9 +437,20 @@ class assign_submission_onlinetext extends assign_submission_plugin {
|
||||
'onlinetext',
|
||||
'assignsubmission_onlinetext');
|
||||
|
||||
$plagiarismlinks = '';
|
||||
|
||||
if (!empty($CFG->enableplagiarism)) {
|
||||
require_once($CFG->libdir . '/plagiarismlib.php');
|
||||
|
||||
$plagiarismlinks .= plagiarism_get_links(array('userid' => $submission->userid,
|
||||
'content' => trim($result),
|
||||
'cmid' => $this->assignment->get_course_module()->id,
|
||||
'course' => $this->assignment->get_course()->id,
|
||||
'assignment' => $submission->assignment));
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
return $result . $plagiarismlinks;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user