Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-73735

Minor duplicate line in course/rest.php

XMLWordPrintable

      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).

            Daniel Ziegenberg Daniel Ziegenberg
            davosmith Davo Smith
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Amaia Anabitarte Amaia Anabitarte
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 2 minutes
                2h 2m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.