Removing iFrame tags from myreport.php

Removing iFrame tags from myreport.php

by Lachlan Hickey -
Number of replies: 12

Hi There,

I have vimeo videos/iframes embedded within the questionnaire which is displaying on the myreport.php page.

Is there some easy way I can get rid of the iframes, specifically on the myreport.php page only?

Average of ratings: -
In reply to Lachlan Hickey

Re: Removing iFrame tags from myreport.php

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Lachlan,

"I have vimeo videos/iframes embedded within the questionnaire which is displaying on the myreport.php page."

Sorry, I do not understand. Do you mean you have questionnaire questions with videos embedded in the question text?

Please provide screenshots explaining your problem.

Joseph

In reply to Joseph Rézeau

Re: Removing iFrame tags from myreport.php

by Lachlan Hickey -

Hi Joseph,

Sorry, I thought I put more detail, obviously not.

So, I have vimeo videos embedded as a 'Label' within a questionnaire, which, in turn, is displaying on the myreport.php page, as Moodle assumes the 'Label' is part of the questionnaire.


Does that make a little more sense?

I have attached some screenshots to attempt to make some more sense.

https://www.dropbox.com/s/yrd7bhp9swd0419/questionnaire_editQuestionsPage.png 

https://www.dropbox.com/s/q1cizlkfkc2nl4p/myreport_page.png

In reply to Lachlan Hickey

Re: Removing iFrame tags from myreport.php

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Lachlan,

Well, you did not mention the videos were embedded in a label question type. Labels are not real questions, of course, but they are an integral part of a questionnaire and consequently are displayed on the report pages as well as the other questions and responses.  There is no way to remove them from the display, unless you are prepared to hack your questionnaire files. If so, you'll have to mention the complete version number you are using.

Joseph

In reply to Joseph Rézeau

Re: Removing iFrame tags from myreport.php

by Lachlan Hickey -
Hi Joseph,


Very much appreciate your help. I can and will hack the code. 


Moodle2.6.1+ (Build: 20140123)

In reply to Lachlan Hickey

Re: Removing iFrame tags from myreport.php

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Which exact version of Questionnaire do you have installed (version and build number)?

In reply to Joseph Rézeau

Re: Removing iFrame tags from myreport.php

by Lachlan Hickey -

Bump

In reply to Lachlan Hickey

Re: Removing iFrame tags from myreport.php

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

It should be pretty easy to make a hack to prevent the display of all labels (irrespective of their contents) on the report pages. Please say if what you want is to remove the labels from those report pages I have highlighted in red, and retain labels on the other (All responses) report pages.

Joseph

screenshot #1

In reply to Joseph Rézeau

Re: Removing iFrame tags from myreport.php

by Lachlan Hickey -

Yes, simply those reports listed.

Thanks

In reply to Lachlan Hickey

Re: Removing iFrame tags from myreport.php

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Please find attached a patch file against questionnaire 2.6.5 (Build - 2014041802).

Please apply (on development server) and report if it works for you.

Joeph

In reply to Joseph Rézeau

Re: Removing iFrame tags from myreport.php

by Lachlan Hickey -

Fantastic! This works great! Thank you so much for your assistance Joseph!!!