Skip to content

Commit

Permalink
version 1.5.6
Browse files Browse the repository at this point in the history
Bugfix and showOwnAnswers set to 2.
  • Loading branch information
bihor committed Jan 16, 2021
1 parent 549ccde commit 9f21416
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Configuration/TypoScript/setup.ts
Expand Up @@ -27,7 +27,7 @@ plugin.tx_fpmasterquiz {
resultPageUid =
defaultQuizUid = 1
showAnswerPage = 1
showOwnAnswers = 1
showOwnAnswers = 2
showCorrectAnswers = 1
showEveryAnswer = 0
showAnswersAtFinalPage = 1
Expand Down
3 changes: 2 additions & 1 deletion Documentation/ChangeLog/Index.rst
Expand Up @@ -70,7 +70,8 @@ ChangeLog

2.0.0: The ajax-action gets now the quiz-object.
Media-field added to a quiz.
Default value of the setting showAnswersAtFinalPage and showAllAnswers changed to 1.
Default value of the setting showAnswersAtFinalPage and showAllAnswers changed from 0 to 1.
Default value of the setting showOwnAnswers changed from 1 to 2.
Default value of startPageUid removed! Setting showPageUid added.
Shows now the points only if the maximum points are greater than 0.
Important: probably you need to flush all caches.
3 changes: 2 additions & 1 deletion Documentation/Configuration/Index.rst
Expand Up @@ -23,6 +23,7 @@ TypoScript Reference

The TypoScript settings can be changed via the TypoScript-Object-Browser. tx_fpmasterquiz.view, tx_fpmasterquiz.persistence
and persistence.features are like in other extensions. Here is only a list of the tx_fpmasterquiz.settings.
If values 0, 1 and 2 are possible, 1 means: enable this feature, 2 means: enable this feature, but not on the final page.


Properties
Expand All @@ -38,7 +39,7 @@ Properties
resultPageUid integer UID of the page where to show quiz results.
defaultQuizUid integer UID of the quiz to show. 1
showAnswerPage boolean Show an answer page after every submit? 1
showOwnAnswers integer Show the answers of the quiz taker? 0,1 or 2. 1
showOwnAnswers integer Show the answers of the quiz taker? 0,1 or 2. 2
showCorrectAnswers integer Show the correct answers? 0, 1 or 2. 1
showEveryAnswer integer Show every answer? 0, 1 or 2 (see below). 0
showAnswersAtFinalPage boolean Show solutions at the final page? 1
Expand Down
4 changes: 2 additions & 2 deletions README.md
@@ -1,6 +1,6 @@
# fp_masterquiz

version 1.5.5
version 1.5.6

TYPO3 extension to create a quiz, poll or test. The participant result will be saved in the DB too and can be deleted automatically via Scheduler.

Expand All @@ -14,4 +14,4 @@ This extension is not backward compatible to myquizpoll, but there is a simple i

You find the documentation at typo3.org: https://docs.typo3.org/p/fixpunkt/fp-masterquiz/master/en-us/

Last feature: default values changed! (pre-releade of version 2.0.0). Setting showPageUid added.
Last feature: default values changed! (pre-releade of version 2.0.0). Setting showPageUid added. Bugfix.
26 changes: 16 additions & 10 deletions Resources/Private/Partials/Question/PropertiesSent.html
@@ -1,4 +1,5 @@
<html xmlns:f="https://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:variable name="enablePoints">{selection.maximumPoints}</f:variable>
<div class="card">
<f:if condition="({settings.showPageNo} == 1) && ({settings.ajax} == 1) && ({pages} != 1) && ({final} == 0)">
<p class="quiz-progress">{f:translate(key: "text.page")} <span>{page}</span> {f:translate(key: "text.of")} {pages} ({pagePercent}%)</p>
Expand Down Expand Up @@ -59,26 +60,31 @@
<f:then>{answer.title -> f:format.raw()}</f:then>
<f:else>{answer.title -> f:format.nl2br()}</f:else>
</f:if>
<f:if condition="{settings.showPoints} && ({selection.maximumPoints} > 0)"> ({answer.points} {f:translate(key: "text.points", default: 'P')})</f:if>
<f:if condition="{settings.showPoints} && {enablePoints}">
({answer.points} {f:translate(key: "text.points", default: 'P')})
</f:if>
</li>
<f:if condition="{nr.isLast}"></ul></f:if>
</f:defaultCase>
</f:switch>
</f:for>
</f:if>

<f:if condition="((({settings.showCorrectAnswers} == 2) && ({final} == 0)) || ({settings.showCorrectAnswers} == 1)) && ({selection.maximumPoints} > 0)">
<f:if condition="((({settings.showCorrectAnswers} == 2) && ({final} == 0)) || ({settings.showCorrectAnswers} == 1)) && ({enablePoints} > 0)">
<f:comment> Nur die richtigen Antworten bei einem Quiz anzeigen </f:comment>
<p>{f:translate(key: "text.correctAnswers", default: 'Correct answers:')}</p>
<ul>
<f:for each="{selection.question.answers}" as="answer2" iteration="nr">
<f:for each="{selection.question.answers}" as="answer2" iteration="nr2">
<f:if condition="{answer2.points} > 0">
<li>
<f:if condition="{settings.allowHtml} == 1"><f:then>{answer2.title -> f:format.raw()}</f:then><f:else>{answer2.title -> f:format.nl2br()}</f:else></f:if>
<f:comment>Don't show the points directly after the answer for Textbox answers </f:comment>
<f:if condition="{selection.question.qmode} != 3"><f:if condition="{selection.question.qmode} != 5">
<f:if condition="{settings.showPoints} && ({selection.maximumPoints} > 0)"> ({answer2.points} {f:translate(key: "text.points", default: 'P')})</f:if>
</f:if></f:if>
<f:if condition="{settings.allowHtml} == 1">
<f:then>{answer2.title -> f:format.raw()}</f:then>
<f:else>{answer2.title -> f:format.nl2br()}</f:else>
</f:if>
<f:comment> Don't show the points directly after the answer for Textbox answers </f:comment>
<f:if condition="({selection.question.qmode} != 3) && ({selection.question.qmode} != 5) && ({settings.showPoints} > 0)">
({answer2.points} {f:translate(key: "text.points", default: 'P')})
</f:if>
</li>
</f:if>
</f:for>
Expand All @@ -102,7 +108,7 @@
<f:then>{answer5.title -> f:format.raw()}</f:then>
<f:else>{answer5.title -> f:format.nl2br()}</f:else>
</f:if>
<f:if condition="{settings.showPoints} && ({selection.maximumPoints} > 0)"> ({answer5.points} {f:translate(key: "text.points", default: 'P')})</f:if>
<f:if condition="{settings.showPoints} && {enablePoints}"> ({answer5.points} {f:translate(key: "text.points", default: 'P')})</f:if>
</li></f:spaceless>
</f:for>
</ul>
Expand All @@ -121,7 +127,7 @@
</f:if>
</f:if>

<f:if condition="{settings.showPoints} && ({selection.maximumPoints} > 0)">
<f:if condition="{settings.showPoints} && {enablePoints}">
<p>{f:translate(key: "text.pointsQuestion", default: 'Points: ')} {selection.points}/{selection.maximumPoints}.</p>
</f:if>
</f:if>
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Expand Up @@ -20,7 +20,7 @@
'uploadfolder' => 0,
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => '1.5.5',
'version' => '1.5.6',
'constraints' => [
'depends' => [
'typo3' => '9.5.20-10.4.99',
Expand Down

0 comments on commit 9f21416

Please sign in to comment.