Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2670

All text editor files are removed when updating a database entry (including text editor)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 3.7.1
    • 3.7.0
    • Database add-on
    • MOODLE_37_STABLE
    • MOODLE_37_STABLE
    • Moodle App 3.7.1

      To reproduce:
      1 Create a database activity including text area fields.
      2 Create a new entry including images in the text area
      3 Update the entry via the Mobile app

      How to fix this:

      • The files in the editor are part of the get_entries WS response
      • We need to download them and re-upload them upon every edition (like we currently do for assignment)
      • So when a user is going to save the updates in the app we have to upload all the editor files via webservice/upload.php to get a draftid that will be used as a parameter of the Web SErvice, example parameters (this is for web, for mobile we have to use the WS signature parameters):

      [d] => 2
      [rid] => 1
      [field_4_0] => https://moodle.org
      [field_5_itemid] => 965532203 <-- this is the draft item id used
      [field_5] => <p>The Open Source LMS of the world.</p><p><br></p><p><img src="http://localhost/m/stable_master/draftfile.php/5/user/draft/965532203/LOGO.png" alt="" class="img-responsive atto_image_button_text-bottom" width="440" height="168"><br></p>
      [field_5_content1] => 1

      Data sent by the mobile app right now:

      entryid: 1
      data[0][fieldid]: 4
      data[0][value]: "https://moodle.org"
      data[0][subfield]:
      data[1][fieldid]: 5
      data[1][value]: "<p>The Open Source LMS of the world</p><p>blah blah</p><p><img src=\"@@PLUGINFILE@@/LOGO.png\" alt=\"\" class=\"img-responsive atto_image_button_text-bottom\" width=\"440\" height=\"168\"><br></p>"
      data[1][subfield]:
      data[2][fieldid]: 5
      data[2][subfield]: content1
      data[2][value]: 1
      data[3][fieldid]: 5
      data[3][subfield]: itemid
      data[3][value]: 437022570

            dpalou Dani Palou
            jleyva Juan Leyva
            Juan Leyva Juan Leyva
            Juan Leyva Juan Leyva
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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