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
3 stars 9 forks source link

Feature request: Make quiz categorizable #15

Closed linawolf closed 3 years ago

linawolf commented 3 years ago

We do have a large number of quizzes that should belong to different categories.

So I would like to suggest to make the quiz table categorizable.

Attached you find my solution for this:

make_quizzes_categorizable.zip (updated to remove error in some contexts)

Greetings Lina

linawolf commented 3 years ago

make_quizzes_categorizable.zip

Just noted one file was missing in the patch, here is an update

bihor commented 3 years ago

Well, I cant see, for which purpose you have added Categories. Only in List.html is a usage. I plan to use categories for selects too.

I think, this line is not needed: use \TYPO3\CMS\Extbase\Domain\Model\Category; Instead I have added this line: $this->categories = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();

linawolf commented 3 years ago

Well we use custom templates in which we need categorizable quizes. For us depending on the category we are using different color-schemes, different headlines like "Quiz your self on topic XY". I just included one example of how to output the categories in the extensions template as an example.

linawolf commented 3 years ago

for me it works fine like that, thank you