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

external_util::get_area_files() returns invalid URLs for files in question responses

    XMLWordPrintable

Details

    • MOODLE_311_STABLE

    Description

      In my webservice, I'm trying to obtain files submitted in question responses with external_util::get_area_files(). The real file path is:

      http://moodle.site/pluginfile.php/27/question/response_attachments/23/1/28/myfile.txt

      with 27 being the contextid, 23 the attemptid, 1 the attempt number and 28 the itemid. However, external_util::get_area_files() returns for the fileurl:

      http://moodle.site/webservice/pluginfile.php/27/question/response_attachments/28/myfile.txt

      This returns a 404 error when trying to be accessed, because the attempt ID and attempt number are missing from the URL.

      Attachments

        Activity

          People

            timhunt Tim Hunt
            kenogo Keno Goertz
            Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, Safat Shahin, Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Raquel Ortega, Sabina Abellan, Sander Bangma, Sara Arjona (@sarjona), Shamim Rezaie, Juan Leyva, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: