Flashcard "give up" button in 1.8

Flashcard "give up" button in 1.8

James Phillips -
回帖数:16
Hi all,

I have a couple of problems with the hotpot module on 1.8.

When I make a flashcard exercise the "give up" button doesn't work (it works fine for gapfil and drag and drop exercises). This problem has repeated both on a local install (using easyphp) and on a remote site. It is also the same with Firefox/IE.

Also, the "give up" button itself is not being detected as being unicode and is appearing in garbled form when the site language is switched over to Japanese.

Does anybody have any ideas about these problems?

Best regards,

James Phillips

PS The new (August?) Hotpot module sounds like it will be amazing!


回复James Phillips

Re: Flashcard "give up" button in 1.8

Gordon Bateson -
Core developers的头像 Peer reviewers的头像 Plugin developers的头像
Dear James,
I am not sure that the FlashCard exercises were intended to be used with the HotPot module. They don't give a score do they? I can't remember clearly.

Anyway, please could you upload the quiz to my server, so I can take a look:
many thanks
Gordon
回复Gordon Bateson

Re: Flashcard "give up" button in 1.8

James Phillips -
Dear Gordon,

Uploaded! Thank you. I know I could also put the flashcards in as a resource but I just wanted to keep consistency between the exercises by having them all escaped using the "give up" button.

Best regards,

James Phillips
回复James Phillips

Re: Flashcard "give up" button in 1.8

Gordon Bateson -
Core developers的头像 Peer reviewers的头像 Plugin developers的头像

Thanks for uploading the file. For the time-being, I have fixed and bodged the "mod/hotpot/hotpot-full.js" so it will not try to calculate a score for Flashcards made with JMatch from Hot Potatoes 6.

For the next couple of days, you can download the modified "hotpot-full.js" for from here:
http://bateson.kanazawa-gu.ac.jp/moodle/18/ms/mod/hotpot/hotpot-full-jp.js

I don't think I will make this a permanent change because it is rather messy. Instead, I will make the new HotPot module better at recognizing when it doesn't have to do anything, as this will also cover the case of JGloss (a Michael Rottmeier adaption of JCloze), and there might be others.

all the best
Gordon

回复Gordon Bateson

Re: Flashcard "give up" button in 1.8

James Phillips -
Thanks Gordon! I will give it a whirl and let you know how I get on!
Best regards,

James Phillips
回复James Phillips

Re: Flashcard "give up" button in 1.8

James Phillips -
Dear Gordon,
I just gave it a go. What happens now is that the "give up" button doesn't work for the last quiz of a chain. I have three quizzes chained together with the first two set to "show next quiz". The flashcard quiz now works, as does the second, but the third no longer works. Allow review is set to "no" in all cases. Have I made a mistake with something simple?

Best regards,

James Phillips
回复James Phillips

Re: Flashcard "give up" button in 1.8

Gordon Bateson -
Core developers的头像 Peer reviewers的头像 Plugin developers的头像
It's a little difficult to diagnose via this forum. Could you tell me the URL, privately if you like, so I can have a look at the quiz which is misbehaving.

thanks
Gordon
回复Gordon Bateson

Re: Flashcard "give up" button in 1.8

Gordon Bateson -
Core developers的头像 Peer reviewers的头像 Plugin developers的头像

Hi James,
thanks for letting me access your site. I have furhter fixed your hotpot-full.js, so that the modifications to let FLashCards work, do not interfere with the other types of quiz. It should all work OK now.

The Japanese "Give Up" appeared because the encoding for the HotPot htm file is "iso-8859-1", but the Japanese messages are encoded as unicode. If your browser shows garbled characters, you will need to tell (=force) it to use the unicode encoding when displaying that page.

A more permanent fix would be to open up the htm file and locate the following line:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Then change the above line to:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Probably, the HotPot module should do that for you, and I might make that change in the near future.

all the best
Gordon

回复Gordon Bateson

Re: Flashcard "give up" button in 1.8

Gordon Bateson -
Core developers的头像 Peer reviewers的头像 Plugin developers的头像

Hi James,
I have modified the "mod/hotpot/view.php" on your site so that the Japanese "Give Up" buttons display OK now. This will be a useful fix for other languages too, so thanks very much for pointing it out.

In due course I will update the HotPot module script on the Moodle CVS so that everybody has accessto the fix.

Gordon

回复Gordon Bateson

Re: Flashcard "give up" button in 1.8

James Phillips -
Great! Thanks Gordon! All your hard work is much appreciated. Looking forward to seeing the new hotpot module and if you need any help testing just let me know.

Best regards,

James Phillips
回复James Phillips

Re: Flashcard "give up" button in 1.8

Gordon Bateson -
Core developers的头像 Peer reviewers的头像 Plugin developers的头像
Just a note to say that I have updated Moodle 1.6, 1.7, 1.8 and 1.9 (=HEAD) to the fix to the display of the HotPot "Give Up" button in languages, such as Japanese, which use more than the basic ascii character set.
回复Gordon Bateson

Re: Flashcard "give up" button in 1.8

James Phillips -
Just a quick note to say that this problem returned after I upgraded to 1.8.2. I am about to try and fix it, but if I don't manage to, I may well be back soon!
Cheers,
James Phillips
回复James Phillips

Re: Flashcard "give up" button in 1.8

James Phillips -
Is it safe for me to just copy over the version of hotpot I used previously on my 1.8+ installation, or have any substantial changes been made?

Best regards,
James Phillips
回复James Phillips

Re: Flashcard "give up" button in 1.8

Gordon Bateson -
Core developers的头像 Peer reviewers的头像 Plugin developers的头像

Sorry which problem returned? The "Give Up" button appearing garbed, or the fact that "Flash Cards" don't work?

I have checked the "mod/hotpot/view.php" and the fix for non-ascii characters in the Give Up button are still there, so that should still be working.

The fix for Flashcards I made on your site, and on your site only. I modified the hotpot-full.js so that it doesn't try to send results for Flahs card exercises. Sorry if I wasn't clear, but I did not apply this fix to the publicly available HotPot module. I cannot remember off the top of my head if any further changes have been made to hotpot-full.js since I modified your site, but the first thing I suggest you do is move across the old hotpot-full.js to the new site.

regards
Gordon

回复Gordon Bateson

Re: Flashcard "give up" button in 1.8

Fritz Richter -
Dear Gordon,

I'm faced with the the same problem. The "give up" button is not working in 1.8.2. Could you let me know the necessary changes in hotpot-full-jp.js.

Best,

Fritz
回复Fritz Richter

Re: Flashcard "give up" button in 1.8

Gordon Bateson -
Core developers的头像 Peer reviewers的头像 Plugin developers的头像
> I'm faced with the the same problem.
> The "give up" button is not working in 1.8.2

I assume you mean the "Give Up" button is working as expected on all types of exercise produced by Hot Potatoes 6, except Flash Card exercises. Is that right?

The HotPot module was never intended to work with the JMatch Flashcard format, because the Flashcard format does not produce a "score" and there is no information about which words were shown or whether the student was able to give a correct response or not.

If the FlashCard exercise is not in a "chain" of other HotPot exercises, then I suggest you add the FlashCard exercise as a Moodle "Resource" activity, rather than as a "HotPot" activity. Then you will not have to mess with the scripts and you can rest assured that your site will have no problems upgrading in the future.

However, I understand that you probably have good reasons to want to implement this modification so without further ado, here is the link to the amended file: hotpot-full.flashcard.js


regards
Gordon

P.S. If you do not already have software for finding differences between two files, I can recommend WinMerge to find out which lines in the attached file are different from the standard hotpot-full.js