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

Attempts report showing non-unique debugging when including enroled users

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2
    • 3.2.2
    • Quiz
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • wip-MDL-57511-master
    • Hide

      1) Create a course (C1), course uses self AND manual enrolments.
      2) Add a simple quiz (I suggest just one true/false question).
      3) Add a user (S1).
      4) User S1 enrolls on course C1 (self enrol).
      5) User S1 completes quiz.
      6) As admin (or editing teacher) enroll user S1 again on course C1 (but as a manual enrolment this time).
      7) As admin view the quiz attempts reports page. Check no debugging messages are displayed (assuming debugging is developer level). Check just one attempt line is showing for user S1.

      Show
      1) Create a course (C1), course uses self AND manual enrolments. 2) Add a simple quiz (I suggest just one true/false question). 3) Add a user (S1). 4) User S1 enrolls on course C1 (self enrol). 5) User S1 completes quiz. 6) As admin (or editing teacher) enroll user S1 again on course C1 (but as a manual enrolment this time). 7) As admin view the quiz attempts reports page. Check no debugging messages are displayed (assuming debugging is developer level). Check just one attempt line is showing for user S1.

    Description

      Haven't properly got steps to reproduce this yet, but seems likely to be a regression from MDL-27072.

      I go to quiz attempts report and choose any of the enrolled users options I get debugging below. I don't get this if I choose all users who attempted the quiz.

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '3#1' found in column 'uniqueid'.
      line 802 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()
      line 1593 of /lib/tablelib.php: call to pgsql_native_moodle_database->get_records_sql()
      line 541 of /mod/quiz/report/attemptsreport_table.php: call to table_sql->query_db()
      line 314 of /mod/quiz/report/overview/overview_table.php: call to quiz_attempts_report_table->query_db()
      line 1614 of /lib/tablelib.php: call to quiz_overview_table->query_db()
      line 244 of /mod/quiz/report/overview/report.php: call to table_sql->out()
      line 96 of /mod/quiz/report.php: call to quiz_overview_report->display()
      

      Attachments

        Issue Links

          Activity

            People

              jb23347 John Beedell
              poltawski Dan Poltawski
              Tim Hunt Tim Hunt
              Dan Poltawski Dan Poltawski
              John Okely John Okely
              Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Raquel Ortega, Sabina Abellan, Sander Bangma, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/Mar/17