mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-40626 gradebook: Prevent incorrect override with multiline feedback
The quick grading option doesn't allow mutliline editing.
This commit is contained in:
parent
ffc3f5308b
commit
986c833743
@ -226,6 +226,10 @@ class grade_report_grader extends grade_report {
|
||||
$changedgrades = true;
|
||||
|
||||
} else if ($datatype === 'feedback') {
|
||||
// If quick grading is on, feedback needs to be compared without line breaks.
|
||||
if ($this->get_pref('quickgrading')) {
|
||||
$oldvalue->feedback = preg_replace("/\r\n|\r|\n/", "", $oldvalue->feedback);
|
||||
}
|
||||
if (($oldvalue->feedback === $postedvalue) or ($oldvalue->feedback === NULL and empty($postedvalue))) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user