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

Minor duplicate line in course/rest.php

    XMLWordPrintable

Details

    Description

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

      Attachments

        Activity

          People

            davosmith Davo Smith
            davosmith Davo Smith
            Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: