Moodle
  1. Moodle
  2. MDL-23327

Course report fails with course/enrol log entries

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
    • Rank:
      32327

      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
      )

        Activity

        Hide
        James Brisland added a comment -

        For info: Just during today, I'm looking at this bug as part of the OU's Moodle Monday exercise. If I figure it out by the end of today, I'll attach a patch here. (If it turns out to be too difficult, I'll just leave it - sorry.)

        Show
        James Brisland added a comment - For info: Just during today, I'm looking at this bug as part of the OU's Moodle Monday exercise. If I figure it out by the end of today, I'll attach a patch here. (If it turns out to be too difficult, I'll just leave it - sorry.)
        Hide
        James Brisland added a comment -

        This seems to work fine for me.

        The steps I took were as follows.

        1. Created a new course
        2. Enabled self enrolment on course
        3. Enabled Stats
        4. Using a test user account enrolled on course
        5. Logged in as admin and went to course
        6. Clicked on Reports -> View course logs.
        7. Clicked "Get these logs" everything comes back as expected.

        Dan - Could you have a look and see if this is still an issue please.

        Thanks.

        Show
        James Brisland added a comment - This seems to work fine for me. The steps I took were as follows. 1. Created a new course 2. Enabled self enrolment on course 3. Enabled Stats 4. Using a test user account enrolled on course 5. Logged in as admin and went to course 6. Clicked on Reports -> View course logs. 7. Clicked "Get these logs" everything comes back as expected. Dan - Could you have a look and see if this is still an issue please. Thanks.
        Hide
        Dan Marsden added a comment -

        closing as cannot reproduce - I haven't seen this for a while - probably just a gremlin with an earlier release.

        Show
        Dan Marsden added a comment - closing as cannot reproduce - I haven't seen this for a while - probably just a gremlin with an earlier release.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: