Hotpot (add-on)

 
 
Picture of Gordon Bateson
HotPot grades
Group DevelopersGroup Particularly helpful MoodlersGroup Translators
Dear Moodle HotPotters,
thanks as always for using the HotPot module and sending in feedback approve

Over the past year of so, there have been a number of reports of problems with the HotPot grades in the gradebook for Moodle 1.9: too many grade items, not enough grade items, grade items for HotPots whose maximum grade is zero.

Therefore, I have added a general purpose fix for HotPot grades to the latest Moodle upgrade (1.9.4+). When you upgrade to this latest version, the HotPot module will check all the HotPots and all the grade items in the Moodle gradebook, and make sure they are synchronized. It will add/remove/update grade items so that everything should be as it should.

I have tested this upgrade many times on several sites, including "live" sites that have hundreds of HotPots, and I am satisfied that it does what it is supposed to (and no more!). I would also be grateful to hear feedback from you all, to let me know that the fix runs smoothly on your site, if it found any inconsitencies and if it was able to fix them.

Once the update has run, if you continue to find strangeness in the HotPot grades, please report them here. I will do my best to help.

best regards to all
Gordon
 
Average of ratings:Useful (1)
Picture of Steven A.
Re: HotPot grades
Group Particularly helpful Moodlers
Hi Gordon,

"When you upgrade to this latest version, the HotPot module will check all the HotPots and all the grade items in the Moodle gradebook, and make sure they are synchronized. It will add/remove/update grade items so that everything should be as it should."

This is great news; any fixes that help the HotPots module and gradebook communicate more effectively is very much welcome and appreciated.

Can this fix be applied to 1.9.2? I reconfigured a HotPots activity from 'average grade' to 'highest grade', and the HotPots module shows the update, but the new grades aren't showing in the gradebook; it's still the average grade. I've tried regrading, synchronizing legacy grades, etc., but the gradebook refuses to update. I suppose I could manually enter all the scores, but I'd rather have Moodle calculate these things without having to use overrides.

Thanks in advance.
 
Average of ratings: -
Picture of Gordon Bateson
Re: HotPot grades
Group DevelopersGroup Particularly helpful MoodlersGroup Translators
Hi Steven,

> Can this fix be applied to 1.9.2?
Yes. You would apply the fix by upgrading to Moodle 1.9.4+

> the HotPots module shows the update
Could you explain in more detail what you mean here. I would like to know what numbers changed on which page.

> I've tried regrading, synchronizing legacy grades, etc.
Sorry, but I wasn't clear form your post: have you upgraded to Moodle 1.9.4+ yet?

thanks
Gordon


 
Average of ratings: -
Picture of Steven A.
Re: HotPot grades
Group Particularly helpful Moodlers
Hi Gordon,

Thanks for replying.

>> Can this fix be applied to 1.9.2?
>Yes. You would apply the fix by upgrading to Moodle 1.9.4+

I have no plans to upgrade past 1.9.2 for now. Is it possible to update just the mod/hotpot folder? I think I already know the answer, but it doesn't hurt to ask! wink

>> the HotPots module shows the update
>Could you explain in more detail what you mean here. I would like to know what numbers changed on which page.

Sure. The Hot Potatoes Quizzes 'Overview' page, Grade column, shows what I want (Highest grade, and not Average grade). But the 'Grader report' is still showing the average grade, as is the 'User report' when I log in as a student.

 
Average of ratings: -
Picture of Gordon Bateson
Re: HotPot grades
Group DevelopersGroup Particularly helpful MoodlersGroup Translators
Hi Steve,
thanks for clarifying !

> Is it possible to update just the mod/hotpot folder?
Yes. It is not the recommended way of doing things, but there are understandable reasons why it is necessary sometimes.

However, please don't upgrade just yet. I want to investigate what you reported that changing the grading method on a HotPot does not recalcalculate grades in the Moodle grade book. If I can verify that, I will fix it and let you know.

cheers
Gordon


 
Average of ratings: -
Picture of Steven A.
Re: HotPot grades
Group Particularly helpful Moodlers
Hi Gordon,

