mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
Merge branch 'MDL-57957' of https://github.com/bostelm/moodle
This commit is contained in:
commit
a5906ac944
@ -4862,17 +4862,19 @@ class assign {
|
||||
}
|
||||
|
||||
$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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user