bihor / fp_masterquiz

TYPO3 extension to create a quiz, poll or test. The user result will be saved in the DB too and could be displayed as a chart.
GNU General Public License v3.0
5 stars 10 forks source link

Error in frontend when hiding a question after poll was filled #52

Open h-e-l-l-o-w-o-r-l-d opened 1 year ago

h-e-l-l-o-w-o-r-l-d commented 1 year ago

Hi there,

I get a frontend error under following circumstances:

  1. Create poll with question x (checkbox)
  2. Fill poll in frontend
  3. Open poll again to show your answers -> all good
  4. Hide question in backend
  5. Open poll again to show your answers -> Error

Error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Call to a member function getMaximum1() on null | Error thrown in file /var/www/intranet/public/typo3conf/ext/fp_masterquiz/Classes/Domain/Model/Selected.php in line 230

We have a use case where we simply don't want to show a question anymore OR want to show it but with a description like "not available anymore". Problem: If you hide the question, it's not shown anymore. This is okay, but users that filled the question formerly, want to see their answer for that question.... What would be the best way to not show the question for new users but show it for old users? Something like "closed" is available for the poll, but not for a single question.

bihor commented 1 year ago

Thats not easy. I will think about it.

bihor commented 1 year ago

In version 4.2.0 questions can now be closed too. You find the checkbox in the Access-Tab. You need to adapt your Partials/Question/Properties.html file.

h-e-l-l-o-w-o-r-l-d commented 1 year ago

Thank you so much! Unfortunately we are still on TYPO3 11.5, so I can not test it at the moment. I hope we can switch to 12 in the beginning of 2024.

h-e-l-l-o-w-o-r-l-d commented 8 months ago

We will switch to TYPO3 12 by the end of the year I think. Can test it then! Thanks again for improving this extension. :o)