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

Return the content size in mod_wiki_get_subwiki_pages if includecontent=0

XMLWordPrintable

    • MOODLE_30_STABLE
    • MOODLE_31_STABLE
    • MDL-53709-master
    • Hide
      1. Create a course with a student. The course must have at least one section.
      2. Create a collaborative wiki without using groups.
      3. Create 1 page in the wiki. Please notice the length of the page contents.
      4. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      5. Create a Token for the student user.
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Next, you can do a CURL REST call simulating a WS client with the student user.
        • You need to replace the wstoken, wikiid (the wiki instance value) and the URL of your moodle instance.

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=mod_wiki_get_subwiki_pages&wikiid=1&options%5Bincludecontent%5D=0&wstoken=5b6154a56566a194f60f7f395f235179' --compressed

      7. Confirm that you receive the size of the page contents.
      Show
      Create a course with a student. The course must have at least one section. Create a collaborative wiki without using groups. Create 1 page in the wiki. Please notice the length of the page contents. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student user. Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student user. You need to replace the wstoken, wikiid (the wiki instance value) and the URL of your moodle instance. curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=mod_wiki_get_subwiki_pages&wikiid=1&options%5Bincludecontent%5D=0&wstoken=5b6154a56566a194f60f7f395f235179' --compressed Confirm that you receive the size of the page contents.

      The WebService mod_wiki_get_subwiki_pages has an option includecontent to determine if the page content should be returned.

      It would be nice to know the size of this content if includecontent is set to 0. This will allow external services to have an approximate size of the data returned when they prefetch the pages (without taking into account files size).

      In the specific case of the Moodle Mobile app, it will help us to calculate the download size to prefetch a subwiki.

            dpalou Dani Palou
            dpalou Dani Palou
            Juan Leyva Juan Leyva
            David Monllaó David Monllaó
            Marina Glancy Marina Glancy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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