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

Sql error in interaction report

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.2
    • 2.2
    • SCORM
    • MOODLE_22_STABLE
    • MOODLE_22_STABLE
    • MDL-30440-master
    • Hide
      1. Upload a scorm pacakge and submit a few attempts from multiple student accounts
      2. Goto Scorm > reports > interaction
      3. set Show to "all users"
      4. set page size in such a way that you get atleast 4-5 pages of results
      5. Select an option from the firstname/lastname (Any character A,B,C,D)
      6. Repeat step 2-5 for basic report as well
      7. Make sure there is no error anywhere and everything works as expected.
        Please Note there is an existing (unrelated) Bug MDL-30028. Do not consider issues in that bug has anything to do with this issue.
      Show
      Upload a scorm pacakge and submit a few attempts from multiple student accounts Goto Scorm > reports > interaction set Show to "all users" set page size in such a way that you get atleast 4-5 pages of results Select an option from the firstname/lastname (Any character A,B,C,D) Repeat step 2-5 for basic report as well Make sure there is no error anywhere and everything works as expected. Please Note there is an existing (unrelated) Bug MDL-30028 . Do not consider issues in that bug has anything to do with this issue.

      Enter a URL something like this in your browser
      http://yourmoodle/mod/scorm/report.php?id=36&mode=interactions&tifirst=A

      Where 36 is the id of a scorm package

      This generates following errors
      Alternatively

      1. Goto Scorm > reports > interaction
      2. set Show to "all users"
      3. set page size in such a way that you get atleast 4-5 pages of results
      4. Select an option from the firstname/lastname (Any character A,B,C,D)

        ERROR: Mixed types of sql query parameters!!
        Stack trace:
         
            line 711 of \lib\dml\moodle_database.php: dml_exception thrown
            line 804 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params()
            line 1297 of \lib\dml\moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
            line 345 of \mod\scorm\report\interactions\report.php: call to moodle_database->get_record_sql()
            line 85 of \mod\scorm\report.php: call to scorm_interactions_report->display()

      Reason of this is both "?" and ":varname" type of wildcards are used in the report

      Note: the same changes should also be applied to basic report, so that it doesnt break when MDL-28588 will land.
      Thanks

            ankit_frenz Ankit Agarwal
            ankit_frenz Ankit Agarwal
            Dan Marsden Dan Marsden
            Sam Hemelryk Sam Hemelryk
            Rajesh Taneja Rajesh Taneja
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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