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

print_mnet_log treats $course as an object, even though an integer is passed in

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9.4, 2.3.6
    • Fix Version/s: None
    • Component/s: MNet
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_23_STABLE

      Description

      In /course/report/log/index.php, print_mnet_log is called with the second argument being the course ID, rather than the entire course object. However, print_mnet_log in /course/lib.php still tries to access $course->id, which of course fails. Probably the easiest fix is to replace "$course->id" with just "$course" within print_mnet_log. Additionally, it may be good to rename the variable to be "$courseid" instead of just "$course", to make things clearer.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated: