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

Duplicate get_records key column in users selector

XMLWordPrintable

    • MOODLE_26_STABLE, MOODLE_28_STABLE, MOODLE_31_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • Hide

      Pre-requisites: To have "display errors" enabled and debugging level to DEBUG_DEVELOPER (both being admin settings)

      1. Create a course
      2. Enrol a user twice (for example manual and cohort, or self and manual enrolment methods)
      3. From the Administration block, select Course Administration > Users > Permissions > Check Permissions
      4. You should not get any debugging messages and should see each enrolled user once
      Show
      Pre-requisites: To have "display errors" enabled and debugging level to DEBUG_DEVELOPER (both being admin settings) Create a course Enrol a user twice (for example manual and cohort, or self and manual enrolment methods) From the Administration block, select Course Administration > Users > Permissions > Check Permissions You should not get any debugging messages and should see each enrolled user once

      To replicate:

      Enrol same user in course via different enrolment methods. In this case, I had enrolled the user into the course via a cohort as a student and manually added them as a teacher.

      From the Administration block, select 'Course Administration > Users > Permissions > Check Permissions'

      The following debug message is displayed on screen:

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '5' found in column 'id'.

      line 1005 of /lib/dml/mysqli_native_moodle_database.php: call to debugging()
      line 121 of /admin/roles/classes/check_users_selector.php: call to mysqli_native_moodle_database->get_records_sql()
      line 210 of /user/selector/lib.php: call to core_role_check_users_selector->find_users()
      line 171 of /admin/roles/check.php: call to user_selector_base->display()

            pholden Paul Holden
            pholden Paul Holden
            Jake Dallimore Jake Dallimore
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 52 minutes
                52m

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