MDL-46824 core_grades: Only display 'Drop n lowest' when supported

Part of: MDL-46576
This commit is contained in:
Frederic Massart 2014-09-19 15:19:57 +08:00 committed by Adrian Greeve
parent 6dab372c89
commit ded8ea8fd1

View File

@ -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) {