My problem is not really with the quiz module, but I don't know where else to post this. I am using Moodle 2.5.2. I use the Moodle with live EFL students in a classroom setting, and sometimes use quizzes for guided listening activities. We keep the multimedia plugins filter active on our site, and I have always had my students use the mini audio player that results. However, I have never liked that player because it is difficult to back up or jump forward with any accuracy. I recently discovered that I could make the audio pop up in a separate window using javascript (as below), in which case the browser's default player displays, making it easier to control the audio track.
<p>→ <a title="audio" onclick="window.open('https://dl.dropboxusercontent.com/u/.../trackname.mp3','audio','resizable=yes,width=350,height=150,left='+(screen.availWidth/2-150)+',top='+(screen.availHeight/2-100)+'');return false;" href="http://ktu-e-learn.net">Click to listen</a></p>
This is great, and I am totally satisfied with the results. However, I have found that I cannot do the same thing in a page (made with the page module). For some kinds of listening, I want to make a set of audio tracks available and would like it if each could be popped up in the way described above. When I use the same code in a page, however, clicking on the link takes you to the href; the javascript does not execute. Of course, if I put the resource URL in the href, I get the embedded mini-player and no link at all. I do not want to deactivate multimedia plugins on our site, and I do not want to put all of the audio tracks directly on the course page (where they can be made to pop up with the URL appearance settings) because there are too many of them.
How can I enable javascript in pages?