Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

ISSUE of Plugin Events

  • soubhikbasu
  • soubhikbasu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago - 5 years 4 months ago #176823 by DenisChenu
Replied by DenisChenu on topic ISSUE of Plugin Events
Please : read …
manual.limesurvey.org/BeforeActivate
This event is fired just before plugin is activated.

afterSurveyComplete - not working :

i don't remind of issue with this event …

1. Version 3.0.0-RC.3+171113

RC mean release candidate … not done for production can be totally broken …

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
  • soubhikbasu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #176842 by DenisChenu
Replied by DenisChenu on topic ISSUE of Plugin Events

soubhikbasu wrote: …
afterSurveyComplete - I am already tested with both version, it's not working

is this working in Version 2.73.0?

Is working on ALL version …

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
  • soubhikbasu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #176854 by DenisChenu
Replied by DenisChenu on topic ISSUE of Plugin Events

soubhikbasu wrote: Is this also working in latest version without RC? Like: limesurvey3.15.3+181108

If you don't read what i write … i didn't see any reason to continue …

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
  • soubhikbasu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #176869 by DenisChenu
Replied by DenisChenu on topic ISSUE of Plugin Events

DenisChenu wrote: With your answer : i can not help you : you give NO information …

Since you don't put any sample code using this function …

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
  • soubhikbasu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #176875 by DenisChenu
Replied by DenisChenu on topic ISSUE of Plugin Events
OK,

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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #176904 by tpartner
Replied by tpartner on topic ISSUE of Plugin Events

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 not Limesurvey support - you have to pay for that.

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.

Lime-years ahead

Online-surveys for every purse and purpose