Sending results by email

88 views
Skip to first unread message

Daniele Passegua

unread,
Apr 15, 2023, 11:38:55 AM4/15/23
to hotpotatoesusers
To anyone it may concern. Since the FormMail.pl file written in Perl no longer worked for me, I asked a freelance programmer to help me rewrite the file in PHP which now works and correctly sends me the results of the HotPotatoes programs. If you want I can send it so you can try to see if it works for you too. Of course I make no guarantees and I wouldn't even be able to help you. I can only say that I insert these commands in HotPotatoes: https://www.miosito.com/formInvio.php and my email address in the CGI Tab of JQuiz and all the other HP programs. Just to try, for example, you can answer this: https://lnx.sinapsi.org/public/Quesiti_Geometria/QuesitiGeometria.htm

Martin Holmes

unread,
Apr 15, 2023, 12:05:12 PM4/15/23
to hotpotat...@googlegroups.com
Hi Daniele,

Many thanks for your kind contribution! I hope other users will find it
helpful.

Cheers,
Martin
> --
> You received this message because you are subscribed to the Google
> Groups "hotpotatoesusers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hotpotatoesuse...@googlegroups.com
> <mailto:hotpotatoesuse...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/hotpotatoesusers/81e8b81d-375a-4352-8b44-24a80a031540n%40googlegroups.com <https://groups.google.com/d/msgid/hotpotatoesusers/81e8b81d-375a-4352-8b44-24a80a031540n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Daniele Passegua

unread,
Apr 15, 2023, 1:56:02 PM4/15/23
to hotpotatoesusers
Many thanks to you Martin for all the valuable work you gave us!
Best wishes, Daniele.

Agnès S.

unread,
Apr 17, 2023, 6:10:57 AM4/17/23
to hotpotat...@googlegroups.com
Hi Daniele,

Very nice from you. I'm sure a lot of hotpotusers will be interested.
I'd like to see the php file and to test it.
I've made your exercise and at the end I briefly saw a pop-up window. Is
it what I was supposed to see?

Cheers
Agnès S.

Colin C Consiglio (vk3ncc) (LT)

unread,
Apr 17, 2023, 9:20:47 AM4/17/23
to hotpotat...@googlegroups.com
Hi Daniele, I would be interested as well... / Colin

Daniele Passegua

unread,
Apr 18, 2023, 7:53:56 AM4/18/23
to hotpotatoesusers
Yes, the small pop up windows tells you that the HotPotatoes results have been sent correctly.

Daniele Passegua

unread,
Apr 18, 2023, 8:00:43 AM4/18/23
to hotpotatoesusers
I put the file here.
You are free to download and test it.
Remember that you must apply the correct location in the tab CGI as in the screenshot.
formcfg.png

Daniele Passegua

unread,
Apr 18, 2023, 8:02:52 AM4/18/23
to hotpotatoesusers
Please let me know if the FormInvio.php is working correctly for you.

Regards, Daniele.

Randy Laws

unread,
Apr 18, 2023, 5:40:19 PM4/18/23
to hotpotatoesusers
Hi Daniele,

This works, but you have to modify the php file to specify the domains or email addresses that it should work with, and also translate some of the Italian to whatever language you are using.  After you do that and put the modified php file on your own server, it works well.  Thanks very much for this.  If anyone needs step-by-step instructions on how to modify the file, just let me know.

Randy

Daniele Passegua

unread,
Apr 19, 2023, 2:22:13 AM4/19/23
to hotpotatoesusers
Exactly Randy. Thanks for your explanations. I'm glad it works for you too!

Agnès S.

unread,
Apr 19, 2023, 3:32:44 AM4/19/23
to hotpotat...@googlegroups.com
Hi,

I don't know the php language so I need some help : where must I put my
email adress in the php file?
Line 13 I can see :
//email di destinazione, mettere qui la propria email


$contenitore = $_POST['recipient'];

I tried different things without any success.

Cheers
Agnès S.

Le 15/04/2023 à 17:38, Daniele Passegua a écrit :

Daniele Passegua

unread,
Apr 19, 2023, 8:01:38 AM4/19/23
to hotpotatoesusers
I also don't know php but I'm able to make some changes:
1) on line 20 replace your own domain, the one where you uploaded the FormInvio.php file

// Il parametro $provenienza indica le possibili provenienze dei dati: indicare
// il proprio dominio nella forma mostrata dall'esempio. l IP è facoltativo.

$provenienza = array ('/sinapsi.org/','/www.sinapsi.org/','lnx.sinapsi.org', 'sinapsi.org', 'www.sinapsi.org');

2) Enter your email, the one where you want to receive the results, in the configuration page of the HotPotatoes program, as in the attached figure.

These two things should be enough for the file to work.invio.png

CDR Randy Laws, USN (Ret.)

unread,
Apr 19, 2023, 8:42:08 AM4/19/23
to Daniele Passegua, hotpotatoesusers
Exactly correct Daniele,

The only thing I would add is that if you want to change the language of the pop-up box that appears after the student answers the questions, here are the lines you need to change:

<p align='center' style='background-color: #f2f2f2;'><font face='Verdana' size='2' color=\"$text_color\">I seguenti dati inseriti nel modulo sono stati invitati correttamente all'indirizzo
$contenitore nel giorno $data alle ore $dataora<br><br></font></p>

I changed mine to:

<p align='center' style='background-color: #f2f2f2;'><font face='Verdana' size='2' color=\"$text_color\">The following data entered into the form has been correctly sent to the address
$contenitore on $data at $dataora<br><br></font></p>

Thanks again Daniele,

Randy


You received this message because you are subscribed to a topic in the Google Groups "hotpotatoesusers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hotpotatoesusers/6c88qm35nno/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hotpotatoesuse...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hotpotatoesusers/d93144a6-73e1-4aa2-ab19-773b8b6cc984n%40googlegroups.com.

Daniele Passegua

unread,
Apr 19, 2023, 1:42:06 PM4/19/23
to hotpotatoesusers
I made these changes few years ago so I forgot I also changed the file:

hp7sendresults.js_

that you'll find here:

C:\Program Files (x86)\HotPotatoes7\source\hp7sendresults.js_

so you may obtain more complete reports (you may translate into your own language):

Esercizio: Quesiti di Geometria
Nome: Manuel
Punteggio: 56%
Inizio: 19/04/2023, 16:35:43
Fine: 19/04/2023, 16:39:19
Indirizzo: https://lnx.sinapsi.org/public/Quesiti_Geometria/QuesitiGeometria.htm

I added the modified hp7sendresults.js_
in the FormInvio.zip that
now you may download from here:
https://drive.google.com/file/d/1N2j9WFZNVhM9zxdxH9HveyV18NufYLxU/view?usp=share_link

Agnès S.

unread,
Apr 20, 2023, 4:04:13 AM4/20/23
to hotpotat...@googlegroups.com
It works !

Problems were due to my Internet Access Provider (free.fr).
First it seems that the function date_default_timezone_set() is unknown
for him so I got :
"Fatal error: Call to undefined function: date_default_timezone_set() in
/mnt/116/sdb/e/0/hpaddons/formInvio_fr.php on line 300".

After having commented the line 300 everything seemed OK:
"Les données suivantes saisies dans le formulaire ont été envoyées
avec succès à l'adresse agnes...@gmail.fr aujourd'hui."
But there was nothing in my email box...

In fact my IAP (free.fr) only accepts to send an email to the address
corresponding to the site where the php file is.

Thanks all of you.
Cheers,
Agnès S.
> $provenienza = array ('*/sinapsi.org/
> <http://sinapsi.org/>','/www.sinapsi.org/
> <http://www.sinapsi.org/>','lnx.sinapsi.org
> <http://lnx.sinapsi.org>', 'sinapsi.org <http://sinapsi.org>',
> 'www.sinapsi.org <http://www.sinapsi.org>*');
>
> 2) Enter your email, the one where you want to receive the results,
> in the configuration page of the HotPotatoes program, as in the
> attached figure.
>
> These two things should be enough for the file to work.invio.png
> https://groups.google.com/d/msgid/hotpotatoesusers/d93144a6-73e1-4aa2-ab19-773b8b6cc984n%40googlegroups.com
> <https://groups.google.com/d/msgid/hotpotatoesusers/d93144a6-73e1-4aa2-ab19-773b8b6cc984n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "hotpotatoesusers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hotpotatoesuse...@googlegroups.com
> <mailto:hotpotatoesuse...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/hotpotatoesusers/CAHVxoJ1NKtk%3DTmGJGi8%3D%2BvPviw4F9bO0TvK5obu%2BbUYm7QTGJw%40mail.gmail.com
> <https://groups.google.com/d/msgid/hotpotatoesusers/CAHVxoJ1NKtk%3DTmGJGi8%3D%2BvPviw4F9bO0TvK5obu%2BbUYm7QTGJw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

CDR Randy Laws, USN (Ret.)

unread,
Apr 20, 2023, 4:17:33 PM4/20/23
to agnes...@gmail.com, hotpotat...@googlegroups.com
In testing, I'm finding that this script doesn't work for matching exercises.  It seems to only submit when the student gets 100% the first time.  If they get something wrong, it won't allow them to correct it and never submits the score.

Randy

To unsubscribe from this group and stop receiving emails from it, send an email to hotpotatoesuse...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hotpotatoesusers/5948ceac-0e08-97cb-c923-efdedaad4d06%40gmail.com.

Daniele Passegua

unread,
Apr 20, 2023, 5:20:40 PM4/20/23
to hotpotatoesusers
@Randy I tested this my matching exercise:


you're partially right, the final result is sent only if you complete correctly the test,
but even if you make some errors eventually the 80% results are sent, not only if you get 100% at first attempt.
This is what I got into my email:
Esercizio: Passaggi di stato della materia
Nome: daniele
Punteggio: 80%
Inizio: 20/4/2023, 22:48:36
Fine: 20/4/2023, 22:49:15

Daniele Passegua

unread,
Apr 20, 2023, 5:21:27 PM4/20/23
to hotpotatoesusers
sent.png

Martin Holmes

unread,
Apr 20, 2023, 6:01:10 PM4/20/23
to hotpotatoesusers
This worked correctly for me:

Get 100% first time: popup instantly appears.

Get 40% first time: no popup, just regular feedback showing wrong answers.

Correct the wrong answers and check again: popup appears.

I assume the emails were sent when the popup appeared.

Cheers,
Martin

YAYA GMAIL

unread,
Jul 20, 2023, 5:57:31 AM7/20/23
to hotpotat...@googlegroups.com

Hello to all !

Long time since I last posted ! Hope you are all doing well !


Much longer ago, I created fast thoughtful mental calculation exercises for my students. As a reminder, my students are intellectually impaired teenagers and yound adults.

The exercises must be completed within 4 minutes. A countdown timer is displayed at the top of the page to help them manage their time. It works very well!
Examples here : http://ecolepro.free.fr/CALCUL-MENTAL-REFLECHI-RAPIDE/index-calcul-mental-reflechi-rapide.htm

The problem arises when the exercise is completed: the displayed time shows the remaining time out of the initial 4 minutes. My students confuse this displayed remaining time with the time it took them to complete the exercise. They think it's the time they spent on the exercise. Since they are unable to do the calculation, I have to do it for them every time! And this becomes complicated when managing a group of students!

I asked Chat GPT for help, and here's the result it came up with, which I managed to include (see line 1343) in a Jmt HP exercise that I have generated without any timer :

http://ecolepro.free.fr/CALCUL-MENTAL-REFLECHI-RAPIDE/GPT/+20-3.htm

"It seems to work correctly! The set time limit is 4 minutes." The counter automatically stops when the exercise is completed.


But it does not work in a
JCloze HP exercise that I have generated without any timer :

http://ecolepro.free.fr/CALCUL-MENTAL-REFLECHI-RAPIDE/GPT/+10-1.htm
(counter does not show up at all !)


My question is as follows:

Is it possible to include this chat GPT functionality :

- as a stand alone counter in a JCloze HP exercise ?

- in an exercise that already has a JCloze HP countdown timer, so that both functionalities (elapsed time and remaining time) can be displayed simultaneously? This would be very useful for my students to quickly and independently track their progress.

Thank you in advance for your kind assitance !

Kind regards from France !
Olivier
http://ecolepro.free.fr/

Sans virus.www.avast.com
Reply all
Reply to author
Forward
0 new messages