Hotpot-Module fails in Moodle 1.9 BETA (20070920)

Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Gerhilde Meissl-Egghart -
Number of replies: 16
Hi,
are there any known problems with the Hotpot-Module in 1.9 BETA? In our installation nothing happens when choosing "Hot potatoes quiz" from "add an activity". In 1.8 everything worked fine.
Thanks for your help!
Average of ratings: -
In reply to Gerhilde Meissl-Egghart

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Please confirm you have the very latest Moodle 1.9?

In the meantime, I will download the latest 1.9 and try to reproduce what you have reported.

thanks
Gordon
In reply to Gordon Bateson

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Robert Danzmayr -
We (Gerhilde and me)tested with the latest 1.9beta version that was 2007092002.
best
robert

In reply to Robert Danzmayr

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

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

Thanks. Please confirm you have a file called "mod_form.php" in the "mod/hotpot" folder. Also, if there is a file called "mod.html" you can delete that.

Finally, please switch your site's debugging mode to "DEVELOPER", http://docs.moodle.org/en/Debugging, and see if you get a error message.

thanks
Gordon

In reply to Gordon Bateson

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Robert Danzmayr -
Gordon,
1) there is a file "mod_form.php"
2) there was a file "mod.html", I have deleted it
3) debug mode is now DEVELOPER and shows following error:
Warning: require_once(moodleform_mod.php) [function.require-once]: failed to open stream: No such file or directory in /home/k_hammerm/public_html/moodle_1.9/mod/hotpot/mod_form.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'moodleform_mod.php' (include_path='/home/k_hammerm/auth/dist') in /home/k_hammerm/public_html/moodle_1.9/mod/hotpot/mod_form.php on line 2

additional info:
there is no moodleform_mod.php

seems we are making progress...
thanks,
robert
In reply to Robert Danzmayr

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

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

Hi Robert,
thanks for changing the debugging setting - we are definitely making progress smile

The message means that "course/moodleform_mod.php" could not open "mod/hotpot/mod_form.php". Since you have confirmed that "mod/hotpot/mod_form.php" exists on your server, then it must be that the permissions on "mod/hotpot/mod_form.php" are such that it is inaccessible to PHP.

To fix this problem, I think all you need to do is set the permissions on "mod/hotpot/mod_form.php" to the same as the permissions for "mod/hotpot/lib.php".

Please try that and let us know how you get on.

Incidentally, I have downloaded a fresh copy of Moodle 1.9, installed it and confirmed that I can add HotPot activities, so I am pretty sure you just need to adjust the permissions on your server. The "mod/hotpot/mod_form.php" file is a comparatively new file, which is why it may have different permissions from other files in the "mod/hotpot" folder on your server. 

all the best
Gordon

In reply to Gordon Bateson

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Robert Danzmayr -
Hi Gordon,
mod/hotpot/mod_form.php has already same permission s as
mod/hotpot/lib.php (=644).


I've changed the 2nd line in mod/hotpot/mod_form.php to
require_once ($CFG->dirroot.'/course/moodleform_mod.php');
instead of
require_once ('moodleform_mod.php');

now I get a "Adding a new Hot Potatoes Quiz to topic 1" form but there are still error messages: (now in debug mode ERROR)
Notice: Undefined variable: course in /home/k_hammerm/public_html/moodle_1.9/mod/hotpot/mod_form.php on line 67

Notice: Trying to get property of non-object in /home/k_hammerm/public_html/moodle_1.9/mod/hotpot/mod_form.php on line 67

I could add a hot potatoe successfully.
And changing $course->id to $COURSE->id in line 67 fixed the notice warnings.

moodleform_mod.php is not in the mod/hotpot but in the course directory, so I think mod/hotpot/mod_form.php could only include it if the path is specified. Perhaps in your config the course diretory is part of the include dir?


best
Robert
In reply to Robert Danzmayr

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

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

Great! Excellent! Well done Robert, you have fixed it approve 

I am a little mystified as to why my server didn't give me an error for the include("moodleform_mod.php"). As you say, there must be a path setting somewhere which enables it to be found on my server.

Anyway, you have fixed it. Thanks. I will add the two changes to the Moodle CVS, and they will appear in the zip file on the Moodle downloads page within 24 hours.

best regards
Gordon

In reply to Gordon Bateson

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Stacey Botzang -

Hi there,

I am working with the latest 1.9 beta2 version, (downloaded the latest files yesterday) and I can assign the hotpots in my courses, however I still seem to be missing the link to the gradebook. 

I was drawn to this forum because the error messages as described earlier are still showing up for me.  I checked the above mentioned fixes and they are all included in the latest mod_form.php file that I appear to be using. 

The hotpot exercises I created before, version 1.5 I think, have all upgraded well, and they are linked to the new gradebook.

Any ideas?  (My level of understanding is still very much in the learning stage.)

Thanks in advance.  Stacey

In reply to Stacey Botzang

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Stacey,

> I still seem to be missing the link to the gradebook.

Please explain where you expect to see the "link to the gradebook"

> the error messages as described earlier are still showing up for me

Which of the following error messages are you referring to?
  1. Warning: require_once(moodleform_mod.php) [function.require-once]: failed to open stream: No such file or directory in mod/hotpot/mod_form.php on line 2
  2. Fatal error: require_once() [function.require]: Failed opening required 'moodleform_mod.php' (include_path='...') in mod/hotpot/mod_form.php on line 2
  3. Notice: Undefined variable: course in mod/hotpot/mod_form.php on line 67
  4. Notice: Trying to get property of non-object in mod/hotpot/mod_form.php on line 67
