Reading Text from JQuiz not displaying the whole passage when"Show questions one by one"

Re: Reading Text from JQuiz not displaying the whole passage when"Show questions one by one"

by Gordon Bateson -
Number of replies: 1
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
> Do you know about the reasons?

Yes - more or less.

Moodle tries to use XHTML, in other words strict HTML. This allows you to get a more uniform look across browsers, but the HTML has to confirm to certain specifications.

The <?xml ...> line is part of the XHTML specification, so browsers should not worry about it. However, IE6 does not like it. It panics when it sees this line, and switches itself to non-strict mode. Most people would agree this is non-standard, non-desirable and unreasonable behavior, i.e. a "bug".

In order to get your Hot Potatoes quiz to behave in the way in which you expect, we added the <?xmx ...> line to the Moodle Themes. This has the effect of switching IE6 into non-strict mode, which is what we want for Hot Potatoes quizzes.

However, all your other Moodle pages also include this line. This switches IE6 into non-strict mode for all pages, so some pages appear differently from what you have come to expect.

What you want to do is add the <?xml ...> line only to the HotPot pages. Perhaps you could change your "header.html" to something like the following:
<?php
if (strpos($_SERVER['REQUEST_URI'], '/mod/hotpot/view.php') !== false) {
echo '<'.'?xml version="1.0"?'.'>';
}
?>
all the best
Gordon
In reply to Gordon Bateson

Re: Reading Text from JQuiz not displaying the whole passage when"Show questions one by one"

by J. Chan -

Hi Gordon

Great! It works. Thanks

Cheers

James