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

Incorrect number of query parameters while listing users by student (follow-up of MDL-79635)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 4.2.3, 4.3
    • Groups
    • 2
    • Team Hedgehog 2023 Sprint 4.3, Team Hedgehog 2023 Review 4

      We've detected that the same issue solved by MDL-79635 (exactly this change) has to be fixed also in the next 'case' clause of /lib/grouplib.php.

      In our case this issue affects to users with the student role but not other roles, but not sure of the exact variable combination that triggers it so I haven't added testing instructions yet.

      This issue is affecting the assignment module too (students were receiving that same SQL error when trying to access /mod/assign/view.php?id=12345 pages). The stack trace looks like this when the error shows on the assignment view page:

      Default exception handler: ERROR: Incorrect number of query parameters. Expected 25, got 20. Debug: 
      Error code: invalidqueryparam

      • line 953 of /lib/dml/moodle_database.php: dml_exception thrown
      • line 1024 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->fix_sql_params()
      • line 2296 of /mod/assign/locallib.php: call to pgsql_native_moodle_database->get_records_sql()
      • line 3053 of /mod/assign/locallib.php: call to assign->list_participants()
      • line 4946 of /mod/assign/locallib.php: call to assign->get_submission_group_members()
      • line 69 of /mod/assign/submission/file/lib.php: call to assign->can_view_group_submission()
      • line 5300 of /lib/filelib.php: call to assignsubmission_file_pluginfile()
      • line 44 of /pluginfile.php: call to file_pluginfile()
      • line 45 of /tokenpluginfile.php: call to require_once()

        1. Screenshot 2023-12-18 at 2.42.49 pm.png
          251 kB
          Stevani Andolo
        2. assign no error.png
          132 kB
          Stevani Andolo
        3. participants.png
          184 kB
          Stevani Andolo

            izendegi Iñigo Zendegi Urzelai
            izendegi Iñigo Zendegi Urzelai
            Stevani Andolo Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 37 minutes
                37m

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