MDL-51693 mod/assign: Added plagiarism links to full text

This commit is contained in:
jinhofer 2015-10-07 13:14:52 -05:00
parent c18acb8997
commit acf9e30086

View File

@ -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;
}
/**