> The hotpot exercises I created before, version 1.5 I think,

Do you mean version 1.5 of Moodle, or version 1.5 of Hot Potatoes?

> and they are linked to the new gradebook

At the beginning or your message you said that you were "missing the link to the gradebook", but here you say that your HotPots are linked to the gradebook, so I am a bit confused as to whether your HotPots appear in the gradebook or not. Please could you confirm.

thanks
Gordon
In reply to Gordon Bateson

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Stacey Botzang -

Sorry,

I started with version Moodle 1.5, and I created hotpot exercises which I am able to see (as empty column or view the marks when completed) when I view or access the gradebook.  The oldies still work and are linked to the gradebook (seemed to handle the upgrade to 1.9 beautifully)

Any New hotpot exercises that I open in my courses (in 1.9) will appear as they should. (Show normally in the course screen, can be opened, appear to score/mark)  However, scores are not recorded and the new hotpots will not even show up in the gradebook/not show as a column.   I would like the new hotpots to be linked to the gradebook.  

Hot Potatoes version 6.. I have not changed this at all.

The errors were #3 and 4, but I think my brother-in-law was able to fix that for me.  I was wondering/hoping if the fact that these notices still showed with an upgraded installation was a clue about a missing "connection" (between the new hotpots and the new gradebook) (Im not sure of the proper terms, but I hope this is almost clear). 

Thank you again,  Stacey.

In reply to Stacey Botzang

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Stacey,
thanks for the clarification.

> The errors were #3 and 4

That' very odd, because on my server, the "mod_form.php" script for the most recent version of the HotPot for Moodle 1.9 does not have variable $course.

> I started with version Moodle 1.5
> Any New hotpot exercises that I open in my courses (in 1.9)

Did you upgrade directly from Moodle 1.5 to Moodle 1.9? That will certainly cause problems. The recommended route for upgrading is to go via the latest release of each of the major versions (1.5 -> 1.6 -> 1.7 -> 1.8 -> 1.9). Furthermore, it is important to migrate the database to Unicode while you are at 1.6 or 1.7.

Please could you clarify which Moodle version you upgraded from to get to Moodle 1.9?

If you have not already done so, please could you set your Moodle site's debugging mode to "DEVELOPER" and enable the reporting of Javascript errors in your browser, and retry viewing one of the new HotPots. If you get any Javascript, PHP or XML errors, please copy and paste it to this forum.

In the meantime, I will try and reproduce the problem I understand you to be reporting, namely that in Moodle 1.9 new HotPots are not added to the gradebook, and scores for attempts at new HotPots are not recorded at all.

thanks
Gordon
In reply to Gordon Bateson

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Stacey,
I downloaded a new Moodle 1.9, installed it, created a course, created a new HotPot and confirmed that a new item for the HotPot appeared in the gradebook. Everything OK so far.

When I attempted the new HotPot as a teacher the score was recored by the HotPot module, but did not appear in the gradebook, because the gradebook does not display scores for teachers (or administrators).

When I attempted the new HotPot as a student, the score was recorded by the HotPot module, and the a new grade did appear for the student in the gradebook.

How about if you attempt the HotPots as a student on your site? Do the grades appear in the gradebook then?

regards
Gordon
In reply to Gordon Bateson

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Stacey Botzang -

Hi Gordon,

I attempted the hotpot as a student, and the score was not recorded in the gradebook.

When I upgraded the moodle, I did upgrade from 1.5, 1.6, 1.7, 1.8 and 1.9 (with the database migration at the level that was indicated in the documentation). 

When I change the debugging mode to Developper, I am afraid that I immediately get the following message, which I guess means I have bigger problems as well.

The XML page cannot be displayed Cannot view XML imput using XSL style sheet.  Please correct the error and then click on the Refresh button, or try again later.  End tag 'div' does not match the start tag 'br'. Error proccessing resource 'http://botzang.hobby-site.com/admin/settings.ph...  </div>--^

It seems that I need to figure this out first before I can get to your questions about viewing a hotpot in that mode.

Right now, I have the debug messages set to All:Show all reasonable PHP debug messages and I am able to navigate the site.

Thank you for your patience.

Stacey

In reply to Stacey Botzang

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Stacey,
glad to hear you upgraded through the main Moodle releases. Everything seems fine there.

> I attempted the hotpot as a student,
> and the score was not recorded in the gradebook.

sorry to hear that. Does the score appear in the HotPot reports?
[ Course page -> Activities block -> Hot Potatoes Quizzes -> Attempts column ]

> Cannot view XML imput using XSL style sheet


this error may well be caused by the theme you are using. If you switch to the "standard" Moodle theme, this error will disappear ... maybe ... I think ... I hope ...

I have modified the HotPot module in Moodle 1.9 within the last few days to improve XHTML compatability, so please download the lastest version (again!) and report back on what happens.

thanks
Gordon
In reply to Gordon Bateson

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Stacey Botzang -

Gordon,

I uploaded the new version and upgraded and it works!  Thank you so much for all your help.  You're the greatest!! 

Very happily,

Stacey

In reply to Stacey Botzang

Re: Hotpot-Module fails in Moodle 1.9 BETA (20070920)

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Stacey,
it's great to hear the grades for your HotPot activities are now being recorded in the grade book. I'm happy about that too!

Thanks also for you kind comments.

best regards
Gordon