From c74ccbcbaa372aa5569a5c6ee7bbb24c6954ad3e Mon Sep 17 00:00:00 2001 From: Jwalit Shah Date: Fri, 13 Dec 2019 15:01:03 +1100 Subject: [PATCH] MDL-66200 gradebook: check selected feedback option when importing data --- grade/import/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grade/import/lib.php b/grade/import/lib.php index 655c54bb50cb1..b5d7b37d7e865 100644 --- a/grade/import/lib.php +++ b/grade/import/lib.php @@ -112,7 +112,7 @@ function grade_import_commit($courseid, $importcode, $importfeedback=true, $verb // make the grades array for update_grade foreach ($grades as $grade) { - if (!$importfeedback) { + if (!$importfeedback || $grade->feedback === null) { $grade->feedback = false; // ignore it } if ($grade->importonlyfeedback) {