survey activation event and adding content to survey overview

Plus d'informations
il y a 4 mois 6 jours #171135 par mindau
mindau a créé le sujet : survey activation event and adding content to survey overview
Hello, I'm developing survey url shortener plugin (based on Bitly api ) and encountered some problems.

from the manual beforeSurveyActivate event is not yet released. For short url generation im using beforeSurveySettingsSave event. . beforeSurveyActivate event checks if survey is active or not and if active then beforeSurveyActivate calls short url generation. This solution is not best, because I must to click "save" on the survey if I want to generate a short url. Can I use any other event that suits better?

Second question is if i can somehow put new generated url into Overview tab under default survey url?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 6 jours #171137 par DenisChenu
DenisChenu a répondu au sujet : survey activation event and adding content to survey overview
About beforeSurveyActivate : seems manual is outdated github.com/LimeSurvey/LimeSurvey/blob/af...vate_helper.php#L267

Else, sometimes i use manual.limesurvey.org/Plugin_events#Model_Events to know what happen.

For «put new generated url into Overview» : only javascript solution

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 5 jours #171208 par mindau
mindau a répondu au sujet : survey activation event and adding content to survey overview
Thank you, beforeSurveyActivate works indeed!

Now I'm struggling with short URL display solution.


I think I can use beforeSurveyBarRender() event to check if survey is activated & short url is generated and if yes -> then append short url with javascript in right place.

But how can I inject JS from plugin class?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 5 jours #171217 par DenisChenu
DenisChenu a répondu au sujet : survey activation event and adding content to survey overview
framagit.org/Shnoulle/insertAdminJS/blob...nsertAdminJS.php#L49

beforeControllerAction , you can restrict to admin + survey for example

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 5 jours #171232 par mindau
mindau a répondu au sujet : survey activation event and adding content to survey overview
Thank you for your help. I solved this with beforeSurveyBarRender instead of beforeControllerAction, because i have better control and information of survey.

I will upload my plugin later to github and post it in forum.

My plugin uses Bitly shortener api. After activation bitly url is posted to overview also.

Just one quick question.

Based on Plugins_-_advanced Manual settings could have also readOnly option. But its somehow does not work. I tried true, 1 "1","true" but I can edit it anyway

... array(
'type' => 'string',
'readOnly' => true
.....

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 mois 5 jours - il y a 4 mois 5 jours #171244 par DenisChenu
DenisChenu a répondu au sujet : survey activation event and adding content to survey overview
I never use beforeSurveyBarRender , maybe i must look at it , thank you.

About the issue : did you try
'htmlOptions'  => array(
'readonly' => true,
),

Remind : you need to save yourself the settings in manual.limesurvey.org/NewSurveySettings

PS about the readOnly : strange : code is here : github.com/LimeSurvey/LimeSurvey/blob/d3...tingsWidget.php#L611 Please , report the issue with an example plugin.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Dernière édition: il y a 4 mois 5 jours par DenisChenu.

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!