How to achieve, that a voter can only vote once on a quiz?

2 years 6 months ago - 2 years 6 months ago #1 by Clemens
I am new to SimpleQuiz. Creating a new survey, there is an option "playing limit". I am missing an explanation for this function. From wording, I assume, that a person can only do this quiz once, while SimpleQuiz will check, wether the name and email address of the person is already registrated in SimpleQuiz by filling in the customer fields.
Actually I had to install SimpleQuiz on my old Joomla 3.10.10 website and I have tested it concerning multiple use of the survey, when "playing limit" is set to "Only Once". Sorry to say: I could use the survey unlimited.
I do not want to limit the access to the survey to registrated users of my website.

How can I achieve, that a user of the survey can vote only once?

BTW: I just found, that in Joomla 4.x, this function does work and I assume, that there will be an IP registration. I am on a DSL internet connection, which will get automatically a fresh IP each midnight. Next day, I could use the survey again? Or is there also a registration of username / email combination?

Please Log in or Create an account to join the conversation.

2 years 6 months ago - 2 years 6 months ago #2 by Christopher Mavros
Replied by Christopher Mavros on topic How to achieve, that a voter can only vote once on a quiz?
Hello Clemens and thank you for posting.
The playing limit does exactly what you guessed. It defines how many times can each user or visitor take a quiz.
Everything is simple when it comes to logged-in users. They have a unique ID in the database, so limiting play is an easy task.
The tricky part comes when we're trying to limit a visitor from taking a quiz multiple times. Since this is a visitor, we have no back-end information that could help us identify him.

SimpleQuiz uses a combination of methods to TRY to limit quiz play: Session and cookies.
SimpleQuiz uses the session to assign a unique ID to each visitor, and leaves a cookie after quiz play.
When the quiz checks if this visitor has taken the quiz before, it prefers the database result datetime over the cookie, as per the discussion in this forum post .
Of course, someone can clear their cookies, and play again. They could obviously also write fake emails. If you have any further suggestion on applying this limit, feel free to say it.

SimpleQuiz doesn't log the user IP and doesn't compare the name/email pair in order to apply this playing limit.
Please make sure that you don't have any template overrides that may be blocking the latest updates.
I just tried it online at demo.mavrosxristoforos.com/administrator and set the Simple Survey's playing limit to Only once. It works correctly.
So, if it doesn't work for you, we may need to do some debugging.

Thanks again.

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

2 years 6 months ago #3 by Clemens
OK, thank you very much for your ultra quick reply!  – I have understood the difficulty, to prevent double quiz participants. But I see in the backend, that the result list contains name and email address, if I request for the name and email before submitting the results. – I know, that this will not keep certain people from trying some tricks. But for most cases, this would be sufficient protection.

Is it possible, that SQ will check the name and email combination in the result list? If this combination is already listed, the participant cannot do the quiz / survey again.

There is difference in the behaviour of Joomla 3.10.10 and Joomla 4.x: In Joomla 3 it seems that there is no limitation in repeating the survey, whereas in Joomla 4.x there is. The settings of the quizzes in the backend are the same. And the browser is Firefox latest in combination with all sorts of add ons for safety: I have CookieAutoDelete, CanvasBlocker, uMatrix, uBlockOrigin etc.  Inspite of all these AddOns, it is not possible, to do the quiz again on the same day. But it will on the next day, although I have chosen, that it can only be done once.  I don't have any clue, how this is achieved.
 

Please Log in or Create an account to join the conversation.

2 years 6 months ago #4 by Christopher Mavros
Replied by Christopher Mavros on topic How to achieve, that a voter can only vote once on a quiz?
Unfortunately, the check for whether a quiz can be re-taken or not, is currently done before starting the quiz. Therefore, the user hasn't completed any information.
Adding this extra layer would complicate the finishing process a little bit.
If you want, we can examine it and see if it's possible.
Please send me an email, as per your other two posts, in order to see what's wrong.
I believe that all these concurrent issues may have a very simple explanation.
Thanks again.

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

2 years 6 months ago #5 by Clemens
Oh yes, I understand (checking for double quizzing). – But still I wonder, why the Joomla 4.x installation will check at least for double quizzing at the same day or with the same IP address or something else and the Joomla 3.10.10 seems to do not.

I have a suggestion for doing a pre check, wether the user already has completetd the quiz / survey:
Lets assume, the pre text option is set the way, that the text shows up before pushing the start button for the quiz / survey. Then we have to put the user detail fields before the start button. When he presses the start button, the content of the user details will be submitted and then can be checked against the user details in the quiz result list.
If double quizzing is detected, the user will see a popup window with the message, that he may not participate more than once.

Kind regards
Clemens

PS: You will get the credentials this evening.

Please Log in or Create an account to join the conversation.

2 years 6 months ago #6 by Christopher Mavros
Replied by Christopher Mavros on topic How to achieve, that a voter can only vote once on a quiz?
After checking, there seems to be a problem with the user session in both the front-end and the back-end.
While browsing the front-end of your site, the session cookie gets purged. Then, a couple of requests seem to go with no session cookie at all, and then, a couple of requests later, a new session cookie appears.
You can observe this behavior, by using Chrome Dev Tools (F12) and going to the Application tab.
In Storage, select Cookies and then your site's URL.
You will see that a session cookie appears, then disappears, then re-appears with a different value.
This causes SimpleQuiz (and Joomla in general) to believe that this is a new user.

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

Moderators: Christopher Mavros