MDL-35437: mod_assign: Stop Moodle from giving out a notice when grading worksheets with missing columns are uploaded via 'Upload grading worksheet' option in the drop-down menu

This commit is contained in:
Raymond Wijaya 2012-09-19 16:38:42 +08:00
parent 412d7c7b65
commit 49b6109666

View File

@ -160,8 +160,10 @@ class assignfeedback_offline_grade_importer {
$result->user = $this->validusers[$userid];
$result->feedback = array();
foreach ($this->feedbackcolumnindexes as $description => $details) {
$details['value'] = $record[$details['index']];
$result->feedback[] = $details;
if (!empty($details['index'])) {
$details['value'] = $record[$details['index']];
$result->feedback[] = $details;
}
}
return $result;