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

ERROR: Incorrect number of query parameters. Expected 10, got 0. when entering assessment phase

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      Hide

      Testing difficulty: trivial

      1. Create a workshop in 2.4dev and switch it into the Submission phase.
      2. Let a student submit their work.
      3. TEST: Make sure you can switch the workshop to the Assessment phase.

      Show
      Testing difficulty: trivial 1. Create a workshop in 2.4dev and switch it into the Submission phase. 2. Let a student submit their work. 3. TEST: Make sure you can switch the workshop to the Assessment phase.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-36086-workshop

      Description

      When proceeding to the Assessment phase I always get the error message ERROR: Incorrect number of query parameters. Expected 10, got 0. Where 10 is the number of users enrolled on the course (obviously this changes depending on how many users are enrolled in the course).

      I tested this in integration/MOODLE_23_STABLE and it doesn't happen there so it is a problem introduced in 2.4.

      To recreate:

      1. In integration/master (2.4) create a workshop.
      2. Fill in the default options and make any student submissions so that the workshop can proceed easily to the Assessment phase.
      3. Advance to the assessment phase.

      Expected result:

      • The workshop grades report appears.

      Actual result:

      • The error: "ERROR: Incorrect number of query parameters. Expected 10, got 0. when entering assessment phase", appears onscreen.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              mudrd8mz David Mudrák added a comment -

              Thanks Tim for the report. May I ask you to increase the debugging level so that the error page actually shows the query and the function calls stack. It would make the debugging easier. Thanks.

              Show
              mudrd8mz David Mudrák added a comment - Thanks Tim for the report. May I ask you to increase the debugging level so that the error page actually shows the query and the function calls stack. It would make the debugging easier. Thanks.
              Hide
              timb Tim Barker added a comment -

              Debug info:

              Debug info:
              Error code: invalidqueryparam
              Stack trace:

              line 783 of /lib/dml/moodle_database.php: dml_exception thrown
              line 1009 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params()
              line 1750 of /mod/workshop/locallib.php: call to mysqli_native_moodle_database->get_records_sql()
              line 257 of /mod/workshop/view.php: call to workshop->prepare_grading_report_data()

              Show
              timb Tim Barker added a comment - Debug info: Debug info: Error code: invalidqueryparam Stack trace: line 783 of /lib/dml/moodle_database.php: dml_exception thrown line 1009 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params() line 1750 of /mod/workshop/locallib.php: call to mysqli_native_moodle_database->get_records_sql() line 257 of /mod/workshop/view.php: call to workshop->prepare_grading_report_data()
              Hide
              mudrd8mz David Mudrák added a comment -

              I can reproduce the error, working on it. Thanks a lot Tim.

              Show
              mudrd8mz David Mudrák added a comment - I can reproduce the error, working on it. Thanks a lot Tim.
              Hide
              mudrd8mz David Mudrák added a comment -

              This is a regression caused by MDL-34657

              Show
              mudrd8mz David Mudrák added a comment - This is a regression caused by MDL-34657
              Hide
              mudrd8mz David Mudrák added a comment -

              Submitting a patch for integration.

              Show
              mudrd8mz David Mudrák added a comment - Submitting a patch for integration.
              Hide
              mudrd8mz David Mudrák added a comment -

              Tim, just in case this is a blocker for your work, the fix is pretty trivial and you can apply it locally until it gets integrated.

              Show
              mudrd8mz David Mudrák added a comment - Tim, just in case this is a blocker for your work, the fix is pretty trivial and you can apply it locally until it gets integrated.
              Hide
              timb Tim Barker added a comment -

              David, it doesn't block what I was doing because I was testing forms. But thanks anyway

              Show
              timb Tim Barker added a comment - David, it doesn't block what I was doing because I was testing forms. But thanks anyway
              Hide
              nebgor Aparup Banerjee added a comment -

              The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

              TIA and ciao

              Show
              nebgor Aparup Banerjee added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
              Hide
              mudrd8mz David Mudrák added a comment -

              Some other submitted patches like MDL-36135 can't be tested without this.

              Show
              mudrd8mz David Mudrák added a comment - Some other submitted patches like MDL-36135 can't be tested without this.
              Hide
              poltawski Dan Poltawski added a comment -

              Integrated, thanks David.

              Show
              poltawski Dan Poltawski added a comment - Integrated, thanks David.
              Hide
              ankit_frenz Ankit Agarwal added a comment -

              Works as expected.
              passing
              Thanks

              Show
              ankit_frenz Ankit Agarwal added a comment - Works as expected. passing Thanks
              Hide
              poltawski Dan Poltawski added a comment -

              Hurray!

              You did it, congratulations! You have on Mojito credit to redeem after the release of Moodle 2.4

              Show
              poltawski Dan Poltawski added a comment - Hurray! You did it, congratulations! You have on Mojito credit to redeem after the release of Moodle 2.4

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12