From 6189c7b4d34f8c2ac40ab2d6cd18626ffde662d6 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Mon, 14 May 2012 13:27:06 +0800 Subject: [PATCH] MDL-32978 Gradebook: Fix strict standards notices --- grade/export/txt/grade_export_txt.php | 5 ----- grade/lib.php | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/grade/export/txt/grade_export_txt.php b/grade/export/txt/grade_export_txt.php index 6ca697ad607..0be958983c2 100644 --- a/grade/export/txt/grade_export_txt.php +++ b/grade/export/txt/grade_export_txt.php @@ -23,11 +23,6 @@ class grade_export_txt extends grade_export { public $separator; // default separator - public function grade_export_txt($course, $groupid=0, $itemlist='', $export_feedback=false, $updatedgradesonly = false, $displaytype = GRADE_DISPLAY_TYPE_REAL, $decimalpoints = 2, $separator='comma', $onlyactive = false) { - $this->grade_export($course, $groupid, $itemlist, $export_feedback, $updatedgradesonly, $displaytype, $decimalpoints, $onlyactive); - $this->separator = $separator; - } - public function __construct($course, $groupid=0, $itemlist='', $export_feedback=false, $updatedgradesonly = false, $displaytype = GRADE_DISPLAY_TYPE_REAL, $decimalpoints = 2, $separator = 'comma', $onlyactive = false) { parent::__construct($course, $groupid, $itemlist, $export_feedback, $updatedgradesonly, $displaytype, $decimalpoints, $onlyactive); $this->separator = $separator; diff --git a/grade/lib.php b/grade/lib.php index 7173c8930ad..185fed52039 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -218,6 +218,9 @@ class graded_users_iterator { if (!empty($this->grade_items)) { foreach ($this->grade_items as $grade_item) { + if (!isset($feedbacks[$grade_item->id])) { + $feedbacks[$grade_item->id] = new stdClass(); + } if (array_key_exists($grade_item->id, $grade_records)) { $feedbacks[$grade_item->id]->feedback = $grade_records[$grade_item->id]->feedback; $feedbacks[$grade_item->id]->feedbackformat = $grade_records[$grade_item->id]->feedbackformat;