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

Lesson short answer pages do not display iframes

    XMLWordPrintable

Details

    • MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MDL-65112-master
    • 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

        1. MDL-65112.png
          265 kB
          Jennifer Bauzon

        Activity

          People

            dmitriim Dmitrii Metelkin
            dmitriim Dmitrii Metelkin
            Matt Porritt Matt Porritt
            Jun Pataleta Jun Pataleta
            Jennifer Bauzon Jennifer Bauzon
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              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