From ded8ea8fd10f1ed975cf6ad5164ffa4fcc44472c Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Fri, 19 Sep 2014 15:19:57 +0800 Subject: [PATCH] MDL-46824 core_grades: Only display 'Drop n lowest' when supported Part of: MDL-46576 --- lib/grade/grade_category.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/grade/grade_category.php b/lib/grade/grade_category.php index b5be55b6314..dfe9287f782 100644 --- a/lib/grade/grade_category.php +++ b/lib/grade/grade_category.php @@ -1805,10 +1805,10 @@ class grade_category extends grade_object { $aggrstrings = grade_helper::get_aggregation_strings(); $allhelp[] = $aggrstrings[$this->aggregation]; - if ($this->droplow) { + if ($this->droplow && $this->can_apply_limit_rules()) { $allhelp[] = get_string('droplowestvalues', 'grades', $this->droplow); } - if ($this->keephigh) { + if ($this->keephigh && $this->can_apply_limit_rules()) { $allhelp[] = get_string('keephighestvalues', 'grades', $this->keephigh); } if (!$this->aggregateonlygraded) {