Masher navigation bar gives an error

Masher navigation bar gives an error

by Bente Olsen -
Number of replies: 12
Picture of Testers Picture of Translators
I have made a HotPot quiz with Masher that I have added into two similar Moodle installations on the same server. However one works fine while the other fails.

It is the Masher navigation bar that can not be used. If I click on a navigation button I get:

Not Found

The requested URL /Farver_2.htm was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.25 Server at www.danskonline.dk Port 443

What goes wrong here?

Attachment Masher-error.png
Average of ratings: -
In reply to Bente Olsen

Re: Masher navigation bar gives an error

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Bente,

perhaps you need to add "Farver_2.htm" as a HotPot in the Moodle course? Or did you already do that?

If you continue to have problems, please upload the quizzes to my server, or give me teacher access to your Moodle site, so I can investigate.

thanks
Gordon

In reply to Gordon Bateson

Ang: Re: Masher navigation bar gives an error

by Bente Olsen -
Picture of Testers Picture of Translators
Hi Gordon

Thank you very much, I will return tomorrow.

Bente
In reply to Gordon Bateson

Ang: Re: Masher navigation bar gives an error

by Bente Olsen -
Picture of Testers Picture of Translators
Hi Gordon

I have tested my HP on your site, works fine.
So now I have added you as a teacher here www.danskonline.dk
user: gordon
pw: gbateson
There has to be a difference between my two installations, I just can't figure out what it might be.

Thanks a lot
/Bente

In reply to Gordon Bateson

Ang: Re: Masher navigation bar gives an error

by Bente Olsen -
Picture of Testers Picture of Translators
I got the idea to backup the well working Masher and restore it to the other Moodle installation, but sad, same sad result
In reply to Bente Olsen

Re: Ang: Re: Masher navigation bar gives an error

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Bente,
I think you may have more success if you do NOT use the masher files, such as "farver/index.htm on your site.

Instead, I suggest you add all the Hot Potatoes exercises as individual HotPot activities in your Moodle course.

If you want to add many HotPots from the same folder at once, you can do that if you specify a folder name in the "File name" field when adding a HotPot activity, and set "Add quiz chain" to "Yes".

If you also set the "Show next quiz" setting to "yes", then on the Moodle course page, only the first HotPot will be visible to the students. However, when the first HotPot is finished, the next HotPot will be shown to the students automatically. I have set up such a HotPot chain in the first section of your course, so you can see what I am talking about.

The "Hot Potatoes quiz buttons" navigation setting doesn't seem to work very well on your quiz chain, so while I investigate that I have switched the navigation to "Moodle navigation bar".

regards
Gordon
In reply to Gordon Bateson

Re: Ang: Re: Masher navigation bar gives an error

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Bente,
I have discovered the cause of the "<=" and "=>" buttons not working in the HotPot module.

If you have the site slasharguments (Site Admin -> Server -> HTTP -> Use slash arguments) enabled, then the buttons work, but when the slasharguments are disabled, the buttons do not work.

I am just investigating whether this can be fixed.
Gordon
In reply to Gordon Bateson

Re: Ang: Re: Masher navigation bar gives an error

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hello again,
as I said earlier the cause of the problem was disabling slasharguments.

To be specific, disabling slasharguments introduces a question mark, "?", into the URLs which was interfering with the regualr expression to match URLs in the "hotpot_convert_navbutton_url()" function in "mod/hotpot/lib.php".

You will be pleased to know that I have fixed the problem. If you wish to use the Hot Potatoes quiz buttons, "<=" and "=>", to navigate through a chain of HotPots on a Moodle site with "slasharguments" disabled, you can now do so - approve

One important point to bear in mind, is that when attempting to convert a URL in a Hot Potatoes navigation button, the HotPot module will replace the URL in the button with a URL to the first HotPot it finds that uses the Hot Potatoes quiz file specified in the link.

For example, the "=>" in the "Farver_1-DD.htm" quiz contains the following URL ...
  • Farver_2.htm
The HotPot module will search through all the other HotPots in this course, and try to find a HotPot that uses the "Farver_2.htm" file. If it finds any (and there might be more than one), it will insert a URL to the first HotPot that it finds, e.g.
In other words, if you have several Moodle HotPot activities using the same Hot Potatoes quiz file (e.g. Farver_2.htm) and you are navigating between quizzes with the "<=" and "=>" buttons, you may not always go to the HotPot you expect.

Probably that has confused people ... mixed

In short, this problem is fixed - I think, and thanks very much for bringing it to my attention and allowing me to experience it firsthand on your site.

Gordon

P.S. By the way, I was in Copenhagen on Christmas day last year (2007) surprise. What a lovely city and very friendly people!
In reply to Gordon Bateson

Re: Ang: Re: Masher navigation bar gives an error

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
I forgot to say, I have applied this fix to all versions of the HotPot module from Moodle 1.6 - 1.9, and the HEAD branch of the CVS repository (which will one day become Moodle 2.0).

The modified scripts will available from CVS or the Moodle downloads page in due course - maybe within 24 hours, but maybe after the next "Tuesday code checkins" session at Moodle HQ.

regards
Gordon
In reply to Gordon Bateson

Ang: Re: Ang: Re: Masher navigation bar gives an error

by Bente Olsen -
Picture of Testers Picture of Translators
Hi Gordon

What a job you have done, thank you very much! And thanks for the nice words about our capital and people smile

I would never have discovered that it was the slasharguments that causes the problem and I do not know why I have them disabled in one installation and not in the other. Sometimes you certainly can learn a lot when you ask for help here in these forums - or you can update your knowledge about what you do not know wink

One important point to bear in mind, is that when attempting to convert a URL in a Hot Potatoes navigation button, the HotPot module will replace the URL in the button with a URL to the first HotPot it finds that uses the Hot Potatoes quiz file specified in the link.

I can confirm this while I added modified files (HotMot/farver/Farver_2.htm instead of hotpot/farver/Farver_2.htm) in the 'head' sektion and the last sektion on the course. Then I deleted the hotpot in the head sektion and the problem disappered forever - also after adding the modified HotPot file in the head sektion again! You can see this in my test course.

Anyway I think I will follow your suggestion and use the setting 'continue to next quiz' together with the navigation bar and by specifying the hotpot map.

Again, lots of thanks!

Bente



In reply to Bente Olsen

Ang: Re: Ang: Re: Masher navigation bar gives an error

by Bente Olsen -
Picture of Testers Picture of Translators
An additional question: Can you control the order of the quizzes when you want to add a quiz chain? When I add it in the test course the order is right but in another course it begins with Farver_3 or Farver_2 and ends with Farver_1 or Farver_3
In reply to Bente Olsen

Re: Ang: Re: Ang: Re: Masher navigation bar gives an error

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

> Can you control the order of the quizzes when you want to add a quiz chain?

The quizzes are selected in the order that the operating system gives them to PHP. This order depends on the operating system. Sometimes, it is alphabetical order; sometimes it is the order in which the files were uploaded. It could be some other order.

Perhaps it would be more useful to always add the quizzes in alphabetical order. What do you think?

Gordo

In reply to Gordon Bateson

Ang: Re: Ang: Re: Ang: Re: Masher navigation bar gives an error

by Bente Olsen -
Picture of Testers Picture of Translators
Yes, that is probably a good idea