Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-36761_loop_22' of git://github.com/andyjdavis/moodl…

…e into MOODLE_22_STABLE
  • Loading branch information...
commit 4d0eabf19eacb39294be0a035b93c08458676136 2 parents 9980628 + 26bc714
@samhemelryk samhemelryk authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/grade/grade_category.php
View
6 lib/grade/grade_category.php
@@ -892,7 +892,9 @@ public function apply_limit_rules(&$grade_values, $items) {
$droppedsomething = false;
$grade_keys = array_keys($grade_values);
- if (count($grade_keys) === 0) {
+ $gradekeycount = count($grade_keys);
+
+ if ($gradekeycount === 0) {
//We've dropped all grade items
break;
}
@@ -916,7 +918,7 @@ public function apply_limit_rules(&$grade_values, $items) {
}
$i = 1;
- while ($originalindex+$i < count($grade_keys)) {
+ while ($originalindex + $i < $gradekeycount) {
$possibleitemid = $grade_keys[$originalindex+$i];
$i++;
Please sign in to comment.
Something went wrong with that request. Please try again.