From fbb70b4717ec485bbb2bebfefd5310ac397d079c Mon Sep 17 00:00:00 2001 From: Eric Merrill Date: Tue, 7 Aug 2012 10:19:08 -0400 Subject: [PATCH] MDL-34543 mod_assign Fixing problem where previous feedback does not populate when you re-enter the grading view. add_plugin_grade_elements() was expecting grade object, but was being given grade string. --- mod/assign/locallib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index b792249ebe1..94d18719593 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -2983,13 +2983,13 @@ class assign { } if (has_all_capabilities(array('gradereport/grader:view', 'moodle/grade:viewall'), $this->get_course_context())) { - $grade = $this->output->action_link(new moodle_url('/grade/report/grader/index.php', + $gradestring = $this->output->action_link(new moodle_url('/grade/report/grader/index.php', array('id'=>$this->get_course()->id)), $gradinginfo->items[0]->grades[$userid]->str_grade); } else { - $grade = $gradinginfo->items[0]->grades[$userid]->str_grade; + $gradestring = $gradinginfo->items[0]->grades[$userid]->str_grade; } - $mform->addElement('static', 'finalgrade', get_string('currentgrade', 'assign').':' ,$grade); + $mform->addElement('static', 'finalgrade', get_string('currentgrade', 'assign').':', $gradestring); $mform->addElement('static', 'progress', '', get_string('gradingstudentprogress', 'assign', array('index'=>$rownum+1, 'count'=>count($useridlist))));