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

Course search results in debugging notice

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.2
    • Component/s: Course
    • Labels:
      None
    • Database:
      Any
    • Testing Instructions:
      Hide

      SETUP:
      1/ Create a course named 'test'
      2/ Enrol a test user as a teacher, also add the 'non editting teacher' role to them at course context
      3/ Go to Admin -> Appearance -> Course contacts and select 'non editing teacher' in addition to 'teacher'

      TEST A:
      Run the course search for 'test'
      TEST B:
      View the category which course 'test' is displayed in.

      EXPECTED RESULT
      The course is displayed with the test user listed as a course contact, displaying the role

      ACTUAL RESULT

      The course is displayed fine with the user displayed in TEST B, but in TEST A:

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '3' found in column 'id'.
      line 705 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()
      line 5257 of /lib/accesslib.php: call to pgsql_native_moodle_database->get_records_sql()
      line 2447 of /course/lib.php: call to get_role_users()
      line 232 of /course/search.php: call to print_course()

      Show
      SETUP: 1/ Create a course named 'test' 2/ Enrol a test user as a teacher, also add the 'non editting teacher' role to them at course context 3/ Go to Admin -> Appearance -> Course contacts and select 'non editing teacher' in addition to 'teacher' TEST A: Run the course search for 'test' TEST B: View the category which course 'test' is displayed in. EXPECTED RESULT The course is displayed with the test user listed as a course contact, displaying the role ACTUAL RESULT The course is displayed fine with the user displayed in TEST B, but in TEST A: Did you remember to make the first column something unique in your call to get_records? Duplicate value '3' found in column 'id'. line 705 of /lib/dml/pgsql_native_moodle_database.php: call to debugging() line 5257 of /lib/accesslib.php: call to pgsql_native_moodle_database->get_records_sql() line 2447 of /course/lib.php: call to get_role_users() line 232 of /course/search.php: call to print_course()
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      If a user has two 'coursecontact' roles assigned at course context, the course search results in a debugging notice. Due to MDL-22309

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    5/Dec/11