Permalink
Browse files

Merge branch 'MDL-57957_32' of https://github.com/bostelm/moodle into…

… MOODLE_32_STABLE
  • Loading branch information...
dmonllao committed May 22, 2017
2 parents 46280f7 + c6bbd48 commit f98e259ddbd448595b2565cc5135617af237ac29
Showing with 6 additions and 4 deletions.
  1. +6 −4 mod/assign/locallib.php
@@ -4794,17 +4794,19 @@ public function get_assign_feedback_status_renderable($user) {
}
$cangrade = has_capability('mod/assign:grade', $this->get_context());
$hasgrade = $this->get_instance()->grade != GRADE_TYPE_NONE &&
!is_null($gradebookgrade) && !is_null($gradebookgrade->grade);
$gradevisible = $cangrade || $this->get_instance()->grade == GRADE_TYPE_NONE ||
(!is_null($gradebookgrade) && !$gradebookgrade->hidden);
// If there is a visible grade, show the summary.
if (!is_null($gradebookgrade) && (!is_null($gradebookgrade->grade) || !$emptyplugins)
&& ($cangrade || !$gradebookgrade->hidden)) {
if (($hasgrade || !$emptyplugins) && $gradevisible) {
$gradefordisplay = null;
$gradeddate = null;
$grader = null;
$gradingmanager = get_grading_manager($this->get_context(), 'mod_assign', 'submissions');
// Only show the grade if it is not hidden in gradebook.
if (!is_null($gradebookgrade->grade) && ($cangrade || !$gradebookgrade->hidden)) {
if ($hasgrade) {
if ($controller = $gradingmanager->get_active_controller()) {
$menu = make_grades_menu($this->get_instance()->grade);
$controller->set_grade_range($menu, $this->get_instance()->grade > 0);

0 comments on commit f98e259

Please sign in to comment.