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

allow forum api to accept filearea id for inline attachments

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.1
    • Component/s: Forum, Web Services
    • Labels:
    • Testing Instructions:
      Hide

      It's a bit hard to test manually as its an api with file upload capability.
      See unit test for one test method.

      Essentially 2 parts need to be tested:
      Inline attachments filearea upload

      • Create a textarea that has inline file area attachments
      • submit the textarea content via api with areafileid as a parameter
      • ensure the forum post can be viewed in a normal forum with inline attachment uploaded successfully

      Normal attachments file area upload

      • Create a textarea that has regular file area attachments
      • submit the textarea via api with regulare atachment file area id as a parameter
      • ensure the forum post can be viewed in a normal forum with normal attachments uploaded successfully

      I created an ajax api that calls the forum api for the above.

      Show
      It's a bit hard to test manually as its an api with file upload capability. See unit test for one test method. Essentially 2 parts need to be tested: Inline attachments filearea upload Create a textarea that has inline file area attachments submit the textarea content via api with areafileid as a parameter ensure the forum post can be viewed in a normal forum with inline attachment uploaded successfully Normal attachments file area upload Create a textarea that has regular file area attachments submit the textarea via api with regulare atachment file area id as a parameter ensure the forum post can be viewed in a normal forum with normal attachments uploaded successfully I created an ajax api that calls the forum api for the above.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-53345_forum_api_itemid

      Description

      allow forum api to accept filearea id for inline attachments
      and attachment area id for regular attachments

      forum/externallib.php
      mod_forum_external::add_discussion_post
      and
      mod_forum_external::add_discussion

      do not support "itemid", the draftarea for inline attachments

        Attachments

          Activity

            People

            Assignee:
            berserkk Ben Kelada
            Reporter:
            berserkk Ben Kelada
            Peer reviewer:
            Juan Leyva Juan Leyva
            Integrator:
            David Monllaó David Monllaó
            Tester:
            John Okely John Okely
            Participants:
            Component watchers:
            Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              23/May/16