Best practice forum (Archived)

Adding images and other media to Program Description

 
Bodo Hoenen
Adding images and other media to Program Description
by Bodo Hoenen - Tuesday, 16 April 2013, 9:41 PM
 

 

I am battling to add images and other media to the Program description box, Currently running a fresh install of Totara 2.2.15

I need to be able to add Images and embed a YouTube video to the program description and have the following issues:

  1. Image issue
    • I am adding images to the program description and it shows fine for me with the URL for the image looking something like this: https://...server.com/pluginfile.php/295/totara_program/summary/0/GPC.png
    • Other users see a broken image and the url for them is something like this: https://...server.com/totara/program/https://totara.community/pluginfile.php/26528/mod_forum/post/70512/GPC.png
  2. Embed YouTube issue
    • I am embedding a YouTube video as I normally do on the course, using the embed code from YouTube.
    • Once I save the changes the embed code is being stripped out.

 

How can I resolve these two issues?


me
Re: Adding images and other media to Program Description
by George Angus - Wednesday, 17 April 2013, 8:12 PM
Group Totara

Hi Bodo,

I got the image to display OK. Is it the same with other links? The issue with the Youtube embed code being stripped out is a security feature inbuilt by moodle - is it possible to upload a video from elsewhere other than using embedding code?

 

regards,

 

George.

Bodo Hoenen
Re: Adding images and other media to Program Description
by Bodo Hoenen - Thursday, 18 April 2013, 8:52 AM
 

 

Hi George

Regarding the image:

  • After further troubleshooting, this is our findings:
    • The image can be seen by all users with correct permissions that access the program directly (I.E not through their required learning page) Example of page URL: https://...server.com/totara/program/view.php?id=1 Example of Image URL: https://...server.com/pluginfile.php/295/totara_program/summary/0/goo.jpg
    • However if a user access the program through the required learning page Example pf page URL: https://...server.com/totara/program/required.php the image url is corrupted, and looks like this: https://...server.com/totara/program/https://totara.community/pluginfile.php/26528/mod_forum/post/70514/goo.jpg
    • We also tested hot-linking images, it seems that hot-linking images works but is obviously not something we want to do.

Regarding embedding of video:

  • Is the program functionality not something that Totara developed? and therefore could this stripping out of code not be disabled? I may not understand the full security implications of it, so forgive me if there is legitimate reason for stripping out that code, but I don't see how the program page is any less secure than a course page where embedding is not stripped out. Is there something I am missing?
  • Is there a work around to this which does not involve adding the video file to the server and having it run from there?
Thank you for you time
Bodo
 
Bodo Hoenen
Re: Adding images and other media to Program Description
by Bodo Hoenen - Thursday, 18 April 2013, 9:05 AM
 

Hi George,

In my previous reply where i provided the example of the image URL, the image url was converted by this forum into a different URL therefore i ahve attached it as a image.

Its the "@@pluginfile@@" in the URL thats causing the issue I believe.

 


me
Re: Adding images and other media to Program Description
by George Angus - Thursday, 18 April 2013, 6:36 PM
Group Totara

Hi Bodo,

These issues are bugs, Ive filed bug reports. The only workarounds I can suggest at the moment is upload the required files to Totara rather than linking to them.

regards,

George.

Yuliya Bozhko
Re: Adding images and other media to Program Description
by Yuliya Bozhko - Tuesday, 30 April 2013, 5:01 PM
 

Hi Bodo,

Just wanted to let you know that fixes for these issues are already in review and will be in the next 2.2 release.

Yuliya