Merge branch 'MDL-48235-28-fixes' of git://github.com/xow/moodle into MOODLE_28_STABLE

This commit is contained in:
David Monllao
2014-12-18 12:37:01 +08:00
+2 -2
View File
@@ -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);