Hi Mary, what do you call a "label" in Questionnaire questions?
If you mean the "name" field of questions, or course you cannot embed videos there, because that "name" field is used as column name when questionnaire data is exported to text to be viewed in a stats package or a spreadsheet.
If, on the other hand, you mean the "Label" question type, it is perfectly possible to embed videos in them.
Please re-state your question using the current questionnaire terminology.
ATB
Joseph
I think you are referring to a label as in a Questionnaire question type, correct? I have just tried adding a video to a label within a Questionnaire on my site and it works fine using the following methods:
- Linking directly to an flv file in the files area
- Linking to a YouTube video by typing in a word, selecting the word and hyperlinking to the YouTube video
- Copying the embed code from YouTube and pasting into the html source of the editor.
Hi Joseph - hi Randy. Yes; I am referring to the label as in a questionnaire question type. I haven't tried youtube as it is banned in my school.
I have tried linking to an flv, a wmv - and just before I came back here now, an mp3 and again they don't display in the label but come up fine in the question text of any of the questions.
Confused (can't see your site as it's blocked!) FYI I am on IE8 on a pc in school (so can't test any other browsers)using 1.9.7 and questionnaire 2008060405
Hi Mary,
Upon further testing with the "label" question type in questionnaire, here are my findings:
Any type of media will be displayed when viewing the questions on the "edit questions" page : links to course files mp3, flv, embedded YouTube, etc.
but, when actually viewing the questionnaire itself, only the youTube videos are displayed, not the links to course files mp3, flv!
this is strange, I will look into it and report further findings here
Joseph
Will be available in plugin download area tomorrow. For anyone in a hurry or who wants to know more, here is the patch. File mod/questionnaire/questiontypes/questiontypes.class.php, around line 1320, replace line in red with line in blue:
echo '
<div class="questioncontainer">
<div class="qnOuter">
<table class="qnInnerTable" style="width:100%" cellpadding="10" cellspacing="1">
<tr>
<td class="qnInnerTd" valign="top"> </td>
<td class="qnInner" style="height:35px">' .
$this->content.'
</td>
</tr>
</table>
</div>
</div>
';
}
with
Well-spotted, Mary!
I too am curious as to how come Randy's works??
Pity of it is, our school Moodle is hosted externally by our regional broadband suppliers so we probably won't be able to get the patch until our next upgrade in several months time!
Oh, so your broadband suppliers get their Moodle patches by stagecoach? horse and cart? clay tablets? Tell them about the instantaneousness of the Internet, they might be interested.
Take heart,
Joseph
I wanted to add that I just visited this thread, applied the update reported in the bug fix CONTRIB-1925, and was still having trouble until I toggled the YouTube embed code to "Use old embed code", so on my site, Moodle 2.02+, the object tages are working in the questionnaire labels but not the iframe tags.
On my site the links to files in the file area work just fine when viewing the survey as a student. If you click on the link in my previous post to the test Questionnaire you will see that the 3rd video down is a link to a file. I set up the Questionnaire so that guests could actually complete the survey by using the "Override permissions" tab on the editing questionnaire page.
Joseph