I have a rather confusing problem. Let me try to put it as simply as possible.
I have two major problems right now with the left container.
1) I have embedded a small flash player(the most basic one with a play/pause and a stop option) into the left container of many of my exercises. It plays all my audio files without any problem when run separately on m computer. But it doesn't work at all when I upload the exercise into moodle (all the required files i.e swf and mp3 files etc are included in the folder too).
2) The 2nd problem is that, I have created this push button in my htm files and have linked it to a function in the _js file. The push button expands the left counter downwards and some text is displayed in that area. When I click on the push button again, the expanded area disappers(along with the text obviously). Now, this is again not working when i try to put it in moodle.
This might be a stupid doubt but just to make sure; I'm reusing [strExerciseSubtitle], which is the variable that holds the subtitle for the text, for the text in the expanded area (in problem 2). Is this effecting the operation by any chance?
Please help ASAP.
Thanks.
Neelima.
Please upload your quiz ASAP to my server so I can investigate ...
- URL: http://bateson.kanazawa-gu.ac.jp/19/mysql/
- Course: Course Fullname 101
- Username: guestteacher
- Password: quizportv09
thanks
Gordon
The first step to fixing your quiz is to remove the spaces from the folder names, file names and relative urls:
- rename folder "How Horsegram Became Flat" to "How.Horsegram.Became.Flat"
- rename file "2 0011.JPG" to "2.0011.JPG"
- rename file "How Horsegram Became Flat.mp3" to "How.Horsegram.Became.Flat.mp3"
- edit file "St5ex1.htm"
- replace all "2 0011.JPG" with "2.0011.JPG"
- replace all "How Horsegram Became Flat.mp3" with "How.Horsegram.Became.Flat.mp3"
Thanks for that! The sound is working perfectly now.

But the push button in the left container is still not working.
This is what I want it to do;
When I click on the push button that says "Click to Read/Hide Story", I want the whole left counter to extend downwards and the text appearing in that extended area. Nothing else changes. The right counter remains as it is, the top portion of the left container(above the push button) remains same.
But as you can see, what is happening is;
-When I click on the button (that says "Click to Read/Hide Story"), only the text is appearing outside of the left container (i.e in the background area). The left container is not extending.
-Also, when I click on the button that says "Show all Questions" in the right container, the left container is extending downwards too. The button "Show all Questions" is somehow effecting the left container too, even though 2 separate functions are being used for both of them.
Plz tell me what the problem is.
Neelima.
> only the text is appearing outside of the left container
Then you need to write the javascript to stretch the left container. An easy way to do that is to call the StretchCanvasToCoverContent() function.
> Also, when I click on the button that says "Show all Questions" in the right container,
> the left container is extending downwards too.
Good, that is what is supposed to happen. If you want to do something different, then you will have to modify the StretchCanvasToCoverContent() function.
Gordon
> Its syntax ...
StretchContentToCoverCanvas() is a javascript function that QuizPort uses to make sure the page canvas covers the page content that is currently displayed to the user. It is necessary to call this function when the content of the page changes in order for the Moodle footer to be positioned just below the visible quiz content.
this function does not take any arguments. you call it just like this:
- StretchContentToCoverCanvas()
Please be more specific

Gordon
var shown = null;
function show(it) {
if (shown == null)
{shown = document.getElementById(it);}
else
{if (shown.id != it)
{shown.style.display = "none";
shown = document.getElementById(it);}
}
shown.style.display = (shown.style.display == "none") ? "block" : "none";
}
Here, "it" contains the text to be displayed. This works fine outside moodle (in hotpotatoes), but it doesn't work when I upload the exercise in moodle. How come?
When you have a situation such as your 5th screenshot where the container does not cover the page content, copy and paste the following to your browser's address bar ...
- javascript:alert(StretchCanvasToCoverContent(true))
... then hit your Enter key, and you will find that the container is automatically adjusted to cover the content.
The above line will also fix the situation such as your 3rd screenshot, where the container goes too far down the page.
Plzz try the above, confirm that it works, and then consider for yourself what you need to do to fix your custom javascript so that it calls StretchCanvasToCoverContent(true) at the appropriate time. i.e. just after the custom content is shown or hidden.
P.S. If you do not like the left and right containers always being the same length, you should create your own version of StretchCanvasToCoverContent() which behaves the way that you want. In case you haven't been able to find it yet, I have included a copy of the function in the attached file.