Add video to Moodle

Asked

Viewed 79 times

2

I’m trying to find out how I added my video in Moodle, using the SRC directory.

I have my own theme, and in it will contain a fixed box with a video. I would like to implement this video in my normal HTML5 code with the tag video.

I’m getting lost in the directory. Does anyone know what it’s like?

1 answer

2

Moodle 2.6 has a function of the $OUTPUT object called pix_url that takes the name of the image, however it would not work for the video, another option would be to use some variables and functions of Moodle to get the path to the theme folder where your video is probably something like

<?php echo $CFG->wwwroot.'/theme/'.current_theme() ?>

Doing this you will have a URL that directs to your theme folder, ai is add /camiodovideo/

Looking at the internal code of Moodle itself holds this variable for many of its libraries like the /lib/outputrenderers.php itself and the /lib/pagelib.php, so it’s pretty safe to use.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.