View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
13877Bug reportsTheme editorpublic2018-08-07 17:01
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.13.x 
Fixed in Version3.13.x 
Summary13877: Unable to update answers twig part in Survey theme
Description

Maybe i don't use best solution, but i'm unable to use theme answer part

Steps To Reproduce

Import included survey template
Import included survey

Look at directory inside vanilla_answers/view
See the twig file

test survey : nothing is updated

Additional Information

It's really needed, and i really think it was published as feature of 3.0

TagsNo tags attached.
Attached Files
vanilla_answers.zip (112,199 bytes)
vanilla_answers-3.zip (114,202 bytes)
Bug heat8
Complete LimeSurvey version number (& build)3.13.2 github
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Users monitoring this issue

tpartner

Activities

DenisChenu

DenisChenu

2018-07-14 12:05

developer   ~48512

Updated template , i have the solution. Make the pull request

vanilla_answers-2.zip (113,313 bytes)
DenisChenu

DenisChenu

2018-07-14 14:49

developer   ~48513

2nd example lss file (after the fix for Template ) + template

Template update :

  • Single radio (core only)
  • Long free text (core only)

But not single radio / image template

No clean solution to have single radio / image template replacement by user template since directory are totally the same. Think final directory or file MUST be different.

Exemple survey/questions/qtemplatename/answer or survey/questions-qtemplatename/answer or … open for discussion.

DenisChenu

DenisChenu

2018-07-14 15:46

developer   ~48514

\o/ Found the solution to allow user theme to update:

  • Core question twig
  • Question template twig

Order is :

  • Plugin forced (but maybe can be moved after)
  • Template only for question template (and parents)
  • Question template
  • Template for all files (and parents)
  • Plugin added
  • Core
vanilla_answers-4.zip (114,660 bytes)
DenisChenu

DenisChenu

2018-07-17 15:29

developer   ~48522

Last edited: 2018-07-17 15:30

Thinking of directory : we have 2 solution for «core» questions

In views/survey/questions : seem more php dev logical
In views/questions/core (question template are in views/questions/template_name) : maybe more logical for twig/template dev (and we can add the empty views/questions/ directory with a little readme to explain how to replace core answers part)

user70560

2018-07-28 14:06

  ~48609

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=27709

markusfluer

markusfluer

2018-08-07 17:01

administrator   ~48705

Release 3.14.2+180807

Related Changesets

LimeSurvey: master f18c1f4b

2018-07-28 14:06:27

user70560


Committer: GitHub Details Diff
Fixed issue 13877: Unable to update answers twig part in theme

Fixed issue 13877: Unable to update answers twig part in theme
Dev: using twig like we need to use it
Dev: must update for question template (but it can be done)
Dev: Fixed issue : question template twig not loaded
Dev: Fixed issue : Question template are replaced by User template
Dev: no clean solution to replace question template by user template
Dev: since directory are the same.
New feature : allow template to replace Question template twig file
Dev: phpdoc on QuestionTemplate->getQuestionTemplateFolderName()
Affected Issues
13877
mod - application/core/LSETwigViewRenderer.php Diff File
mod - application/models/QuestionTemplate.php Diff File

Issue History

Date Modified Username Field Change
2018-07-14 11:46 DenisChenu New Issue
2018-07-14 11:46 DenisChenu File Added: Capture du 2018-07-14 11-43-13.png
2018-07-14 11:46 DenisChenu File Added: limesurvey_survey_answers-test.lss
2018-07-14 11:46 DenisChenu File Added: vanilla_answers.zip
2018-07-14 12:05 DenisChenu File Added: vanilla_answers-2.zip
2018-07-14 12:05 DenisChenu File Added: Capture du 2018-07-14 12-04-03.png
2018-07-14 12:05 DenisChenu Note Added: 48512
2018-07-14 14:49 DenisChenu Note Added: 48513
2018-07-14 14:49 DenisChenu File Added: limesurvey_survey_answers-testBis.lss
2018-07-14 14:49 DenisChenu File Added: vanilla_answers-3.zip
2018-07-14 15:46 DenisChenu File Added: vanilla_answers-4.zip
2018-07-14 15:46 DenisChenu File Added: Capture du 2018-07-14 15-38-42.png
2018-07-14 15:46 DenisChenu Note Added: 48514
2018-07-17 15:23 DenisChenu Summary Unable to update answers twig part in theme => Unable to update answers twig part in Survey theme
2018-07-17 15:23 DenisChenu Description Updated
2018-07-17 15:23 DenisChenu Steps to Reproduce Updated
2018-07-17 15:25 tpartner Issue Monitored: tpartner
2018-07-17 15:29 DenisChenu Note Added: 48522
2018-07-17 15:30 DenisChenu Note Edited: 48522
2018-07-28 14:06 user70560 Changeset attached => LimeSurvey master f18c1f4b
2018-07-28 14:06 user70560 Note Added: 48609
2018-07-28 14:06 user70560 Assigned To => user70560
2018-07-28 14:06 user70560 Resolution open => fixed
2018-07-29 17:09 DenisChenu Assigned To user70560 => DenisChenu
2018-07-29 17:09 DenisChenu Status new => resolved
2018-07-29 17:09 DenisChenu Fixed in Version => 3.13.x
2018-08-07 17:01 markusfluer Status resolved => closed
2018-08-07 17:01 markusfluer Note Added: 48705
2021-08-02 19:33 guest Bug heat 6 => 8