Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Inactive
    • Affects Version/s: 1.9.3
    • Fix Version/s: DEV backlog
    • Component/s: Filters, General, Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      Our teachers want students to be able to embed videos from youtube, googlevideo, etc. We've been searching for solutions like MultiMovie (thanks to Eloy ) filter but thought that maybe letting them to embed object and embed tags directly from this sites will be better and less error prone.

      We've made a preliminary modification in clean_text() function that allows them to cut and paste the object code from three popular sites: youtube, google video and teachertube (like Multimovie). Currently just works with kses not html purifier, but works like HTML Purifier Youtube filter ( http://htmlpurifier.org/docs/enduser-youtube.html ):

      1. Find video embedding codes
      2. Extract the video id
      3. Replace each object with a span with each video id
      4. Clean object and embed tags
      5. Substitute the spans with our custom embedding code (the original embed or object isn't preserved)

      We've attached a patch against 1.9.3+ from weblib.php. It's a preliminar work just to start discussion... maybe there's a better solution.

      Thanks in advance,

      Juan

        Gliffy Diagrams

        1. weblib.patch.php
          4 kB
          Juan Segarra Montesinos
        2. weblib.php.2.patch
          1 kB
          Juan Segarra Montesinos

          Activity

          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Assigning to Petr for his consideration. Perhaps it would be a good idea to have some configuration option to be able to add sites from which we allow the object and embed tags? Empty by default, of course (current behaviour).

          That way each site could control those tags a bit better IMO.

          Ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Assigning to Petr for his consideration. Perhaps it would be a good idea to have some configuration option to be able to add sites from which we allow the object and embed tags? Empty by default, of course (current behaviour). That way each site could control those tags a bit better IMO. Ciao
          Hide
          jsegarra Juan Segarra Montesinos added a comment -

          It'll be nice to have this kind of configuration

          I've been playing a little and implemented some sort of video embedding provider filters. See weblib.path.2.php and the zip included wich implements a videoembedding subsystem under lib directory. It contains some utility functions and a base class that serves as interface to "video embedding providers". There's a sample implementation for youtube, googlevideo and teachertube.

          Configuration can be done by adding a multichoice setting in security admins tab... i'll try to provide one.

          Thanks in advance,

          Juan

          Show
          jsegarra Juan Segarra Montesinos added a comment - It'll be nice to have this kind of configuration I've been playing a little and implemented some sort of video embedding provider filters. See weblib.path.2.php and the zip included wich implements a videoembedding subsystem under lib directory. It contains some utility functions and a base class that serves as interface to "video embedding providers". There's a sample implementation for youtube, googlevideo and teachertube. Configuration can be done by adding a multichoice setting in security admins tab... i'll try to provide one. Thanks in advance, Juan
          Hide
          jsegarra Juan Segarra Montesinos added a comment -

          weblib.php.2.patch uses the videoembedding subsystem implemented in videoembedding.zip

          Show
          jsegarra Juan Segarra Montesinos added a comment - weblib.php.2.patch uses the videoembedding subsystem implemented in videoembedding.zip
          Hide
          marina Marina Glancy added a comment -

          We have detected that this issue has been inactive for over two years and also did not collect many votes. It is possible that it has been already implemented in a more recent version of Moodle, or it is not highly demanded. There are unlimited number of ways Moodle functinality can be expanded and improved but we would like to concentrate on the features that will benefit majority of users, and which can not be implemented as plugins. If you have a suggestion for improving Moodle core, and there is no open issue for it in the tracker, please start a new forum discussion to see how many other users agree with you, and then create a new issue providing as many details as possible.

          ==BLK2YIMP20141121==

          Show
          marina Marina Glancy added a comment - We have detected that this issue has been inactive for over two years and also did not collect many votes. It is possible that it has been already implemented in a more recent version of Moodle, or it is not highly demanded. There are unlimited number of ways Moodle functinality can be expanded and improved but we would like to concentrate on the features that will benefit majority of users, and which can not be implemented as plugins. If you have a suggestion for improving Moodle core, and there is no open issue for it in the tracker, please start a new forum discussion to see how many other users agree with you, and then create a new issue providing as many details as possible. ==BLK2YIMP20141121==

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: