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

Lesson short answer pages do not display iframes

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-65112-master
    • Testing Instructions:
      Hide
      1. Create a lesson activity and set Maximum number of attempts to 10.
      2. Add a question page of Short answer type
      3. For Answer 1  set  Answer as 'test answer' 
      4. On it's Response field, click "Show/hide advanced buttons" and click "HTML" so that you can enter raw HTML content in the Reponse field.
      5. Enter the following iframe code for the following YouTube video

         <iframe width="1280" height="720" src="https://www.youtube.com/embed/vUgjNhTUrBY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
        

      6. Preview the question page and enter "test answer" in "Your answer" filed.
      7. Confirm that iframe video is displayed.
      Show
      Create a lesson activity and set Maximum number of attempts to 10. Add a question page of Short answer type For Answer 1  set  Answer as 'test answer'  On it's Response field, click " Show/hide advanced buttons " and click " HTML " so that you can enter raw HTML content in the Reponse field. Enter the following iframe code for the following YouTube video <iframe width="1280" height="720" src="https://www.youtube.com/embed/vUgjNhTUrBY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> Preview the question page and enter "test answer" in "Your answer" filed. Confirm that iframe video is displayed.

      Description

      Moodle strips the iframe from short answers pages responses. That happens because format_text options do not set noclean to true.

        Attachments

          Activity

            People

            Assignee:
            dmitriim Dmitrii Metelkin
            Reporter:
            dmitriim Dmitrii Metelkin
            Peer reviewer:
            Matt Porritt Matt Porritt
            Integrator:
            Jun Pataleta Jun Pataleta
            Tester:
            Jennifer Bauzon Jennifer Bauzon
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/May/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 15 minutes
                1h 15m