- Posts: 19
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
ISSUE of Plugin Events
- soubhikbasu
- Topic Author
- Offline
- New Member
Less
More
5 years 4 months ago #176822
by soubhikbasu
ISSUE of Plugin Events was created by soubhikbasu
Hello,
I am wondering that some of your event working and some not.
Why this is so?
Like:
beforeActivate - working
beforeDeactivate - not working
beforeSurveyActivate - working
beforeSurveyDeactivate - not working
afterSurveyComplete - not working
is any special way to use for the "afterResponseSave" event?
All events are tried with both version
1. Version 3.0.0-RC.3+171113
2. Version 2.73.0
i am using follwing code for plugin
protected $storage = 'DbStorage';
static protected $description = 'Demo: handle a survey response';
static protected $name = 'Show response';
public function init() {
$this->subscribe('beforeActivate');
}
public function beforeActivate()
{
$event = $this->getEvent();
$event->set('success', false);
$event->set('message', 'Can\'t activate survey - some condition is not met.');
}
Please help me out
I am wondering that some of your event working and some not.
Why this is so?
Like:
beforeActivate - working
beforeDeactivate - not working
beforeSurveyActivate - working
beforeSurveyDeactivate - not working
afterSurveyComplete - not working
is any special way to use for the "afterResponseSave" event?
All events are tried with both version
1. Version 3.0.0-RC.3+171113
2. Version 2.73.0
i am using follwing code for plugin
protected $storage = 'DbStorage';
static protected $description = 'Demo: handle a survey response';
static protected $name = 'Show response';
public function init() {
$this->subscribe('beforeActivate');
}
public function beforeActivate()
{
$event = $this->getEvent();
$event->set('success', false);
$event->set('message', 'Can\'t activate survey - some condition is not met.');
}
Please help me out
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 4 months ago - 5 years 4 months ago #176823
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 ISSUE of Plugin Events
Please : read …
manual.limesurvey.org/BeforeActivate
This event is fired just before plugin is activated.
afterResponseSave : manual.limesurvey.org/Plugin_events#Dyna....28New_in_3.15.1_.29 this event are only for 3.15.1 and can have issue (currently don't happen each time a response is saved)
manual.limesurvey.org/BeforeActivate
This event is fired just before plugin is activated.
i don't remind of issue with this event …afterSurveyComplete - not working :
RC mean release candidate … not done for production can be totally broken …1. Version 3.0.0-RC.3+171113
afterResponseSave : manual.limesurvey.org/Plugin_events#Dyna....28New_in_3.15.1_.29 this event are only for 3.15.1 and can have issue (currently don't happen each time a response is saved)
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.
Last edit: 5 years 4 months ago by DenisChenu.
The topic has been locked.
- soubhikbasu
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 1
5 years 4 months ago #176837
by soubhikbasu
Replied by soubhikbasu on topic ISSUE of Plugin Events
Thanks, Denis for your reply
I am already tested with that plugin, which is fired just before the activate the plugin.
But, when I use this to "beforeSurveyDeactivate" which means before deactivating the survey is fired the event. But it is not working.
In Event List( manual.limesurvey.org/Plugin_events# ) mentioned beforeSurveyDeactivate (New in 2.5 ) and I am also tested in Version 2.73.0, it's not working. Why?
As per your reply, "afterResponseSave" only working in 3.15.1, then if I want to trigger anything just after the response of a survey what will need to use?
afterSurveyComplete - I am already tested with both version, it's not working
is this working in Version 2.73.0?
Thanks in advance
I am already tested with that plugin, which is fired just before the activate the plugin.
But, when I use this to "beforeSurveyDeactivate" which means before deactivating the survey is fired the event. But it is not working.
In Event List( manual.limesurvey.org/Plugin_events# ) mentioned beforeSurveyDeactivate (New in 2.5 ) and I am also tested in Version 2.73.0, it's not working. Why?
As per your reply, "afterResponseSave" only working in 3.15.1, then if I want to trigger anything just after the response of a survey what will need to use?
afterSurveyComplete - I am already tested with both version, it's not working
is this working in Version 2.73.0?
Thanks in advance
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 4 months ago #176842
by DenisChenu
Test with github.com/LimeSurvey/LimeSurvey/tree/ma...ns/Demo/ShowResponse …
Withyour answer : i can not help you : you give NO information …
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 ISSUE of Plugin Events
Is working on ALL version …soubhikbasu wrote: …
afterSurveyComplete - I am already tested with both version, it's not working
is this working in Version 2.73.0?
Test with github.com/LimeSurvey/LimeSurvey/tree/ma...ns/Demo/ShowResponse …
Withyour answer : i can not help you : you give NO information …
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.
- soubhikbasu
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 1
5 years 4 months ago #176846
by soubhikbasu
Replied by soubhikbasu on topic ISSUE of Plugin Events
Thanks Denis,
Yes, its working with your code in Version 2.73.0
Is this also working in latest version without RC? Like: limesurvey3.15.3+181108
But what about "beforeSurveyDeactivate" ? it is not working in Version 2.73.0
Thanks for your quick reply. Its really help me
Yes, its working with your code in Version 2.73.0
Is this also working in latest version without RC? Like: limesurvey3.15.3+181108
But what about "beforeSurveyDeactivate" ? it is not working in Version 2.73.0
Thanks for your quick reply. Its really help me
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 4 months ago #176854
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 ISSUE of Plugin Events
If you don't read what i write … i didn't see any reason to continue …soubhikbasu wrote: Is this also working in latest version without RC? Like: limesurvey3.15.3+181108
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.
- soubhikbasu
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 1
5 years 4 months ago #176863
by soubhikbasu
Replied by soubhikbasu on topic ISSUE of Plugin Events
Hello Denis,
1. I see what you have written in your previous reply. Asking just for confirmation about "afterSurveyComplete".
2. What about "beforeSurveyDeactivate"? You does't reply anything about that.
1. I see what you have written in your previous reply. Asking just for confirmation about "afterSurveyComplete".
2. What about "beforeSurveyDeactivate"? You does't reply anything about that.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 4 months ago #176869
by DenisChenu
See stackoverflow.com/help/how-to-ask 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 , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic ISSUE of Plugin Events
Since you don't put any sample code using this function …DenisChenu wrote: With your answer : i can not help you : you give NO information …
See stackoverflow.com/help/how-to-ask 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 , plugin development .
I don't answer to private message.
The topic has been locked.
- soubhikbasu
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 1
5 years 4 months ago #176870
by soubhikbasu
Replied by soubhikbasu on topic ISSUE of Plugin Events
I think you do not see the question properly..
Please check my first post, there already mentioned sample code, just changing the event name.
Anyhow, I am repeating this here
###############
protected $storage = 'DbStorage';
static protected $description = 'Demo: handle a survey response';
static protected $name = 'Show response';
public function init() {
$this->subscribe('beforeSurveyDeactivate');
}
public function beforeSurveyDeactivate()
{
$event = $this->getEvent();
$event->set('success', false);
$event->set('message', 'Can\'t deactivate survey - some condition is not met.');
}
###########
Note: If you are not comfortable or understand to answer the question, please leave/transfer this for others support guy. I think someone else must be there.
Thank you
Please check my first post, there already mentioned sample code, just changing the event name.
Anyhow, I am repeating this here
###############
protected $storage = 'DbStorage';
static protected $description = 'Demo: handle a survey response';
static protected $name = 'Show response';
public function init() {
$this->subscribe('beforeSurveyDeactivate');
}
public function beforeSurveyDeactivate()
{
$event = $this->getEvent();
$event->set('success', false);
$event->set('message', 'Can\'t deactivate survey - some condition is not met.');
}
###########
Note: If you are not comfortable or understand to answer the question, please leave/transfer this for others support guy. I think someone else must be there.
Thank you
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 4 months ago #176875
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 ISSUE of Plugin Events
OK,
Seems not in 2.73
Seems not in 2.73
Code:
[limesurvey273]$ grep -r "beforeSurveyDeactivate" * [limesurvey273]$
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 following user(s) said Thank You: soubhikbasu
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10635
- Thank you received: 3699
5 years 4 months ago #176904
by tpartner
This is a forum attended by volunteers, please respect them when they give their free time to try and help you.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic ISSUE of Plugin Events
This is not Limesurvey support - you have to pay for that.Note: If you are not comfortable or understand to answer the question, please leave/transfer this for others support guy. I think someone else must be there.
This is a forum attended by volunteers, please respect them when they give their free time to try and help you.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.