View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16669 | Bug reports | Plugins | public | 2020-09-15 15:14 | 2021-07-12 11:53 |
Reporter | DenisChenu | Assigned To | gabrieljenik | ||
Priority | none | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.3.16 | ||||
Summary | 16669: getQuestionAttributes function don't get the plugins attribute | ||||
Description | The getQuestionAttributes are not compatible with plugins Question Attribute | ||||
Steps To Reproduce |
| ||||
Additional Information |
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | 4.3.15 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | not relevant | ||||
Database type & version | not relevant | ||||
Server OS (if known) | not relevant | ||||
Webserver software & version (if known) | not relevant | ||||
PHP Version | not relevant | ||||
related to | 15224 | closed | p_teichmann | Bug reports | newQuestionAttributes deprecated : need a replacer |
related to | 16772 | closed | gabrieljenik | Bug reports | Allow plugin to add question attributes |
related to | 17049 | closed | ollehar | Bug reports | newQuestionAttributes event didn't add attribute |
related to | 17169 | closed | c_schmitz | Bug reports | QuestionAttribute::model()->findByAttributes() only returns DB values which does NOT include default values |
Would it make sense to re-introduce the method questionHelper::getAttributesDefinitions to LS4? |
|
Question and question group import also use the newQuestionAttribute event, through questionHelper::getAttributesDefinitions. |
|
I don't know … personally i think current code is a lot more complex than previous one … |
|
On the other side. QuestionAttribute::getOwnQuestionAttributesViaPlugin() is used on QuestionTheme::getQuestionThemeAttributeValues (see attachment) That method is used on application\models\QuestionBaseDataSet.php
Shall we just Thanks! |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31574 |
|
After update to last version Still not working for survey (beforeQuestionrender) limesurvey_survey_287188.lss (23,460 bytes)
<?xml version="1.0" encoding="UTF-8"?> <document> <LimeSurveyDocType>Survey</LimeSurveyDocType> <DBVersion>444</DBVersion> <languages> <language>en</language> </languages> <groups> <fields> <fieldname>gid</fieldname> <fieldname>sid</fieldname> <fieldname>group_order</fieldname> <fieldname>randomization_group</fieldname> <fieldname>grelevance</fieldname> </fields> <rows> <row> <gid><![CDATA[492]]></gid> <sid><![CDATA[287188]]></sid> <group_order><![CDATA[1]]></group_order> <randomization_group/> <grelevance/> </row> </rows> </groups> <group_l10ns> <fields> <fieldname>id</fieldname> <fieldname>gid</fieldname> <fieldname>group_name</fieldname> <fieldname>description</fieldname> <fieldname>language</fieldname> <fieldname>sid</fieldname> <fieldname>group_order</fieldname> <fieldname>randomization_group</fieldname> <fieldname>grelevance</fieldname> </fields> <rows> <row> <id><![CDATA[897]]></id> <gid><![CDATA[492]]></gid> <group_name><![CDATA[Test]]></group_name> <description/> <language><![CDATA[en]]></language> <sid><![CDATA[287188]]></sid> <group_order><![CDATA[1]]></group_order> <randomization_group/> <grelevance/> </row> </rows> </group_l10ns> <questions> <fields> <fieldname>qid</fieldname> <fieldname>parent_qid</fieldname> <fieldname>sid</fieldname> <fieldname>gid</fieldname> <fieldname>type</fieldname> <fieldname>title</fieldname> <fieldname>preg</fieldname> <fieldname>other</fieldname> <fieldname>mandatory</fieldname> <fieldname>question_order</fieldname> <fieldname>scale_id</fieldname> <fieldname>same_default</fieldname> <fieldname>relevance</fieldname> <fieldname>modulename</fieldname> <fieldname>encrypted</fieldname> </fields> <rows> <row> <qid><![CDATA[7589]]></qid> <parent_qid><![CDATA[0]]></parent_qid> <sid><![CDATA[287188]]></sid> <gid><![CDATA[492]]></gid> <type><![CDATA[S]]></type> <title><![CDATA[G01Q01]]></title> <preg/> <other><![CDATA[N]]></other> <mandatory><![CDATA[N]]></mandatory> <question_order><![CDATA[1]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <modulename/> <encrypted><![CDATA[N]]></encrypted> </row> </rows> </questions> <question_l10ns> <fields> <fieldname>id</fieldname> <fieldname>qid</fieldname> <fieldname>question</fieldname> <fieldname>help</fieldname> <fieldname>language</fieldname> <fieldname>script</fieldname> </fields> <rows> <row> <id><![CDATA[17284]]></id> <qid><![CDATA[7589]]></qid> <question><![CDATA[Color with text success ?]]></question> <help/> <language><![CDATA[en]]></language> <script/> </row> </rows> </question_l10ns> <question_attributes> <fields> <fieldname>qid</fieldname> <fieldname>attribute</fieldname> <fieldname>value</fieldname> <fieldname>language</fieldname> </fields> <rows> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[clear_default]]></attribute> <value><![CDATA[N]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[cssclass]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[display_rows]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[em_validation_q]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[em_validation_q_tip]]></attribute> <value/> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[hidden]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[hide_tip]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[input_size]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[javascript]]></attribute> <value><![CDATA[$("#answer{SGQ}").css("background:red"); $("#question{QID}").addClass("text-succes"); alert('toto');]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[location_city]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[location_country]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[location_defaultcoordinates]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[location_mapheight]]></attribute> <value><![CDATA[300]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[location_mapservice]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[location_mapwidth]]></attribute> <value><![CDATA[500]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[location_mapzoom]]></attribute> <value><![CDATA[11]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[location_nodefaultfromip]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[location_postal]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[location_state]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[maximum_chars]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[numbers_only]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[page_break]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[prefix]]></attribute> <value/> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[question_template]]></attribute> <value><![CDATA[shortfreetext]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[random_group]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[save_as_default]]></attribute> <value><![CDATA[N]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[script_activate]]></attribute> <value><![CDATA[1]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[scriptPosition]]></attribute> <value><![CDATA[4]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[statistics_graphtype]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[statistics_showgraph]]></attribute> <value><![CDATA[1]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[statistics_showmap]]></attribute> <value><![CDATA[1]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[suffix]]></attribute> <value/> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[text_input_width]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_action]]></attribute> <value><![CDATA[1]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_countdown_message]]></attribute> <value/> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_disable_next]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_disable_prev]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_message]]></attribute> <value/> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_message_delay]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_message_style]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_timer_style]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_warning]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_warning_2]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_warning_2_display_time]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_warning_2_message]]></attribute> <value/> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_warning_2_style]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_warning_display_time]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_warning_message]]></attribute> <value/> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[7589]]></qid> <attribute><![CDATA[time_limit_warning_style]]></attribute> <value/> <language/> </row> </rows> </question_attributes> <surveys> <fields> <fieldname>sid</fieldname> <fieldname>gsid</fieldname> <fieldname>admin</fieldname> <fieldname>expires</fieldname> <fieldname>startdate</fieldname> <fieldname>adminemail</fieldname> <fieldname>anonymized</fieldname> <fieldname>faxto</fieldname> <fieldname>format</fieldname> <fieldname>savetimings</fieldname> <fieldname>template</fieldname> <fieldname>language</fieldname> <fieldname>additional_languages</fieldname> <fieldname>datestamp</fieldname> <fieldname>usecookie</fieldname> <fieldname>allowregister</fieldname> <fieldname>allowsave</fieldname> <fieldname>autonumber_start</fieldname> <fieldname>autoredirect</fieldname> <fieldname>allowprev</fieldname> <fieldname>printanswers</fieldname> <fieldname>ipaddr</fieldname> <fieldname>refurl</fieldname> <fieldname>showsurveypolicynotice</fieldname> <fieldname>publicstatistics</fieldname> <fieldname>publicgraphs</fieldname> <fieldname>listpublic</fieldname> <fieldname>htmlemail</fieldname> <fieldname>sendconfirmation</fieldname> <fieldname>tokenanswerspersistence</fieldname> <fieldname>assessments</fieldname> <fieldname>usecaptcha</fieldname> <fieldname>usetokens</fieldname> <fieldname>bounce_email</fieldname> <fieldname>attributedescriptions</fieldname> <fieldname>emailresponseto</fieldname> <fieldname>emailnotificationto</fieldname> <fieldname>tokenlength</fieldname> <fieldname>showxquestions</fieldname> <fieldname>showgroupinfo</fieldname> <fieldname>shownoanswer</fieldname> <fieldname>showqnumcode</fieldname> <fieldname>bouncetime</fieldname> <fieldname>bounceprocessing</fieldname> <fieldname>bounceaccounttype</fieldname> <fieldname>bounceaccounthost</fieldname> <fieldname>bounceaccountpass</fieldname> <fieldname>bounceaccountencryption</fieldname> <fieldname>bounceaccountuser</fieldname> <fieldname>showwelcome</fieldname> <fieldname>showprogress</fieldname> <fieldname>questionindex</fieldname> <fieldname>navigationdelay</fieldname> <fieldname>nokeyboard</fieldname> <fieldname>alloweditaftercompletion</fieldname> <fieldname>googleanalyticsstyle</fieldname> <fieldname>googleanalyticsapikey</fieldname> <fieldname>tokenencryptionoptions</fieldname> <fieldname>ipanonymize</fieldname> </fields> <rows> <row> <sid><![CDATA[287188]]></sid> <gsid><![CDATA[1]]></gsid> <admin><![CDATA[inherit]]></admin> <adminemail><![CDATA[inherit]]></adminemail> <anonymized><![CDATA[N]]></anonymized> <format><![CDATA[I]]></format> <savetimings><![CDATA[I]]></savetimings> <template><![CDATA[inherit]]></template> <language><![CDATA[en]]></language> <additional_languages/> <datestamp><![CDATA[I]]></datestamp> <usecookie><![CDATA[I]]></usecookie> <allowregister><![CDATA[I]]></allowregister> <allowsave><![CDATA[I]]></allowsave> <autonumber_start><![CDATA[0]]></autonumber_start> <autoredirect><![CDATA[I]]></autoredirect> <allowprev><![CDATA[I]]></allowprev> <printanswers><![CDATA[I]]></printanswers> <ipaddr><![CDATA[I]]></ipaddr> <refurl><![CDATA[I]]></refurl> <showsurveypolicynotice><![CDATA[0]]></showsurveypolicynotice> <publicstatistics><![CDATA[I]]></publicstatistics> <publicgraphs><![CDATA[I]]></publicgraphs> <listpublic><![CDATA[I]]></listpublic> <htmlemail><![CDATA[I]]></htmlemail> <sendconfirmation><![CDATA[I]]></sendconfirmation> <tokenanswerspersistence><![CDATA[I]]></tokenanswerspersistence> <assessments><![CDATA[I]]></assessments> <usecaptcha><![CDATA[E]]></usecaptcha> <usetokens><![CDATA[N]]></usetokens> <bounce_email><![CDATA[inherit]]></bounce_email> <emailresponseto><![CDATA[inherit]]></emailresponseto> <emailnotificationto><![CDATA[inherit]]></emailnotificationto> <tokenlength><![CDATA[-1]]></tokenlength> <showxquestions><![CDATA[I]]></showxquestions> <showgroupinfo><![CDATA[I]]></showgroupinfo> <shownoanswer><![CDATA[I]]></shownoanswer> <showqnumcode><![CDATA[I]]></showqnumcode> <bounceprocessing><![CDATA[N]]></bounceprocessing> <showwelcome><![CDATA[I]]></showwelcome> <showprogress><![CDATA[I]]></showprogress> <questionindex><![CDATA[-1]]></questionindex> <navigationdelay><![CDATA[-1]]></navigationdelay> <nokeyboard><![CDATA[I]]></nokeyboard> <alloweditaftercompletion><![CDATA[I]]></alloweditaftercompletion> <tokenencryptionoptions/> <ipanonymize><![CDATA[I]]></ipanonymize> </row> </rows> </surveys> <surveys_languagesettings> <fields> <fieldname>surveyls_survey_id</fieldname> <fieldname>surveyls_language</fieldname> <fieldname>surveyls_title</fieldname> <fieldname>surveyls_description</fieldname> <fieldname>surveyls_welcometext</fieldname> <fieldname>surveyls_endtext</fieldname> <fieldname>surveyls_policy_notice</fieldname> <fieldname>surveyls_policy_error</fieldname> <fieldname>surveyls_policy_notice_label</fieldname> <fieldname>surveyls_url</fieldname> <fieldname>surveyls_urldescription</fieldname> <fieldname>surveyls_email_invite_subj</fieldname> <fieldname>surveyls_email_invite</fieldname> <fieldname>surveyls_email_remind_subj</fieldname> <fieldname>surveyls_email_remind</fieldname> <fieldname>surveyls_email_register_subj</fieldname> <fieldname>surveyls_email_register</fieldname> <fieldname>surveyls_email_confirm_subj</fieldname> <fieldname>surveyls_email_confirm</fieldname> <fieldname>surveyls_dateformat</fieldname> <fieldname>surveyls_attributecaptions</fieldname> <fieldname>email_admin_notification_subj</fieldname> <fieldname>email_admin_notification</fieldname> <fieldname>email_admin_responses_subj</fieldname> <fieldname>email_admin_responses</fieldname> <fieldname>surveyls_numberformat</fieldname> <fieldname>attachments</fieldname> </fields> <rows> <row> <surveyls_survey_id><![CDATA[287188]]></surveyls_survey_id> <surveyls_language><![CDATA[en]]></surveyls_language> <surveyls_title><![CDATA[Test addScriptToQuestion]]></surveyls_title> <surveyls_description/> <surveyls_welcometext/> <surveyls_endtext/> <surveyls_policy_notice/> <surveyls_policy_notice_label/> <surveyls_url/> <surveyls_urldescription/> <surveyls_email_invite_subj><![CDATA[Invitation to participate in a survey]]></surveyls_email_invite_subj> <surveyls_email_invite><![CDATA[Dear {FIRSTNAME},<br /> <br /> you have been invited to participate in a survey.<br /> <br /> The survey is titled:<br /> "{SURVEYNAME}"<br /> <br /> "{SURVEYDESCRIPTION}"<br /> <br /> To participate, please click on the link below.<br /> <br /> Sincerely,<br /> <br /> {ADMINNAME} ({ADMINEMAIL})<br /> <br /> ----------------------------------------------<br /> Click here to do the survey:<br /> {SURVEYURL}<br /> <br /> If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:<br /> {OPTOUTURL}<br /> <br /> If you are blacklisted but want to participate in this survey and want to receive invitations please click the following link:<br /> {OPTINURL}]]></surveyls_email_invite> <surveyls_email_remind_subj><![CDATA[Reminder to participate in a survey]]></surveyls_email_remind_subj> <surveyls_email_remind><![CDATA[Dear {FIRSTNAME},<br /> <br /> Recently we invited you to participate in a survey.<br /> <br /> We note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part.<br /> <br /> The survey is titled:<br /> "{SURVEYNAME}"<br /> <br /> "{SURVEYDESCRIPTION}"<br /> <br /> To participate, please click on the link below.<br /> <br /> Sincerely,<br /> <br /> {ADMINNAME} ({ADMINEMAIL})<br /> <br /> ----------------------------------------------<br /> Click here to do the survey:<br /> {SURVEYURL}<br /> <br /> If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:<br /> {OPTOUTURL}]]></surveyls_email_remind> <surveyls_email_register_subj><![CDATA[Survey registration confirmation]]></surveyls_email_register_subj> <surveyls_email_register><![CDATA[Dear {FIRSTNAME},<br /> <br /> You, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}.<br /> <br /> To complete this survey, click on the following URL:<br /> <br /> {SURVEYURL}<br /> <br /> If you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}.]]></surveyls_email_register> <surveyls_email_confirm_subj><![CDATA[Confirmation of your participation in our survey]]></surveyls_email_confirm_subj> <surveyls_email_confirm><![CDATA[Dear {FIRSTNAME},<br /> <br /> this email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating.<br /> <br /> If you have any further questions about this email, please contact {ADMINNAME} on {ADMINEMAIL}.<br /> <br /> Sincerely,<br /> <br /> {ADMINNAME}]]></surveyls_email_confirm> <surveyls_dateformat><![CDATA[9]]></surveyls_dateformat> <email_admin_notification_subj><![CDATA[Response submission for survey {SURVEYNAME}]]></email_admin_notification_subj> <email_admin_notification><![CDATA[Hello,<br /> <br /> A new response was submitted for your survey '{SURVEYNAME}'.<br /> <br /> Click the following link to see the individual response:<br /> {VIEWRESPONSEURL}<br /> <br /> Click the following link to edit the individual response:<br /> {EDITRESPONSEURL}<br /> <br /> View statistics by clicking here:<br /> {STATISTICSURL}]]></email_admin_notification> <email_admin_responses_subj><![CDATA[Response submission for survey {SURVEYNAME} with results]]></email_admin_responses_subj> <email_admin_responses><![CDATA[Hello,<br /> <br /> A new response was submitted for your survey '{SURVEYNAME}'.<br /> <br /> Click the following link to see the individual response:<br /> {VIEWRESPONSEURL}<br /> <br /> Click the following link to edit the individual response:<br /> {EDITRESPONSEURL}<br /> <br /> View statistics by clicking here:<br /> {STATISTICSURL}<br /> <br /> <br /> The following answers were given by the participant:<br /> {ANSWERTABLE}]]></email_admin_responses> <surveyls_numberformat><![CDATA[0]]></surveyls_numberformat> </row> </rows> </surveys_languagesettings> <themes> <theme> <sid>287188</sid> <template_name>fruity</template_name> <config> <options>inherit</options> </config> </theme> </themes> <themes_inherited> <theme> <sid>287188</sid> <template_name>fruity</template_name> <config> <options> <ajaxmode>off</ajaxmode> <brandlogo>on</brandlogo> <container>on</container> <backgroundimage>off</backgroundimage> <animatebody>off</animatebody> <bodyanimation>fadeInRight</bodyanimation> <bodyanimationduration>500</bodyanimationduration> <animatequestion>off</animatequestion> <questionanimation>flipInX</questionanimation> <questionanimationduration>500</questionanimationduration> <animatealert>off</animatealert> <alertanimation>shake</alertanimation> <alertanimationduration>500</alertanimationduration> <font>noto</font> <bodybackgroundcolor>#ffffff</bodybackgroundcolor> <fontcolor>#444444</fontcolor> <questionbackgroundcolor>#ffffff</questionbackgroundcolor> <questionborder>on</questionborder> <questioncontainershadow>on</questioncontainershadow> <checkicon>f00c</checkicon> <animatecheckbox>on</animatecheckbox> <checkboxanimation>rubberBand</checkboxanimation> <checkboxanimationduration>500</checkboxanimationduration> <animateradio>on</animateradio> <radioanimation>zoomIn</radioanimation> <radioanimationduration>500</radioanimationduration> <zebrastriping>off</zebrastriping> <stickymatrixheaders>off</stickymatrixheaders> <greyoutselected>off</greyoutselected> <hideprivacyinfo>off</hideprivacyinfo> <crosshover>off</crosshover> <showpopups>1</showpopups> <off>false</off> <cssframework>css/variations/purple_tentacle.css</cssframework> <notables>off</notables> <showclearall>off</showclearall> <questionhelptextposition>off</questionhelptextposition> <fixnumauto>off</fixnumauto> </options> </config> </theme> </themes_inherited> </document> |
|
Admin part seems OK :) :+1: |
|
@DenisChenu about https://bugs.limesurvey.org/view.php?id=16669#c63926 Thanks |
|
No issue on admin part : Save OK, load OK, edit OK. But : when use $aAttributes = QuestionAttribute::model()->getQuestionAttributes($oEvent->get('qid')); in beforeQuestionRender : plugin settings are not set. I can use Or another function , but it must be set somewhere … QuestionAttribute::model()->getQuestionAttributes take the plugin settings since 2.50 |
|
ok, got it. Will review the getQuestionAttributes(). Basically, plugin attributes definitions are not picked up on questionHelper::getAttributesDefinitions() as it used to happen on v3. |
|
Maybe best is to create a LimeSurveyAPI function ? @ollehar : there are no LimeSurveyAPI function list in Manual ? Maybe need to be created ? A Category ? Issue reported : No manual or documentation for API functions https://bugs.limesurvey.org/view.php?id=17248 |
|
The LimeSurvey API had a separate page that was generated automatically from the docblocks in the class. |
|
I report the issue as issue , maybe feature request (and i explain why https://api.limesurvey.org/classes/LimeSurvey.PluginManager.LimesurveyApi.html need something in manual too) |
|
OK, so I agree a PluginAPI endpoint could be very usefull and could be a good time to add it. Still, we do have to patch 'QuestionAttribute::model()->getQuestionAttributes()' as to fetch the attributes from the plugin? This method does a lot of work picking the attribute definition, just for later usage on the i18n matters. And at last, I would create a version that just returns a single attribute value. What do you think? |
|
I don't like this … you muts always check empty About quetsion attribute and theme i think, we need :
All of this can use caching when we are ready. |
|
We can have a lite on for a single attribute only maybe ? /**
And offer this function to Twig function too \o/ |
|
If you want a method to fetch both one attribute and all attributes, the latter should use the former: function getQuestionAttributes() function getQuestionAttribute($attributeName); {} ... (Pseudo-code.) |
|
NB: Do we really need getQuestionAttributeValue()? Shouldn't the value always be fetched? |
|
I think it will be faser, as less extra work fetching definitions need to be done. |
|
Not necessary. |
|
Readability and testability should go before optimization, unless there's actually a proven bottleneck there, I think. Or a big/obvious risk of a bottleneck. |
|
PS : i just speak for Since getQuestionAttributes is broken since 4.0 |
|
Name should be |
|
The adjective should come before the noun: getSingleQuestionAttribute. As I said, getQuestionAttributes() can call getSingleQuestionAttribute(). No duplication. :) You still have to put the event somewhere, though. |
|
Another alternative is to memoize the result in a static variable, to avoid to fetch the question attributes multiple times. The filtering would be trivial if you use question attribute name as key in the array. |
|
It's not already a static var for 3.X ? Els e: the imprtantpar is to have a way to use it in TWIG with i18n too.
@tpartner : i don't find your bug about no way to get i18n value for QuestionTheme attribute . |
|
@DenisChenu, it's closed - https://bugs.limesurvey.org/view.php?id=16876 |
|
Thanks you ! I check when this one was closed too ;) |
|
PR: https://github.com/LimeSurvey/LimeSurvey/pull/1850 At last, I didn't create new methods for fetching single attributes. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31622 |
|
Release done. |
|
LimeSurvey: master a028dce4 2021-04-13 18:24 Committer: GitHub Details Diff |
Fixed issue 16669: getQuestionAttributes function don't get the plugins attribute (#1843) * Fixed ticket 16669: getQuestionAttributes function don't get the plugins attribute - Added new function 'getAttributesFromPlugin' to QuestionAttributeHelper, which calls the old 'getOwnQuestionAttributesViaPlugin' function and filters by question type. - Use the new function in Question::getAdvancedSettingsWithValues() * Fixed ticket 16669: getQuestionAttributes function don't get the plugins attribute - Added more helper methods Co-authored-by: encuestabizdevgit <devgit@encuesta.biz> |
Affected Issues 16669 |
|
mod - application/models/Question.php | Diff File | ||
mod - application/models/QuestionTheme.php | Diff File | ||
mod - application/models/services/QuestionAttributeHelper.php | Diff File | ||
LimeSurvey: master 37758c50 2021-04-22 16:12 Committer: GitHub Details Diff |
Fixed issue 16669: getQuestionAttributes function don't get the plugins attribute (#1850) Co-authored-by: encuestabizdevgit <devgit@encuesta.biz> |
Affected Issues 16669 |
|
mod - application/models/Question.php | Diff File | ||
mod - application/models/QuestionAttribute.php | Diff File | ||
mod - application/models/services/QuestionAttributeHelper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-09-15 15:14 | DenisChenu | New Issue | |
2020-09-15 15:14 | DenisChenu | File Added: limesurvey_survey_addScriptToQuestion.lss | |
2020-09-15 15:29 | DenisChenu | Relationship added | related to 15224 |
2020-10-21 18:07 | gabrieljenik | Issue cloned: 16772 | |
2020-10-21 18:07 | gabrieljenik | Relationship added | related to 16772 |
2020-10-28 11:31 | ollehar | Note Added: 60435 | |
2020-10-28 11:32 | ollehar | Note Added: 60436 | |
2020-10-28 11:39 | ollehar | Note Edited: 60436 | |
2020-10-28 12:38 | DenisChenu | Note Added: 60437 | |
2020-10-28 12:39 | DenisChenu | Note Added: 60438 | |
2021-02-02 15:21 | DenisChenu | Relationship added | related to 17049 |
2021-03-09 17:04 | Mazi | Relationship added | related to 17169 |
2021-04-09 21:03 | gabrieljenik | Note Added: 63905 | |
2021-04-09 21:06 | gabrieljenik | Note Added: 63906 | |
2021-04-09 21:06 | gabrieljenik | File Added: image.png | |
2021-04-13 16:18 | gabrieljenik | Issue cloned: 17242 | |
2021-04-13 16:24 | gabrieljenik | Changeset attached | => LimeSurvey master a028dce4 |
2021-04-13 16:24 | gabrieljenik | Note Added: 63923 | |
2021-04-13 16:24 | gabrieljenik | Assigned To | => gabrieljenik |
2021-04-13 16:24 | gabrieljenik | Resolution | open => fixed |
2021-04-13 19:11 | DenisChenu | Note Added: 63926 | |
2021-04-13 19:11 | DenisChenu | File Added: limesurvey_survey_287188.lss | |
2021-04-13 19:15 | DenisChenu | Note Added: 63927 | |
2021-04-14 18:45 | gabrieljenik | Note Added: 63942 | |
2021-04-14 18:52 | DenisChenu | Note Added: 63943 | |
2021-04-14 18:53 | DenisChenu | Note Added: 63944 | |
2021-04-14 19:13 | gabrieljenik | Note Added: 63945 | |
2021-04-14 19:21 | gabrieljenik | Note Edited: 63945 | |
2021-04-15 12:13 | DenisChenu | Note Added: 63949 | |
2021-04-15 14:25 | ollehar | Note Added: 63957 | |
2021-04-15 15:06 | DenisChenu | Note Added: 63958 | |
2021-04-15 16:09 | gabrieljenik | Note Added: 63975 | |
2021-04-15 16:19 | DenisChenu | Note Added: 63976 | |
2021-04-15 16:23 | DenisChenu | Note Added: 63977 | |
2021-04-15 16:23 | DenisChenu | Note Edited: 63977 | |
2021-04-15 20:11 | ollehar | Note Added: 63980 | |
2021-04-15 20:19 | ollehar | Note Added: 63981 | |
2021-04-16 01:42 | gabrieljenik | Note Added: 63985 | |
2021-04-16 07:59 | DenisChenu | Note Added: 63986 | |
2021-04-16 15:38 | ollehar | Note Added: 63989 | |
2021-04-16 16:01 | DenisChenu | Note Added: 63990 | |
2021-04-17 01:30 | gabrieljenik | Note Added: 63996 | |
2021-04-17 01:30 | gabrieljenik | Note Edited: 63996 | |
2021-04-17 01:31 | gabrieljenik | Note Edited: 63996 | |
2021-04-17 10:30 | ollehar | Note Added: 63999 | |
2021-04-17 10:31 | ollehar | Note Edited: 63999 | |
2021-04-17 10:48 | ollehar | Note Added: 64000 | |
2021-04-17 12:27 | DenisChenu | Note Added: 64001 | |
2021-04-17 13:05 | tpartner | Note Added: 64002 | |
2021-04-17 13:24 | DenisChenu | Note Added: 64003 | |
2021-04-19 22:01 | gabrieljenik | Note Added: 64024 | |
2021-04-20 17:34 | gabrieljenik | Issue cloned: 17261 | |
2021-04-21 14:36 | ollehar | Status | new => assigned |
2021-04-22 14:12 | gabrieljenik | Changeset attached | => LimeSurvey master 37758c50 |
2021-04-22 14:12 | gabrieljenik | Note Added: 64111 | |
2021-04-22 16:15 | gabrieljenik | Status | assigned => ready for testing |
2021-04-22 16:48 | gabrieljenik | Status | ready for testing => resolved |
2021-07-12 11:53 | c_schmitz | Note Added: 65302 | |
2021-07-12 11:53 | c_schmitz | Status | resolved => closed |