-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
3.6
-
None
-
MOODLE_36_STABLE
This is a followup of MDL-63422 where, aiming to get PHP 7.3 working, all the switch / case / continue occurrences in core was reviewed.
The policy followed was:
- if possible, take rid of the continue (all activity modules), keeping original behavior.
- when the intention clearly was to jump to next element in loop, change to continue 2.
- when it was not clear, no matter the exiting continue there is (was) non-sense... change it to break that behaves exactly the same.
And, as result of it some changes were applied to both grade/querylib.php and lib/gradelib.php, following the 3rd point in the policy above.
This is about to review if those new break; statements are really what we want there or it would be better to change to a continue 2 that would lead to the next iteration, not executing all the remaining code in the loop after the switch.
To be analyzed. As said, the change performed was to keep original behavior (just end the switch). This is about to verify if we can go a step further and end the iteration (the original continue; used there, maybe was meant to do so.
Ciao