Skip to content

Commit

Permalink
Result with icons
Browse files Browse the repository at this point in the history
  • Loading branch information
bihor committed Apr 2, 2023
1 parent 21bac88 commit 0cd99cf
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
14 changes: 12 additions & 2 deletions Classes/Hooks/PageLayoutView.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,20 @@ public function getExtensionSummary($params, &$pObj)
$itemsPerPage
];
}
$ajax = (int)$this->getFieldFromFlexform('settings.ajax');
$yesno = (int)$this->getFieldFromFlexform('settings.showAnswerPage');
$this->tableData[] = [
$this->getLanguageService()->sL(self::LLPATH . 'settings.showAnswerPage'),
(($yesno) ? $this->getLanguageService()->sL(self::LLPATH . 'settings.yes') : $this->getLanguageService()->sL(self::LLPATH . 'settings.no'))
];
$yesno = (int)$this->getFieldFromFlexform('settings.allowEdit');
$this->tableData[] = [
$this->getLanguageService()->sL(self::LLPATH . 'settings.allowEdit'),
(($yesno) ? $this->getLanguageService()->sL(self::LLPATH . 'settings.yes') : $this->getLanguageService()->sL(self::LLPATH . 'settings.no'))
];
$yesno = (int)$this->getFieldFromFlexform('settings.ajax');
$this->tableData[] = [
$this->getLanguageService()->sL(self::LLPATH . 'settings.ajax'),
(($ajax) ? $this->getLanguageService()->sL(self::LLPATH . 'settings.yes') : $this->getLanguageService()->sL(self::LLPATH . 'settings.no'))
(($yesno) ? $this->getLanguageService()->sL(self::LLPATH . 'settings.yes') : $this->getLanguageService()->sL(self::LLPATH . 'settings.no'))
];
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['fp_masterquiz']['Quizpalme\\fp_masterquiz\\Hooks\\PageLayoutView']['extensionSummary'])
&& is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['fp_masterquiz']['Quizpalme\\fp_masterquiz\\Hooks\\PageLayoutView']['extensionSummary'])) {
Expand Down
3 changes: 2 additions & 1 deletion Documentation/ChangeLog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,5 @@ ChangeLog
3.7.0:
Closed-checkbox added to a quiz too.
Using a target-action at the list-view.
New FE-layout for results: detailed table-list.
New FE-layout for results: detailed table-list.
Bugfix: do not ignore changed user-data in edit mode.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ Changes in version 3.6.5:
- Closed-checkbox added to a quiz too.
- Using a target-action at the list-view.
- New FE-layout for results: detailed table-list.
- Bugfix: do not ignore changed user-data in edit mode.
8 changes: 5 additions & 3 deletions Resources/Private/Templates/Quiz/Result.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<f:then>
<div>{settings.template.wrapQuestionTitle1 -> f:format.raw()}{question.title}{settings.template.wrapQuestionTitle2 -> f:format.raw()}</div>
<div>{settings.template.wrapQuestionDesc1 -> f:format.raw()}<f:format.html>{question.bodytext}</f:format.html>{settings.template.wrapQuestionDesc2 -> f:format.raw()}</div>
<table class="table">
<table class="table quiz-table">
<tr>
<th></th>
<f:for each="{question.answers}" as="answer">
Expand All @@ -47,7 +47,9 @@
<f:for each="{question.answers}" as="qanswer">
<td>
<f:for each="{selection.answers}" as="panswer">
<f:if condition="{panswer.uid} == {qanswer.uid}"><span class="quiz-x">X</span></f:if>
<f:if condition="{panswer.uid} == {qanswer.uid}">
<span class="quiz-x"><f:image src="EXT:fp_masterquiz/Resources/Public/Icons/icon-check.svg" width="18" /></span>
</f:if>
</f:for>
</td>
</f:for>
Expand Down Expand Up @@ -106,4 +108,4 @@
<pre>{debug}</pre>
</f:if>
</f:section>
</html>
</html>
1 change: 1 addition & 0 deletions Resources/Public/Icons/icon-check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Resources/Public/Icons/icon-remove.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0cd99cf

Please sign in to comment.