View Issue Details

This bug affects 1 person(s).
 18
IDProjectCategoryView StatusLast Update
14228Feature requestsTheme editorpublic2022-03-31 12:05
ReporterDenisChenu Assigned To 
PrioritynoneSeverityfeature 
Status confirmedResolutionopen 
Summary14228: Survey and Question Theme need more information
Description

We need a lot more information than this currently available (and we have some that seem not needed).

For example : we don't have : current radix (see https://github.com/LimeSurvey/LimeSurvey/pull/1164), or current core question attribute.
I think too it can be interesting to have some global settings : sitename, adminname, adminemail (for example : for auto title).

Additional Information

In theme editor : we can set a value an use it in included twig , but not in questin part since this one is loaded oit of twig system.
It can be great to include totally (but long work) in twig.

For starting : i think we must call only one time answers.twig , and answers.twig call his row with existing information.
Then https://github.com/LimeSurvey/LimeSurvey/pull/1164/files#diff-a8124ae5316979e6a5f20714ce8a3968R21 can be set one time and not at each row (for example).

And question template have aAnswers + aSubQuestions (currently i don't know if they have it : then can not really do a question template with multiple answer really hacked (example : change order of subquestion).

TagsNo tags attached.
Bug heat18
Story point estimate
Users affected %

Relationships

related to 14202 new Feature requests Readd "column style" css for multiple column but in attribute 
has duplicate 14449 closedDenisChenu Feature requests Question template : unable to make a complete system due to lack of information 
related to 13516 closeddominikvitt Bug reports Cannot access localized (i18n) values for a custom question attribute 
related to 14282 closedDenisChenu Bug reports Language of Survey is set to default in token form 
related to 14922 new Bug reports Hidden question attribute not available for printanwers_question.twig template 
related to 15814 new Feature requests Allow to use Relevance help for printable survey in Survey theme 
related to 17169 closedc_schmitz Bug reports QuestionAttribute::model()->findByAttributes() only returns DB values which does NOT include default values 
related to 17754 closedTonisOrmisson Feature requests Inject questionAttributes to short free question twig views 

Users monitoring this issue

Activities

DenisChenu

DenisChenu

2018-11-07 16:40

developer   ~49579

Last edited: 2018-11-07 16:40

I think need :
Current situation of the page : language (it's in surveyInfo, but really this array is a mess)
Current situation on instance : sitename, adminname, adminemail for starting
Current oQuestion with current language + oSubquestions with current lmanguage + oAnswers with current language
Current attribute with current language (no need to test utf8, for example attribute.other_replace_text directly (this a must have for core too))
Current oGroup with language

DenisChenu

DenisChenu

2018-11-20 14:00

developer   ~49708

Last edited: 2021-11-26 10:22

oToken : https://github.com/LimeSurvey/LimeSurvey/pull/1175

LouisGac

LouisGac

2018-12-20 12:05

developer   ~50030

Last edited: 2021-11-26 10:22

really this array is a mess

DenisChenu

DenisChenu

2018-12-20 12:32

developer   ~50035

Last edited: 2021-11-26 10:22

Yes,

Need too to move out of survey all are not related to survey …

DenisChenu

DenisChenu

2019-01-25 10:19

developer   ~50305

Last edited: 2021-11-26 10:22

Separation between survey theme and question theme

Then for Survey :

  1. Current situation of the page : what page is shown, what current language
  2. Current instance partial (sitename, adminname, adminemail)
  3. … to complete …
DenisChenu

DenisChenu

2019-05-17 08:53

developer   ~51979

Last edited: 2021-11-26 10:22

@LouisGac : i think i try to fix it in 4.0 , what is your advice :

  1. Send aQuestionAttributes + aQuestionsSubQuestion + aQuestionsAnswers, each as array in App()->twigRenderer->renderQuestion($sView, $aData) always.
  2. Create 3 (or more) twig function getQuestionAttribute($attributeName = null) : only usable in question sending the attribute for current question and current language (all in arry or a single one.

What i want current only : it's because i don't want to reproduce this issue : https://bugs.limesurvey.org/view.php?id=14576 current survey must allow only data from current survey.

DenisChenu

DenisChenu

2019-12-03 17:20

developer   ~54935

Last edited: 2021-11-26 10:22

@tpartner : you made a lot of theme. What it's your opinion on this one ?

tpartner

tpartner

2019-12-03 17:34

partner   ~54936

Last edited: 2021-11-26 10:22

I definitely see the advantage to having more information like the core question attributes exposed in the custom question files.

DenisChenu

DenisChenu

2019-12-03 17:37

developer   ~54937

Last edited: 2021-11-26 10:22

And you prefer by functions or by array ?

{{ coreAttributes.hidden }} or {{ getQuestionAttribute("hidden") }} ?

DenisChenu

DenisChenu

2019-12-03 17:46

developer   ~54938

Last edited: 2021-11-26 10:22

array:

questionAttribute [
    attribute => value
]
questionAnswerBase [
    code => [
        code,
        text (in current language),
    ]
]
Forced to scale 0
questionAnswerScale [
    code => [
        code,
        text (in current language),
    ]
]
For scale 1

questionSubQuestions [
    code => [
        code (EM code),
        value,
        status => [
            valid => ExpressionManager status,
            relevance => current relevance,
        ]
    ]
]
questionSubQuestionsX [
    code => [
        code,
        text,
    ]
]
questionSubQuestionsY [
    code => [
        code,
        text,
    ]
]

Unsure about questionAnswers about scale 0 and 1, and questionSubQuestions (EM column with values) and questionSubQuestionsX/Y : can be related to columns, but not always …

tpartner

tpartner

2019-12-03 19:22

partner   ~54940

Last edited: 2021-11-26 10:22

I prefer an array as I can see it all at a glance.

DenisChenu

DenisChenu

2019-12-04 07:45

developer   ~54941

Last edited: 2021-11-26 10:22

I check on 4.X if we have this array for attributes.
And see how we can add answers and subquestions and expression manager status :).

tpartner

tpartner

2019-12-04 14:52

partner   ~54947

Last edited: 2021-11-26 10:22

You da man!

DenisChenu

DenisChenu

2019-12-12 15:16

developer   ~55011

Last edited: 2021-11-26 10:22

OK,

MLaybe don't need answers + answersScale

questionAnswers [
 [scaleid] => [
    code => [
        code,
        text (in current language),
    ]
 ]
]

{% for answers in questionAnswers[0] %} must work :)

Issue History

Date Modified Username Field Change
2018-11-07 16:35 DenisChenu New Issue
2018-11-07 16:40 DenisChenu Additional Information Updated
2018-11-07 16:40 DenisChenu Note Added: 49579
2018-11-07 16:40 DenisChenu Note Edited: 49579
2018-11-08 18:57 DenisChenu Relationship added related to 13516
2018-11-20 14:00 DenisChenu Note Added: 49708
2018-11-24 11:06 DenisChenu Relationship added related to 14282
2018-12-20 12:05 LouisGac Note Added: 50030
2018-12-20 12:32 DenisChenu Note Added: 50035
2019-01-25 10:08 DenisChenu Summary Theme + Question template need more information => Survey Theme need more information
2019-01-25 10:14 DenisChenu Relationship added related to 14449
2019-01-25 10:19 DenisChenu Note Added: 50305
2019-05-10 15:33 DenisChenu Relationship deleted related to 14449
2019-05-10 15:33 DenisChenu Relationship added has duplicate 14449
2019-05-10 15:34 DenisChenu Relationship added related to 14202
2019-05-17 08:53 DenisChenu Note Added: 51979
2019-10-01 14:56 DenisChenu Summary Survey Theme need more information => Survey and Question Theme need more information
2019-12-03 17:20 DenisChenu Note Added: 54935
2019-12-03 17:34 tpartner Note Added: 54936
2019-12-03 17:37 DenisChenu Note Added: 54937
2019-12-03 17:46 DenisChenu Note Added: 54938
2019-12-03 19:22 tpartner Note Added: 54940
2019-12-04 07:45 DenisChenu Note Added: 54941
2019-12-04 14:52 tpartner Note Added: 54947
2019-12-10 14:56 DenisChenu Issue Monitored: p_teichmann
2019-12-11 10:15 DenisChenu Issue Monitored: DenisChenu
2019-12-12 15:16 DenisChenu Note Added: 55011
2020-01-21 14:20 DenisChenu Relationship added related to 14922
2020-02-03 17:28 DenisChenu Relationship added related to 15814
2021-03-10 07:58 DenisChenu Relationship added related to 17169
2021-11-23 12:45 DenisChenu Relationship added related to 17754
2021-11-26 10:22 galads Zoho Project Synchronization => |Yes|
2021-11-26 10:22 LimeBot Zoho Projects ID => 85781000001460049
2021-11-26 10:22 LimeBot Zoho Projects URL => https://projects.limesurvey.org/portal/limesurvey#taskdetail/85781000001335039/85781000001348001/85781000001460049
2021-11-26 10:29 galads Assigned To => galads
2021-11-26 10:29 galads Status new => confirmed
2021-12-06 11:33 TonisOrmisson Issue Monitored: TonisOrmisson
2021-12-06 11:33 TonisOrmisson Bug heat 16 => 18
2022-03-31 12:05 galads Assigned To galads =>
2022-03-31 12:05 galads Zoho Project Synchronization Yes =>
2022-03-31 12:05 galads Zoho Projects ID 85781000001460049 =>