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

Return editor files in Web Services

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2
    • 3.1.1
    • Web Services
    • MOODLE_31_STABLE
    • MOODLE_32_STABLE
    • MDL-55728-master
    • Hide
      1. Create a new forum, add a new discussion with some posts including inline videos or images (not attachments, I'm talking about images and videos embedded in the rich text editor)
      2. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Create a Token for one user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      4. Next, you can do a CURL REST call simulating a WS client with the user.
        • You need to replace the wstoken, discussionid (with your forum discussions id) and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'discussionid=22&moodlewssettingfilter=true&moodlewssettingfileurl=true&wsfunction=mod_forum_get_forum_discussion_posts&wstoken=ffbe3a3002f235bf9d01fd9369e10b66'

      5. Now you must check that all the images and videos inline are returned in a field called messageinlinefiles, including the name of the file, time when was modified, size, url and path
      6. Append to one of those images urls the token (?token=XYZ) and check that you can see the image
      Show
      Create a new forum, add a new discussion with some posts including inline videos or images (not attachments, I'm talking about images and videos embedded in the rich text editor) As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for one user: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the user. You need to replace the wstoken, discussionid (with your forum discussions id) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'discussionid=22&moodlewssettingfilter=true&moodlewssettingfileurl=true&wsfunction=mod_forum_get_forum_discussion_posts&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' Now you must check that all the images and videos inline are returned in a field called messageinlinefiles , including the name of the file, time when was modified, size, url and path Append to one of those images urls the token (?token=XYZ) and check that you can see the image

      The Mobile app has a functionality to download a Moodle activity to do it offline, before downloading the activity we calculate the download size to notify the user.

      Right now, we are not capable of determining the exact size because we are missing the size of the files (images or videos) in the rich text editor (like a forum post or glossary entry).

      We should use the new external_files helper functions available in 3.2 to return the complete files information (like we can do in the atto editor using the Manage files button)

            jleyva Juan Leyva
            jleyva Juan Leyva
            Dani Palou Dani Palou
            Dan Poltawski Dan Poltawski
            Jun Pataleta Jun Pataleta
            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.