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

webservice/pluginfile.php doesn't accept token for assignsubmission_onlinetext

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 2.6.2
    • Files API, Web Services
    • None
    • MOODLE_26_STABLE

      I have a external application that needs to download attached files to an assignsubmission using onlinetext.

      The solution was working fine on Moodle 2.4 but, as we updated it to Moodle 2.6 I started receiving a json response from where it should be sending the images.

      here is two example URLs:

      http://moodle.local/pluginfile.php/18251/assignsubmission_onlinetext/submissions_onlinetext/19164/wallpaper.jpg

      http://moodle.local/webservice/pluginfile.php/18251/assignsubmission_onlinetext/submissions_onlinetext/19164/wallpaper.jpg?token=...

      The first is the one generated inside moodle, and the second one is the one suitable for the external application.

      While the first display correctly the image, the second gives me the following output error:

      { error: "Detectado redirecionamento não suportado. A execução do script foi cancelada ", stacktrace: "* line 2565 of /lib/weblib.php: moodle_exception thrown * line 3148 of /lib/moodlelib.php: call to redirect() * line 44 of /mod/assign/submission/onlinetext/lib.php: call to require_login() * line 4634 of /lib/filelib.php: call to assignsubmission_onlinetext_pluginfile() * line 54 of /webservice/pluginfile.php: call to file_pluginfile() ", debuginfo: " Error code: redirecterrordetected", reproductionlink: "http://moodle.local/" }

            Unassigned Unassigned
            brodock Gabriel Mazetto (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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