Welcome, Guest
Username: Password: Remember me

TOPIC: How to insert other data to table lime_survey_$surveyid when submit survey?

How to insert other data to table lime_survey_$surveyid when submit survey? 1 year 8 months ago #89401

  • vcongpham
  • vcongpham's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Hello everyone!

I inserted a new field to a table lime_survey_$surveyid (Example: insert field 'uid' after column 'id' in table lime_survey_123456).

But i can't insert value data to 'uid' after submit survey.

I want to find line code insert to change it. But i did not find it.

Please tell me where function insert data to table lime_survey_$surveyid is.

Thanks for help!
The administrator has disabled public write access.

Re: How to insert other data to table lime_survey_$surveyid when submit survey? 1 year 8 months ago #89431

  • helper
  • helper's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 126
  • Thank you received: 18
  • Karma: 0
I trust that you mean "update" rather than "insert" at the end of the survey. To that end, we have several things that we do at the end of a survey and call our external classes in the .../application/helpers/SurveyRuntimeHelper.php (at about line 429 or so of Version 2.00+ Build 121127).

CAVEAT - every time that you update LimeSurvey you must put your code back to the file.

My hook:


//Send notifications

sendSubmitNotifications($surveyid);

/** INSERT FOR UNC POST PROCESSING HOOK ****************************************/
Yii::import('application.unc.WebCIS_ProcessingService');
$webCIS = new WebCIS_ProcessingService();
$webCIS->process($surveyid);

/** END INSERT FOR UNC POST PROCESSING HOOK ************************************/

$content = '';

Where our custom class is WebCIS_ProcessingService located in .../application/unc/ folder
The administrator has disabled public write access.
The following user(s) said Thank You: vcongpham

Re: How to insert other data to table lime_survey_$surveyid when submit survey? 1 year 8 months ago #89433

  • vcongpham
  • vcongpham's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Thanks for reply me.
I meant that. I want to save userid of user into each lime_survey_$surveyid table. First, i add a new column into lime_survey_$surveyid table (i have done).
Second, i want insert userid (for user logined) to above table, ( i failded).
Please help me!
The administrator has disabled public write access.

Re: How to insert other data to table lime_survey_$surveyid when submit survey? 1 year 8 months ago #89434

  • vcongpham
  • vcongpham's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Note: I am using limesurvey 1.92
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.120 seconds
Donation Image