Thanks for your help. I'll sit tight and hope for the best! smile

 
Average of ratings: -
Picture of Gordon Bateson
Re: HotPot grades
Group DevelopersGroup Particularly helpful MoodlersGroup Translators
Steve,
I think I have found something that would explain what you reported. I will test it out over the weekend and then release it.

thanks again for bringing this issue to my attention.

cheers !
Gordon
 
Average of ratings: -
Picture of Gordon Bateson
Re: HotPot grades
Group DevelopersGroup Particularly helpful MoodlersGroup Translators
Steve,
I have fixed the hotpot/lib.php script so that it recalculates grades for a hotpot after the grading method has been changed. I also modified the upgrade script so that the next time you upgrade the HotPot module, *all* the HotPot grdes will be recalculated - this will catch any HotPots for which the grades on the HotPot Overview report and the Moodle gradebook do not match.

If you want to upgrade just the HotPot module for Moodle 1.9, you can get the latest version from here:
I have tested the modifications and upgrade on my testing server and one of our school Moodle sites, but please let me know how it works for you.

many thanks
Gordon

 
Average of ratings:Useful (1)
Picture of Steven A.
Re: HotPot grades
Group Particularly helpful Moodlers
Hi Gordon,

Thanks very much for working on this over the weekend! smile I've just had the chance to test it out. Here's what happened on a 1.9.2 install on my test server.
  • On the server, I renamed the original hotpot folder so as not to overwrite it
  • Copied the new hotpot folder into the mod folder
  • On the website, I clicked to the frontpage, which triggered a successful upgrade (I expected to have to go into Site Admin/Notifications for this, but I guess not.)
  • Voila, all's good. The changes that result from switching back and forth between 'average grade' and 'highest grade' get reflected in the gradebook. Woot!
There's one glitch though, which will keep me from upgrading: the upgrade crashes the Site Admin/Notifications area. admin/index.php conks out. I get a blank screen. Of course I can navigate "back" in the browser, and the website seems to work just fine, but I've lost the Notifications area. If admin/index.php crashes, won't it be impossible to install other modules? Reverting back to the original mod/hotpots folder gets me back into the Notifications area, but there is a warning: "version mismatch, can't downgrade". But at least I can get back in. However, the gradebook is back to its old behaviour of not updating scores according to how hotpot activities are configured (average or highest grade).
 
Average of ratings: -
Picture of Gordon Bateson
Re: HotPot grades
Group DevelopersGroup Particularly helpful MoodlersGroup Translators
Steve,
nice try, but it sounds like you confused Moodle by keeping the old hotpot folder hanging around. Moodle thought it was a real module, but when it tried to open up the new HotPot folder and the old HotPot folder, it found that the constants and functions all had the same name and that's not usually allowed in PHP. Probably your PHP/Apache error log file has a lot of "cannot redeclare function" messages.

Please try again, but this time zip up t he old HotPot folder so Moodle doesn't get confused:
  1. rename the old hotpot folder to hotpot.old, then zip up that folder to get to hotpot.old.zip
  2. now unzip the latest hotpot folder into your mod folder
That will get rid of the "cannot downgrade" message, and you should be able to see the notifications page too.

all the best
Gordon
 
Average of ratings: -
Picture of Steven A.
Re: HotPot grades
Group Particularly helpful Moodlers
Hi Gordon,

It was a nice try, wasn't it? wink But it makes perfect sense that Moodle would still think the renamed hotpots (hotpot.old) is a real module unless I zip it up. That's a valuable tip for the future! After a bit more local testing I've now got the fix working on my production site, and everything appears to be in order. This dialogue has been a great help. Many thanks!

 
Average of ratings: -
Picture of Gordon Bateson
Re: HotPot grades
Group DevelopersGroup Particularly helpful MoodlersGroup Translators
Well done Steve!
It is good to hear your site is working well and the HotPot upgrade was a success.

thanks again for the feedback and for helping to make the HotPot module better approve
Gordon
 
Average of ratings: -