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

Duplicate value warning on course participants report

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.6.4, 2.7.1
    • 2.3.2, 2.6.3, 2.7
    • Reports
    • MOODLE_23_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • Hide
      • Create one course, one activity and one user
      • Also, create a cohort
      • Assign the user to the created cohort
      • Enrol the user in the created course with manual enrol and give the student role
      • Add a cohort sync enrol method to the created course to sync users from the created cohort with student role
      • Enable debug at developer level and debug display
      • Go to Administration block -> Course administration -> Reports -> Course participation
      • Confirm that you do not get an error like this:

        Did you remember to make the first column something unique in your call to get_records? Duplicate value '3' found in column 'userid'.
         
            line 1023 of /lib/dml/mysqli_native_moodle_database.php: call to debugging()
            line 259 of /report/participation/index.php: call to mysqli_native_moodle_database->get_records_sql()
        

      Show
      Create one course, one activity and one user Also, create a cohort Assign the user to the created cohort Enrol the user in the created course with manual enrol and give the student role Add a cohort sync enrol method to the created course to sync users from the created cohort with student role Enable debug at developer level and debug display Go to Administration block -> Course administration -> Reports -> Course participation Confirm that you do not get an error like this : Did you remember to make the first column something unique in your call to get_records? Duplicate value '3' found in column 'userid'.   line 1023 of /lib/dml/mysqli_native_moodle_database.php: call to debugging() line 259 of /report/participation/index.php: call to mysqli_native_moodle_database->get_records_sql()

      I got a warning when accessing the course participation report.

      Replication steps:

      1. Log in as teacher/admin
      2. Navigate to a course that has multiple students enrolled
      3. Navigate to the course participantion report (Navigation > somecourse > reports > course participation)
      4. from course participant list above, select an activity.
      5. Select Student from the Show only list.
      6. Click Go

      That caused the following error to be displayed.

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '2' found in column 'userid'.
       
          line 979 of /lib/dml/mysqli_native_moodle_database.php: call to debugging()
          line 259 of /report/participation/index.php: call to mysqli_native_moodle_database->get_records_sql()
      

            danielneis Daniel Neis Araujo
            andyjdavis Andrew Davis
            Ankit Agarwal Ankit Agarwal
            Marina Glancy Marina Glancy
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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