From 3a5581c1add2e073feebf7b1f2594644a6faa8b0 Mon Sep 17 00:00:00 2001 From: John Okely Date: Thu, 18 Dec 2014 09:52:34 +0800 Subject: [PATCH] MDL-48235 mod_assign: Fix grade of 0 not showing on feedback page in oracle --- mod/assign/locallib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index e96aaedcf7e..6f9f2b64dc7 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -3974,7 +3974,7 @@ class assign { $cangrade = has_capability('mod/assign:grade', $this->get_context()); // If there is a visible grade, show the summary. - if ((!empty($gradebookgrade->grade) || !$emptyplugins) + if ((!is_null($gradebookgrade->grade) || !$emptyplugins) && ($cangrade || !$gradebookgrade->hidden)) { $gradefordisplay = null; @@ -3983,7 +3983,7 @@ class assign { $gradingmanager = get_grading_manager($this->get_context(), 'mod_assign', 'submissions'); // Only show the grade if it is not hidden in gradebook. - if (!empty($gradebookgrade->grade) && ($cangrade || !$gradebookgrade->hidden)) { + if (!is_null($gradebookgrade->grade) && ($cangrade || !$gradebookgrade->hidden)) { if ($controller = $gradingmanager->get_active_controller()) { $menu = make_grades_menu($this->get_instance()->grade); $controller->set_grade_range($menu, $this->get_instance()->grade > 0);