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

Duplicate record debug on quiz override form for users with multiple enrolments

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.2.3
    • 4.2.2
    • Quiz
    • MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • Hide
      1. Log in as admin
      2. Create a user
      3. Create a course
      4. Enable self-enrolment in the course
      5. Log out
      6. Log in as test user
      7. Self enrol on the course
      8. Log out
      9. Log in as admin
      10. Navigate to course
      11. Manually enrol user in the course (they should now have two enrolments)
      12. Create a quiz in the course
      13. Navigate to Overrides in quiz
      14. Press Add user override
      15. Confirm there is no debugging on the page
      16. Open the Override user select field
      17. Confirm test user is present
      Show
      Log in as admin Create a user Create a course Enable self-enrolment in the course Log out Log in as test user Self enrol on the course Log out Log in as admin Navigate to course Manually enrol user in the course (they should now have two enrolments) Create a quiz in the course Navigate to Overrides in quiz Press Add user override Confirm there is no debugging on the page Open the Override user select field Confirm test user is present

      Having a user with multiple enrolments in a course (e.g. self plus manual enrolment), when adding a user override to the quiz the following debugging is observed on the screen:

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '3' found in column 'id'.
       
          line 1407 of /lib/dml/mysqli_native_moodle_database.php: call to debugging()
          line 166 of /mod/quiz/classes/form/edit_override_form.php: call to mysqli_native_moodle_database->get_records_sql()
          line 217 of /lib/formslib.php: call to mod_quiz\form\edit_override_form->definition()
          line 80 of /mod/quiz/classes/form/edit_override_form.php: call to moodleform->__construct()
          line 113 of /mod/quiz/overrideedit.php: call to mod_quiz\form\edit_override_form->__construct()
      

      Seems to be caused by this change from MDL-71261 (Lesson and Assignment activities don't have the same problem) - it should discard duplicate users

            pholden Paul Holden
            pholden Paul Holden
            Tim Hunt Tim Hunt
            Andrew Lyons Andrew Lyons
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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