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

loadSCO.php launched over parent folders returns an 'hidden' HTTP 404 error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide
      1. (Opt) Create an empty course
      2. Add a new SCORM/AICC activity using e.g. the SCORM 1.2 package attached in MDL-35840, MDL-35840.zip
      3. Open a network traffic sniffer or Firebug
      4. Launch the Activity and navigate through the TOC even into the items representing a folder by using the navigation buttons: clicking directly on those items will just collapse/expand them!
      5. Look for any HTTP 404 error

      Please, note that applying MDL-35840 into the master branch will prevent calling items without content, as it is supposed to be.

      Show
      (Opt) Create an empty course Add a new SCORM/AICC activity using e.g. the SCORM 1.2 package attached in MDL-35840 , MDL-35840 .zip Open a network traffic sniffer or Firebug Launch the Activity and navigate through the TOC even into the items representing a folder by using the navigation buttons: clicking directly on those items will just collapse/expand them! Look for any HTTP 404 error Please, note that applying MDL-35840 into the master branch will prevent calling items without content, as it is supposed to be.
    • Workaround:
      Hide

      There's no workaround but it is supposed that this error doesn't actually affect final users but the logs of the web server. It cannot be easily seen - out of a dev environment - due to the hidden HTTP 404 errors: testing MDL-35840 brings the attention back.

      Show
      There's no workaround but it is supposed that this error doesn't actually affect final users but the logs of the web server. It cannot be easily seen - out of a dev environment - due to the hidden HTTP 404 errors: testing MDL-35840 brings the attention back.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      m24_MDL-36142_Incorrect_query_returns_HTTP_404

      Description

      When $sco->launch = '' a SQL exception is triggered:

      Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'scorm_scoes', 'launch', false, true).' AND id > '179' ORDER BY id ASC' at line 1
      SELECT * FROM mdl_scorm_scoes WHERE scorm = ? AND '.('scorm_scoes', 'launch', false, true).' AND id > ? ORDER BY id ASC
      [array (
      0 => '7',
      1 => '179',
      )]
      Error code: dmlreadexception
      Stack trace:
       
          line 407 of /lib/dml/moodle_database.php: dml_read_exception thrown
          line 1014 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
          line 1189 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
          line 82 of /mod/scorm/loadSCO.php: call to moodle_database->get_records_select()

      This issue has seen the light starting from MDL-35418 due to the fact that when attending a Learning Package it tries to deliver those items of the TOC being just a folder (no manifest//resource@href i.e. $sco->launch = ''): sniffing the traffic between client and server will show these HTTP 404 errors, on GETting mod/scorm/loadSCO.php?a=<activity_id>&scoid=<sco_id_being_an_item_not_launch-able>&currentorg=&attempt=<attempt_id>.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              danmarsden Dan Marsden
              Reporter:
              matteo Matteo Scaramuccia
              Integrator:
              Dan Poltawski
              Tester:
              Michael de Raadt
              Participants:
              Component watchers:
              Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

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