Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.9.3
-
Fix Version/s: DEV backlog
-
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 ![]()
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