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

Create a new filter to convert h5p.com and h5p.org urls to embed code

XMLWordPrintable

    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • MDL-66397-master-embed
    • Hide

      Prerequisites:

      • Having multiple H5P content URLs:
      • Go to admin -> plugins -> filters -> h5p and, in "Allowed sources", add this:

        https://h5p.org/h5p/embed/580638
        https://h5p.org/h5p/embed/6729
        https://moodle.org|https://moodle.org/
        https://moodle.h5p.com/content/1290729733828858779
        

      Test

      1. Check in Site administration > Plugins > Filters > Manage filters 'Convert URLs into links and images' filter is Disabled or, in case it is On, is ordered below H5P filter.
      2. Create a course C1.
      3. In course C1, add a Label anywhere.
      4. In the Label text Atto editor, copy and paste  the following text using the HTML/code view:

      <div>1.valid URL: https://h5p.org/h5p/embed/580638</div>
      <div>2.another valid URL: https://h5p.org/h5p/embed/6729</div>
      <div>3.non valid URL: https://moodle.org</div>
      <div>4.URL inside a link tag: <a href="https://h5p.org/h5p/embed/6729">link</a></div>
      <div>5.paragraph with a valid URL https://h5p.org/h5p/embed/580638 inside</div>
      <div>6.a valid URL ended by '/embed': https://moodle.h5p.com/content/1290729733828858779/embed</div>
      <div>7.an h5p.com valid URL not ended by '/embed': https://moodle.h5p.com/content/1290729733828858779</div>

      1. Confirm that the H5P contents of 1, 2, 5, 6 and 7 are displayed.
      Show
      Prerequisites: Having multiple H5P content URLs: Go to admin -> plugins -> filters -> h5p and, in "Allowed sources", add this: https://h5p.org/h5p/embed/580638 https://h5p.org/h5p/embed/6729 https://moodle.org|https://moodle.org/ https://moodle.h5p.com/content/1290729733828858779 Test Check in Site administration > Plugins > Filters > Manage filters 'Convert URLs into links and images' filter is Disabled or, in case it is On, is ordered below H5P filter. Create a course C1. In course C1, add a Label anywhere. In the Label text Atto editor, copy and paste  the following text using the HTML/code view : <div>1.valid URL: https://h5p.org/h5p/embed/580638</div> <div>2.another valid URL: https://h5p.org/h5p/embed/6729</div> <div>3.non valid URL: https://moodle.org</div> <div>4.URL inside a link tag: <a href="https://h5p.org/h5p/embed/6729">link</a></div> <div>5.paragraph with a valid URL https://h5p.org/h5p/embed/580638 inside</div> <div>6.a valid URL ended by '/embed': https://moodle.h5p.com/content/1290729733828858779/embed</div> <div>7.an h5p.com valid URL not ended by '/embed': https://moodle.h5p.com/content/1290729733828858779</div> Confirm that the H5P contents of 1, 2, 5, 6 and 7 are displayed.
    • H5P Sprint 1, H5P Sprint 2, H5P Sprint 3

      As a tool for content creators, to make it easier to use existing H5P content in Moodle, we have to create a new filter that allows to display automatically the H5P links from h5p.org or h5p.com.

      For URLs like https://xxx.h5p.com/content/yyy or https://h5p.org/h5p/embed/yyy the button should add the HTML code above:

        

      <iframe src="https://xxx.h5p.com/content/yyy/embed" width="www" height="hhh" frameborder="0" allowfullscreen="allowfullscreen" allow="geolocation *; microphone *; camera *; midi *; encrypted-media *"></iframe><script src="https://xxx.h5p.com/js/h5p-resizer.js" charset="UTF-8"></script>

       

      or

       

      <iframe src="https://h5p.org/h5p/embed/yyy" width="www" height="hhh" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
      <script src="https://h5p.org/sites/all/modules/h5p/library/js/h5p-resizer.js" charset="UTF-8"></script>
       

       

       

      Tasks:

      • Create a basic skeleton H5P filter
      •  Add/Edit filter's settings: default width and weight. Default values for geolocation, microphone, camera, midi and encrypted-media permissions.
      • Prepare filter to convert URLs into a player: URL from a domain (no package) - Use H5P.org/.com embed code to render
      • Privacy: No user data

            vmdef Victor Déniz Falcón
            amaia Amaia Anabitarte
            Amaia Anabitarte Amaia Anabitarte
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 days, 30 minutes
                1w 3d 30m

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