Limiting /hiding check button

Limiting /hiding check button

by Gerry Lerner -
Number of replies: 6

Hi,

I'm working on a way to limit the check button in Hotpot so that it can only be clicked once. I've got it to work in html by modifying the javascript source code according to the great help  I got below. However when I import into moodle it reverts to the source code in the mod/hotpot/source folder.

How do I modify the source code in moodle to produce the same result?

Thanks in advance

 

Gerry



--- In hotpotatoesusers@yahoogroups.com, xxxxxxxl@...> wrote:
>
> Hi
>
> To force the exercise to think it is finished the first time the student
> clicks on the check (finish) button, you need to make one change to the
> javascript
>
> Find this line:
> if ((AllCorrect == true)||(Finished == true)){
>
> and add this line immediately before it:
> Finished = true; //forces activity to end
>
> so you end up with this:
>
> Finished = true; //forces activity to end
> if ((AllCorrect == true)||(Finished == true)){

Average of ratings: -
In reply to Gerry Lerner

Re: Limiting /hiding check button

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

Hi Gerry,

you could try using the HTML file as the source file for the HotPot activity.

Alternatively, you could alter the appropriate file(s) in "mod/hotpot/attempt/hp/6/templates" on your Moodle site, but then you would have to redo your edits if you update or reinstall the HotPot module. Having altered the file(s), you would need to clear the HotPot cache (Moodle -> Settings -> Site administration -> Plugins -> Activity modules -> HotPot module)

regards
Gordon

In reply to Gordon Bateson

Re: Limiting /hiding check button

by Gerry Lerner -

Thanks. I tried using the html as source but it doesn't work the same in moodle. I've created a test version (attached). This works in any browser but not in moodle.

In reply to Gerry Lerner

Re: Limiting /hiding check button

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

Unfortunatey I could not unzip the file you attached to your post sad

In reply to Gordon Bateson

Re: Limiting /hiding check button

by Gerry Lerner -

I couldn't download it either!!

For some reason moodle thinks I'm spamming!!

I'll try and upload from a different server later

In reply to Gerry Lerner

Re: Limiting /hiding check button

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

I have received it now in the personal email you sent. Thanks. I will investigate ...

P.S. out of interest, I have tried attaching it as a zip file to this post. Seems to work OK.

Average of ratings: Useful (1)