Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] show own answers for logged-in fe-users #40

Open
medarob opened this issue Aug 24, 2022 · 6 comments
Open

[Question] show own answers for logged-in fe-users #40

medarob opened this issue Aug 24, 2022 · 6 comments

Comments

@medarob
Copy link

medarob commented Aug 24, 2022

Hi,

I wanted to ask if it is already possible to show the answers for a particular user and quiz on a separate page.

In our example a fe-user answers the questions. After answering all questions, the user can't change anything and also don't sees the choosen options. So it would be great to have the possibility to show the answers from a logged-in fe-user.

Maybe on the quiz page itself.
Instead of just showing the text "You already have participated for this quiz. You can't participate again." the already given answers could be shown below the text as well? But maybe that is already possible?

@bihor
Copy link
Owner

bihor commented Aug 25, 2022

You can define many things. It is possible to show the result of the current user at the end of the quiz. See pics and manual.
quiz1
quiz2

https://docs.typo3.org/p/fixpunkt/fp-masterquiz/3.4/en-us/User/Index.html#actions

Do you want to show results of other users?

@bihor
Copy link
Owner

bihor commented Aug 25, 2022

PS: you find a example here:
https://www.quizpalme.de/quiz-umfrage/wissens-quizze/romantia-quiz

@medarob
Copy link
Author

medarob commented Aug 25, 2022

No, I just want to show the results from the current user when this user tries to do the quiz again, so not from other users.

It seems that the condition <f:if condition="{showAnswers}"> was changed in our own templates and the whole code in the <f:then> clause was set in comments and replaced by the text "Sie haben bereits teilgenommen.". (I thought that comes from the extension.)
If I undo the comment around the code then the answers are shown from the current user.

I also noticed/wondered that the option showOwnAnswers seems to have no impact here. Either 0 or 1 changes nothing and the answers are shown when I try to do the quiz again.
In our extension the following settings were overridden with 0 but I don't know why:

        showAnswerPage = 0
        showOwnAnswers = 0
        showCorrectAnswers = 0
        showEveryAnswer = 0
        showAnswersAtFinalPage = 0
        showAllAnswers = 0

If I change showOwnAnswers to 1 then there's also no change in the FE. Answers are still be shown. (Which is the final result I want but shouldn't 0 disable the answers and 1 display the answers?)

The docu says for this option "Show the answers of the quiz taker?" (Which is what I want) but it doesn't say where it will be shown? Is it for a different page or is it the same like the quiz page?

@bihor
Copy link
Owner

bihor commented Aug 26, 2022

Note: if you enable a cookie or FEuser check, then an user cannot vote again, if he had already voted/participated. The participant will see his result of a poll/quiz instead of the checkboxes/radio buttons.

Maybe this is the reason why showOwnAnswers has no effect.

@medarob
Copy link
Author

medarob commented Aug 27, 2022

Yes, the FEuser check is enabled.

So, the option showOwnAnswers has only an effect when the FEuser check is disabled because the own answers are shown by default when FEuser check is enabled?

@bihor
Copy link
Owner

bihor commented Aug 27, 2022

I think that is correct for a answered quiz.
It should work for a not yet answered quiz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants