jeffpiazza / derbynet

Open-source Pinewood Derby race management, built around a web server and database
MIT License
98 stars 72 forks source link

Feature request/enhancement: Add award voting kiosk #280

Open Spaaaaaaaace opened 8 months ago

Spaaaaaaaace commented 8 months ago

First off I’d like to mention how amazing DerbyNet is. Our pack has used it the past two years and it has impressed everyone in attendance. You have my thanks for developing such a useful and intuitive solution.

For each of our dens our pack gives out a “Coolest Car” award. This award is only voted on by members of that den. We’d like a kiosk set up where each den member can come up and place a vote one after another. Currently DerbyNet won’t easily allow a device to vote more than once so this hasn’t be feasible for us and opening up to the standard voting mechanic would allow for those outside of the den to potentially cast votes skewing the results. We have been resorting to den members writing down their vote and then manually tallying them and assigning the award accordingly. A separate kiosk for a vote station that would be monitored by an organizer would vastly streamline this process.

Once again, thank you for all of the work you have put into DerbyNet. It is truly an amazing solution for running pinewood derby events.

MeepBeep commented 8 months ago

I came here to ask for the same feature, it would be great as all our design categories are voted on by the kids and parents on race day, and since I run the software on a closed LAN voitng online isn't really a viable option and even if it was a lot of the younger kids don't have their own devices, so it would complicate families all getting their votes in...

All that said, tonight I worked on a proof of concept I did an ugly hack and have the functionality now as a worst case option, but still feel it would be a good feature to add to the software overall...

What I did for my ugly hack, (that leaves original functionality in tack since I didn't mod any of the original files) is I cloned "vote.php" into a new page called "voting.php", I changed it to include a new "banner2.inc" instead of the original "banner.inc" then I added a script to that new "voting.php" page to strip cookies, in addition to that I changed the "make_banner" variable to some words to tell them to click the 'cast' button to the left to cast their votes... I then created a "save_votes.png" file that is just a photoshop of the original "back-button.png" tha now says "cast" vs "back"

I then cloned "banner.inc" into a new include file called "banner2.inc" and swapped out the back button link (that is now a cast vote button) to go to a brand new "thank_you.htm" page instead of going back, and had it call the delete cookies script when you click the cast button...

What happens now is that I load up my new "voting.php" page (directly linking) on the kiosk (I'll probably have several of them) the new voting page looks pretty much the same as the original voting page, but the back button is now a cast button... The voter does their voting and when they click the "cast" button, it erases all the webpage cookies, and sends them to the new thank you page to let them know their votes were recorded, then it redirects back to the voting page for the next person to vote...

It's an ugly hack but it seems to work 🤣 but like you I would like to see a more eloquent solution built in, I just wanted to do a proof of concept when I was busy watching TV tonight and knocked out something that seems to work from my limited testing...

@Spaaaaaaaace if you need this functionality sooner than later and promise not to laugh at how rough the hack is (it was just a quick proof of concept) I can post up the files... It's by no means a finished solution, it's a proof of concept only, but it does appear to work and as I said it leaves all the original files/pages in tack so no risk of breaking the software...

Spaaaaaaaace commented 8 months ago

@MeepBeep Yes I would like the files! That would be awesome!

MeepBeep commented 8 months ago

@Spaaaaaaaace Here it is, as I said it's a rough proof of concept. not a polished mod... I have only done a little testing but it seems to work as intended... Be aware it has no way to prevent multiple votes obviously... And as I said it doesn't alter the DerbyNet install or any of the original DerbyNet files, it's like an addon... Just copy and paste the 4 files in this zip into the appropriate 3 directories in your DerbyNet install and it should work when you visit the new voting page... Let me know if it works for you...

DerbyNet_Voting_Mod.zip

jeffpiazza commented 7 months ago

Thank you for this. I may have been overthinking this, worrying a lot about preventing unsupervised kids from stuffing the ballot box. A solution that assumes adult supervision to prevent manipulation is much more straightforward.

MeepBeep commented 7 months ago

@jeffpiazza IMO a supervised kiosk works well for small groups where the supervision doesn't get out of hand, or even unsupervised as paper ballots many times are with smaller groups, this also allows scouting groups to push the "honest and trustworthy" traits that scouts are supposed to follow as well... That is where my mind was focused when I did the quick mod, since that is how we already do paper ballots, 100% on the honors system...

A more eloquent solution might be necessary for larger events or more public events though where one is more concerned about ballot stuffing... For that maybe an option to print up mini ballot card sheets that contain a single-use voting barcode (say a 5-digit randomly generated alphanumeric sequence) that is handed out upon entry? Scan the barcode (or enter the code) at a voting kiosk and you can cast your single vote with that one-time use ballot card code.

burnclouds commented 7 months ago

I second using a voter ID bar code and kiosk.