- Posts: 17
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Does the limesurvey have beforeSurvey event?
- liumingjun
- Topic Author
- Offline
- New Member
Less
More
3 years 3 months ago #209791
by liumingjun
Does the limesurvey have beforeSurvey event? was created by liumingjun
I hope that there will be a logic process before the questionnaire is loaded, and an event will be triggered before the welcome page. Does limesurvey have such an event?
I can only add code to application/controllers/survey/index.php 608 line now,
eg:
$event = new PluginEvent('beforeSurvey');
$event->set('surveyId', $surveyid);
App()->getPluginManager()->dispatchEvent($event);
Is there a better way? Or comes with the system? Or I submit to github?
I can only add code to application/controllers/survey/index.php 608 line now,
eg:
$event = new PluginEvent('beforeSurvey');
$event->set('surveyId', $surveyid);
App()->getPluginManager()->dispatchEvent($event);
Is there a better way? Or comes with the system? Or I submit to github?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
3 years 3 months ago #209796
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Does the limesurvey have beforeSurvey event?
What purpose exactly ?
manual.limesurvey.org/AfterFindSurvey
manual.limesurvey.org/BeforeSurveyPage
manual.limesurvey.org/ExpressionManagerStart
manual.limesurvey.org/SetVariableExpressionEnd
manual.limesurvey.org/AfterFindSurvey
manual.limesurvey.org/BeforeSurveyPage
manual.limesurvey.org/ExpressionManagerStart
manual.limesurvey.org/SetVariableExpressionEnd
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
3 years 3 months ago #209797
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Does the limesurvey have beforeSurvey event?
> before the welcome page
You can use manual.limesurvey.org/GetPluginTwigPath here too
Usage sample : gitlab.com/SondagesPro/coreAndTools/auto...SaveAndQuit.php#L333
You can use manual.limesurvey.org/GetPluginTwigPath here too
Usage sample : gitlab.com/SondagesPro/coreAndTools/auto...SaveAndQuit.php#L333
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- liumingjun
- Topic Author
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 1
3 years 3 months ago #209798
by liumingjun
Replied by liumingjun on topic Does the limesurvey have beforeSurvey event?
I hope it will only be triggered once before the welcome, and will not be triggered later
The topic has been locked.
- liumingjun
- Topic Author
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 1
3 years 3 months ago #209799
by liumingjun
Replied by liumingjun on topic Does the limesurvey have beforeSurvey event?
beforeSurveyPage && beforeSurveyDynamicSave Unable to meet demand...
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
3 years 3 months ago #209819
by DenisChenu
If not set and survey is active (and don't have token) : it's the welcome page.
If have token : is_empty($_SESSION) && isset(App()-getRequest()->getParam('token'))
Again : purpose
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Does the limesurvey have beforeSurvey event?
You can test if $_SESSION is set or not in beforeSurveyPageliumingjun wrote: I hope it will only be triggered once before the welcome, and will not be triggered later
If not set and survey is active (and don't have token) : it's the welcome page.
If have token : is_empty($_SESSION) && isset(App()-getRequest()->getParam('token'))
Again : purpose
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- liumingjun
- Topic Author
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 1
3 years 3 months ago #209830
by liumingjun
Replied by liumingjun on topic Does the limesurvey have beforeSurvey event?
I understand what you mean, I will try, thank you,
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- wpfan2099
- Offline
- Senior Member
Less
More
- Posts: 70
- Thank you received: 3
3 years 2 months ago #211206
by wpfan2099
Replied by wpfan2099 on topic Does the limesurvey have beforeSurvey event?
g day
very interesting - can we have some more infos on that topic?
this would be nice
very interesting - can we have some more infos on that topic?
this would be nice
The topic has been locked.