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

Debugging warning on saving an online text submission with an uploaded image.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6.1, 2.7
    • Component/s: Events API
    • Labels:
      None
    • Testing Instructions:
      Hide

      Pre-requisites

      • Some students enrolled in a course.
      • Developer level debugging must be enabled.

      Testing

      1. Create an assignment (mod_assign).
        • Make sure that the submission type is "Online text" only (untick "File submissions").
      2. Log in as a student.
      3. Make a submission for the assignment. Make sure to embed an image into the online text.
      4. When you click "Save changes" make sure that no debugging message is shown.

      Unit tests

      • Run phpunit mod/assign/submission/onlinetext/tests/events_test.php and check that they pass.
      Show
      Pre-requisites Some students enrolled in a course. Developer level debugging must be enabled. Testing Create an assignment (mod_assign). Make sure that the submission type is "Online text" only (untick "File submissions"). Log in as a student. Make a submission for the assignment. Make sure to embed an image into the online text. When you click "Save changes" make sure that no debugging message is shown. Unit tests Run phpunit mod/assign/submission/onlinetext/tests/events_test.php and check that they pass.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-43295-master
    • Story Points (Obsolete):
      13
    • Sprint:
      BACKEND Sprint 8

      Description

      Warning:

      Before calling format_text(), the content must be processed with file_rewrite_pluginfile_urls() (line 144 of /mod/assign/submission/onlinetext/locallib.php).

      It makes no sense to me that we are calling format_text and storing the result as 'content' in the event. IMO we should store the raw text and format instead. I think this should be a "rule" for all events.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    13/Jan/14