Images in Millionaire

Images in Millionaire

by Kim Sihota -
Number of replies: 4
I have not checked this carefully yet because I thought someone might have an easy answer. Images in questions do not display in the game. When I check the link I get something like this:
http://mysite/moodle/mod/game/%5C%22http://mysite/moodle/question/ppg/examview/sp8ch3/nar002-1.jpg%5C%22

For some reason http://mysite/moodle/mod/game/%5C%22 seems to be the problem as the end of the link is correct.

I have not yet checked if the same happens in the other games yet. I have downloaded the latest version of the modules and am using 1.9.2+

If I get a chance I'll look into this more closely tomorrow.

Kim
Average of ratings: -
In reply to Kim Sihota

Re: Images in Millionaire

by Vasilis Daloukas -
Picture of Particularly helpful Moodlers Picture of Plugin developers
I fixed the problem. Wait one day and download the new game.zip
In reply to Vasilis Daloukas

Re: Images in Millionaire

by Kim Sihota -
I Changed the line in play.php that you did

$question = str_replace( '\"', '"', $query->questiontext);

and the first image displayed properly. When I went on, the next image failed as well. the path now displays:

http://mySite/moodle/mod/game/ppg/examview/sp8ch3/nar001-1.jpg

the error appears to be with the insertion of /mod/game instead of /question
(http://mysite/moodle/question/ppg/examview/sp8ch3/nar001-1.jpg)

Did you make other changes other than the one line?

Kim
In reply to Kim Sihota

Re: Re: Images in Millionaire

by Vasilis Daloukas -
Picture of Particularly helpful Moodlers Picture of Plugin developers
I think the problem is the relative path of image file instead of absolute.
Moodle 1.9 uses absolute path when the teacher inserts an image. Which version you use?
You can try appending the line $question = str_replace( 'mod/game', 'question', $question) after the previous change.
In reply to Vasilis Daloukas

Re: Re: Images in Millionaire

by Kim Sihota -
Thanks Vasilis,

I'm using 1.9.2+
That seems to fix the problem.

Kim