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

Unable to download the Package via URL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.8, 2.5.4, 2.6.1, 2.7, 2.7.7, 2.8.5, 2.9
    • Fix Version/s: 2.7.8, 2.8.6
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

      (difficulty: easy, requires teacher access to a course)

      1. Create a SCORM activity using a file package. Take note of its file name;
      2. Extract the context id of the just created activity e.g. by launching the content and looking at the URL of an image of the content itself;
      3. Open a new tab in the same browser and point it to: http://hostname/path/to/moodle/pluginfile.php/<context_id>/mod_scorm/package/0/<package_name>. The file will be saved/downloaded and you'll be able to unzip it and see the list of files and folder included into the archive.
      Show
      (difficulty: easy, requires teacher access to a course) Create a SCORM activity using a file package. Take note of its file name; Extract the context id of the just created activity e.g. by launching the content and looking at the URL of an image of the content itself; Open a new tab in the same browser and point it to: http://hostname/path/to/moodle/pluginfile.php/ <context_id>/mod_scorm/package/0/<package_name> . The file will be saved/downloaded and you'll be able to unzip it and see the list of files and folder included into the archive.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      m29_MDL-43818_Unable_Download_Package_Via_URL

      Description

      While reading https://moodle.org/mod/forum/discuss.php?d=252626 I found a small but blocking issue in the way the full path is evaluated when considering the package filearea due to a doubled revision.
      This will lead to an incorrect path hash which cannot be matched with the {files}.pathnamehash column in the database.
      The final result is File not found even if the URL points to an existing file package.

      A patch proposal will follow.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15