Skip to content

Commit

Permalink
Version 5.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bihor committed Apr 23, 2024
1 parent eb6b4d7 commit 1a0dd6e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# fp_masterquiz

version 5.1.3
version 5.1.4

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 Down Expand Up @@ -54,6 +54,6 @@ Changes in version 5.0.3:
Changes in version 5.1:
- More layout possibilities: group a normal quiz/poll by tags; show answers inline (span instead of div).

Changes in version 5.1.2:
Changes in version 5.1.4:
- More support for group by tags.
- More support for matrix-questions.
8 changes: 4 additions & 4 deletions Resources/Private/Backend/Partials/Question/Chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ <h4>{question.title}</h4>
<div class="bars">
<f:for each="{question.answers}" as="answer3" iteration="iter3">
<div class="bar-group">
<f:for each="{question.categoriesArray}" key="catkey" as="category" iteration="itercat">
<f:for each="{question.sortedCategoriesArray}" key="catkey" as="category" iteration="itercat">
<f:for each="{answer3.allCategoryAnswers}" key="an3key" as="an3array">
<f:if condition="{answer3.uid} == {an3key}">
<f:for each="{an3array}" key="cat3key" as="cat3count">
<f:if condition="{catkey} == {cat3key}">
<f:if condition="{category.uid} == {cat3key}">
<div class="bar stat-{itercat.cycle}" style="height: {cat3count * 100 / question.allAnswers}%;">
<span>{cat3count}</span>
</div>
Expand All @@ -46,8 +46,8 @@ <h4>{question.title}</h4>
</div>
</div>
<div>
<f:for each="{question.categoriesArray}" key="catkey" as="category" iteration="itercat">
<span class="cat-bg cat-bg-{itercat.cycle}">&nbsp;</span>{category}&nbsp; &nbsp;
<f:for each="{question.sortedCategoriesArray}" key="catkey" as="category" iteration="itercat">
<span class="cat-bg cat-bg-{itercat.cycle}">&nbsp;</span>{category.title}&nbsp; &nbsp;
</f:for>
</div>
</div>
Expand Down
9 changes: 3 additions & 6 deletions Resources/Private/Backend/Templates/Quiz/Charts.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html xmlns:f="https://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:comment>
Chart from https://speckyboy.com/code-snippets-css3-bar-graphs/
Multi-Chart from https://speckyboy.com/code-snippets-css3-bar-graphs/
</f:comment>
<f:section name="Content">
<style>
Expand All @@ -16,9 +16,6 @@
height: 200px;
margin: 0 auto;
margin-bottom: 60px;
background-image: linear-gradient(bottom, rgba(0, 0, 0, 0.1) 2%, transparent 2%);
background-size: 100% 50px;
background-position: left top;
}
.chart li {
position: relative;
Expand Down Expand Up @@ -194,8 +191,8 @@
background-image: linear-gradient(to right, #00c5ff 0%, #00c5ff 47%, #0383a9 50%, #0383a9 100%);
}
#bar-chart .stat-5, #bar-chart .cat-bg-5 {
background-image: -webkit-linear-gradient(left, #ff8800 0%, #ff8800 47%, #a92a03 50%, #a92a03 100%);
background-image: linear-gradient(to right, #ff8800 0%, #ff8800 47%, #a92a03 50%, #a92a03 100%);
background-image: -webkit-linear-gradient(left, #ff8800 0%, #ff8800 47%, #a94303 50%, #a94303 100%);
background-image: linear-gradient(to right, #ff8800 0%, #ff8800 47%, #a94303 50%, #a94303 100%);
}
</style>
<h1><f:translate key="LLL:EXT:fp_masterquiz/Resources/Private/Language/locallang_mod1.xlf:charts-participants" default="Listing for" /> {pid}</h1>
Expand Down
18 changes: 14 additions & 4 deletions Resources/Private/Partials/Question/Result.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,23 @@
<f:then>
<br/>
<table>
<f:for each="{question.categoriesArray}" key="catkey" as="category">
<tr><td>{category}:</td><td>
<f:for each="{question.sortedCategoriesArray}" as="category">
<tr><td>{category.title}:&nbsp;</td><td>
<f:for each="{answer3.allCategoryAnswers}" key="an3key" as="an3array">
<f:if condition="{answer3.uid} == {an3key}">
<f:for each="{an3array}" key="cat3key" as="cat3count">
<f:if condition="{catkey} == {cat3key}">
{cat3count} {f:translate(key: "text.choices")}
<f:if condition="{category.uid} == {cat3key}">
{cat3count}
{f:translate(key: "text.choices")}<f:if condition="{cat3key} == {answer3.ownCategoryAnswer.0}">;
{f:translate(key: "text.myChoice", default: 'my choice')}</f:if>
&nbsp;</td><td style="width:200px">
<div class="progress">
<div class="progress-bar" style="width:{cat3count * 100 / question.allAnswers}%">
<f:format.number decimals="1" decimalSeparator="," thousandsSeparator=".">
{cat3count * 100 / question.allAnswers}
</f:format.number> %
</div>
</div>
</f:if>
</f:for>
</f:if>
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'category' => 'plugin',
'author' => 'Kurt Gusbeth',
'state' => 'stable',
'version' => '5.1.3',
'version' => '5.1.4',
'constraints' => [
'depends' => [
'typo3' => '12.4.0-12.4.99',
Expand Down

0 comments on commit 1a0dd6e

Please sign in to comment.