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

HTML editor (atto): warn users when an image is pasted as base64 by the browser, because it won't save

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • 3.11.6
    • Text editor Atto, UX
    • MOODLE_311_STABLE

      Sometime, Atto is configured to support embedded impages properly using the File API (e.g. MDL-47750). Other uses of Atto don't allow this, but in this case, if you try to paste an image, web browers often 'helpfully' past the image using a base64 dataURL. This appears to the user to have worked, but after the form is saved, Moodle strips the image out. This is nastly dataloss.

      Surely we should be able to detect when this happens, and display a warning immediately (using JavaScript). (This is similar to, but different from MDL-68604.)

      Original report follows:

      When answering a quiz as a student, I pasted an image into the text box, and it displayed normally. What I expected is that after submitting the answer, the image will be submitted together. However, what actually happens is that the image disappeared without any warnings, and I lost my answer and corresponding points.

      The version of Moodle our university currently uses is 3.9.6, I know it's an old version, but I don't have access to upgrade it. However, I did some testing on Moodle Sandbox Demo, and found that although the "Finish attempt" button is disabled when there are images in the answer fields, when time is up, the answer will be submitted automatically, and the Moodle behaves in the same way as above - the pictures in the responses disappear while the text remains.

      Besides, I found someone reported a similar issue on the Moodle Forum, which contains the full steps of reproducing the problem.

      For students who are not used to submit the answers in advance, this behavior of the Moodle system is likely to make them lose their answers in vain. Therefore, I would like Moodle to display a warning when students try to insert images in their answers in future versions.

            Unassigned Unassigned
            skylee Ming-Tian Yang
            Votes:
            4 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:

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