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

Course report fails with course/enrol log entries

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Course
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      I get the following error on the course/reports/ view activity log for today:

      debug info: Unknown column 'course' in 'field list'
      SELECT course FROM mdl_user WHERE id = ?
      [array (
      0 => '2',
      )]
      Stack trace:

      • line 378 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 632 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 1216 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
      • line 1291 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      • line 1270 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
      • line 1249 of /lib/dml/moodle_database.php: call to moodle_database->get_field_select()
      • line 390 of /course/lib.php: call to moodle_database->get_field()
      • line 116 of /course/report/log/index.php: call to print_log()

      when $log =
      stdClass Object
      (
      [id] => 533
      [time] => 1279241218
      [userid] => 2
      [ip] => xxxx
      [course] => 2
      [module] => course
      [cmid] => 0
      [action] => enrol
      [url] => ../enrol/users.php?id=2
      [info] => 2
      [firstname] => Admin
      [lastname] => User
      [picture] => 0
      )

      and ld =
      stdClass Object
      (
      [id] => 5
      [module] => course
      [action] => enrol
      [mtable] => user
      [field] => course
      )

        Gliffy Diagrams

          Attachments

            Activity

            danmarsden Dan Marsden created issue -
            mrbriz James Brisland made changes -
            Field Original Value New Value
            Assignee moodle.com [ moodle.com ] James Brisland [ mrbriz ]
            danmarsden Dan Marsden made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Cannot Reproduce [ 5 ]
            dougiamas Martin Dougiamas made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            QA Assignee nobody
            dougiamas Martin Dougiamas made changes -
            Workflow jira [ 37575 ] MDL Workflow [ 64951 ]
            dougiamas Martin Dougiamas made changes -
            Workflow MDL Workflow [ 64951 ] MDL Full Workflow [ 94260 ]
            danmarsden Dan Marsden made changes -
            Description I get the following error on the course/reports/ view activity log for today:

            debug info: Unknown column 'course' in 'field list'
            SELECT course FROM mdl_user WHERE id = ?
            [array (
            0 => '2',
            )]
            Stack trace:

                * line 378 of /lib/dml/moodle_database.php: dml_read_exception thrown
                * line 632 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
                * line 1216 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
                * line 1291 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
                * line 1270 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
                * line 1249 of /lib/dml/moodle_database.php: call to moodle_database->get_field_select()
                * line 390 of /course/lib.php: call to moodle_database->get_field()
                * line 116 of /course/report/log/index.php: call to print_log()

            when $log =
            stdClass Object
            (
                [id] => 533
                [time] => 1279241218
                [userid] => 2
                [ip] => 203.97.116.120
                [course] => 2
                [module] => course
                [cmid] => 0
                [action] => enrol
                [url] => ../enrol/users.php?id=2
                [info] => 2
                [firstname] => Admin
                [lastname] => User
                [picture] => 0
            )

            and ld =
            stdClass Object
            (
                [id] => 5
                [module] => course
                [action] => enrol
                [mtable] => user
                [field] => course
            )

            I get the following error on the course/reports/ view activity log for today:

            debug info: Unknown column 'course' in 'field list'
            SELECT course FROM mdl_user WHERE id = ?
            [array (
            0 => '2',
            )]
            Stack trace:

                * line 378 of /lib/dml/moodle_database.php: dml_read_exception thrown
                * line 632 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
                * line 1216 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
                * line 1291 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
                * line 1270 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
                * line 1249 of /lib/dml/moodle_database.php: call to moodle_database->get_field_select()
                * line 390 of /course/lib.php: call to moodle_database->get_field()
                * line 116 of /course/report/log/index.php: call to print_log()

            when $log =
            stdClass Object
            (
                [id] => 533
                [time] => 1279241218
                [userid] => 2
                [ip] => xxxx
                [course] => 2
                [module] => course
                [cmid] => 0
                [action] => enrol
                [url] => ../enrol/users.php?id=2
                [info] => 2
                [firstname] => Admin
                [lastname] => User
                [picture] => 0
            )

            and ld =
            stdClass Object
            (
                [id] => 5
                [module] => course
                [action] => enrol
                [mtable] => user
                [field] => course
            )

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10