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

get_file_argument() should be more clever when dealing with slashargs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.3, 3.2
    • Fix Version/s: 3.1.5, 3.2.2
    • Component/s: Files API, SCORM
    • Labels:
    • Testing Instructions:
      Hide

      (difficulty: easy, requires teacher access to a course and administrator access to change slasharguments setting)

      1. Log in as a teacher and go to a course
      2. Add a SCORM content created by Articulate Studio 09 (or the attached example: MDL-57379_Package_Example.zip)
      3. Attend to it: you should see all the pages w/o reading an error from Moodle like: No valid arguments supplied, path does not start with slash!
      4. Attend some other activities with slasharguments set to Yes and No (regressions)
      Show
      (difficulty: easy, requires teacher access to a course and administrator access to change slasharguments setting) Log in as a teacher and go to a course Add a SCORM content created by Articulate Studio 09 (or the attached example: MDL-57379 _Package_Example.zip ) Attend to it: you should see all the pages w/o reading an error from Moodle like: No valid arguments supplied, path does not start with slash! Attend some other activities with slasharguments set to Yes and No (regressions)
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      m33_MDL-57379_Properly_Honour_SlashArguments_Setting

      Description

      some files inside scorm packages will add use parameters to pass information to flash files - and in one case I've seen a SCORM package that includes the word "file" as a parameter.

      for example - a file could be loaded like this:
      .../pluginfile.php/3854/mod_scorm/content/1/swf.html?file=video_.swf

      get_file_argument grabs the "file" param first and tries to find the file "video_.swf"

      get_file_argument should be more clever about detecting when a path including slash arguments has been passed.

      here's a report relating to articulate packages that do this:
      https://community.articulate.com/discussions/articulate-storyline/swf-interactive-animation-wont-open-in-a-new-window#reply-386474

        Attachments

          Activity

            People

            Assignee:
            matteo Matteo Scaramuccia
            Reporter:
            danmarsden Dan Marsden
            Peer reviewer:
            David Mudrák (@mudrd8mz)
            Integrator:
            Dan Poltawski
            Tester:
            Adrian Greeve
            Participants:
            Component watchers:
            Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Mar/17