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

Duplicate value when accessing to H5P activity "Attempts report"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.9
    • Fix Version/s: 3.9
    • Component/s: H5P
    • Testing Instructions:
      Hide

      Test

      1. Login as admin.
      2. Go to Site administration > Development > Debugging and set 'Debug messages' to 'DEVELOPER...'.
      3. Create a Course.
      4. Go to the Course homepage.
      5. Go to the course Participants page.
      6. In participants page, from the settings menu click on 'Enrolment methods'.
      7. Enable "Self enrolment" for Course.
      8. Login as Student.
      9. Enrol in Course.
      10. Login as Admin.
      11. Go to the Course homepage.
      12. Go to the course Participants page.
      13. Manually enrol the Student again
      14. Go back to the Course homepage
      15. Turn editing on and create an H5P activity ()
      16. Create an H5P activity (you can use the uploaded h5p file as a package file).
      17. Go to the H5P activity
      18. Click on the 'View all attempts' link (Attempts report)
        • make sure the Attempts report is properly rendered with NO errors are displayed on the page
      Show
      Test Login as admin. Go to Site administration > Development > Debugging and set 'Debug messages' to 'DEVELOPER...'. Create a Course. Go to the Course homepage. Go to the course Participants page. In participants page, from the settings menu click on 'Enrolment methods'. Enable "Self enrolment" for Course. Login as Student. Enrol in Course. Login as Admin. Go to the Course homepage. Go to the course Participants page. Manually enrol the Student again Go back to the Course homepage Turn editing on and create an H5P activity () Create an H5P activity (you can use the uploaded h5p file as a package file). Go to the H5P activity Click on the 'View all attempts' link (Attempts report) make sure the Attempts report is properly rendered with NO errors are displayed on the page
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-68916-master
    • Sprint:
      3.9 release work board

      Description

      Steps to reproduce (you'll need to enable Debug):

      1. Login as admin.
      2. Create a course.
      3. Access to Participants and enable "Self enrolment"
      4. Login as student (s1).
      5. Enrol to the previous course.
      6. Login as admin.
      7. Access to the Participants page of the course.
      8. Manual enrol the student (s1).
      9. Create an H5P activity.
      10. Access to the attempts report.

      Expected result:

      No error is displayed.

       

      Current result:

      The following error is displayed:

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '3' found in column 'id'.
      line 942 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()
      line 2002 of /lib/tablelib.php: call to pgsql_native_moodle_database->get_records_sql()
      line 2024 of /lib/tablelib.php: call to table_sql->query_db()
      line 126 of /mod/h5pactivity/classes/local/report/participants.php: call to table_sql->out()
      line 128 of /mod/h5pactivity/report.php: call to mod_h5pactivity\local\report\participants->print()

        Attachments

          Activity

            People

            Assignee:
            Geshoski Mihail Geshoski
            Reporter:
            sarjona Sara Arjona (@sarjona)
            Peer reviewer:
            Amaia Anabitarte
            Integrator:
            Jun Pataleta
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Jun/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 20 minutes
                2h 20m