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

Quiz: report delete_selected_attempts notice when a user has multiple enrolments

XMLWordPrintable

    • MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MDL-67942-master
    • Hide
      1. Login as admin
      2. Set "debug" to developer level and enable "debugdisplay"
      3. Create a new role ( Site administration > Users > Permissions > Define roles > Add a new role) which allows these two capabilities: mod/quiz:attempt and mod/quiz:reviewmyattempts.
      4. Create a user
      5. Create a course, with a quiz having 1 question
      6. Enrol the created user with 2 roles to the created course (Student role and the new one also).
      7. Login as that user and complete the Quiz.
      8. Login as admin.
      9. Go to any Quiz reports (Grade, Response).
      10. Select the attempt of that user and delete that attempt.
      11. Verify that there isn't any error like the one shown in the description of the issue.
      Show
      Login as admin Set "debug" to developer level and enable "debugdisplay" Create a new role ( Site administration > Users > Permissions > Define roles > Add a new role) which allows these two capabilities:  mod/quiz:attempt and mod/quiz:reviewmyattempts . Create a user Create a course, with a quiz having 1 question Enrol the created user with 2 roles to the created course (Student role and the new one also). Login as that user and complete the Quiz. Login as admin. Go to any Quiz reports (Grade, Response). Select the attempt of that user and delete that attempt. Verify that there isn't any error like the one shown in the description of the issue.

      In quiz attempt report, if you delete an attempt which belongs to a user that was enrolled in more than one role, you will get the error:

       

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

       

            HuongNV Huong Nguyen
            HuongNV Huong Nguyen
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 45 minutes
                1h 45m

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