Permalink
Browse files

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

  • Loading branch information...
dmonllao committed May 22, 2017
2 parents 590292d + b2e76ba commit a5906ac9446c6501b7e6f2a410d641314510bb4d
Showing with 6 additions and 4 deletions.
  1. +6 −4 mod/assign/locallib.php
@@ -4862,17 +4862,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 a5906ac

Please sign in to comment.