-
Bug
-
Resolution: Fixed
-
Minor
-
4.0, 4.3.4
Very minor issue, but line 80 of course/rest.php ( https://github.com/moodle/moodle/blob/master/course/rest.php#L80 ) calls get_coursemodule_from_id() and stores the result in $beforemod.
The very next line, calls $DB->get_record('course_modules', ...) - then uses it to populate exactly the same $beforemod variable.
Unless I've missed something incredibly subtle here, the second line is completely unnecessary and should just be deleted (the first line is the more correct of the two).