mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
Merge branch 'MDL-51706_master' of https://github.com/jinhofer/moodle
This commit is contained in:
commit
b7f54e5c79
@ -367,9 +367,9 @@ class assign_submission_onlinetext extends assign_submission_plugin {
|
||||
if ($text != $shorttext) {
|
||||
$wordcount = get_string('numwords', 'assignsubmission_onlinetext', count_words($text));
|
||||
|
||||
return $shorttext . $plagiarismlinks . $wordcount;
|
||||
return $plagiarismlinks . $wordcount . $shorttext;
|
||||
} else {
|
||||
return $shorttext . $plagiarismlinks;
|
||||
return $plagiarismlinks . $shorttext;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
@ -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 $plagiarismlinks . $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user