Skip to content

Commit

Permalink
Merge pull request #377 from odalecne/patch-1
Browse files Browse the repository at this point in the history
Fixed issue: copyToCentral() fails to create entries in 'participants' table
  • Loading branch information
c-schmitz committed Oct 29, 2015
2 parents 2ba8c63 + 405a79b commit 814468e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions application/models/Participant.php
Expand Up @@ -1320,15 +1320,17 @@ function copyToCentral($surveyid, $aAttributesToBeCreated, $aMapped, $overwritea
else
{
/* Create entry in participants table */
$black = !empty($tobeinserted['blacklisted']) ? $tobeinserted['blacklised'] : 'N';
$black = !empty($tobeinserted['blacklisted']) ? $tobeinserted['blacklisted'] : 'N';
$pid=!empty($tobeinserted['participant_id']) ? $tobeinserted['participant_id'] : $this->gen_uuid();
$writearray = array('participant_id' => $pid,
'firstname' => $tobeinserted['firstname'],
'lastname' => $tobeinserted['lastname'],
'email' => $tobeinserted['email'],
'language' => $tobeinserted['language'],
'blacklisted' => $black,
'owner_uid' => Yii::app()->session['loginID']);
'owner_uid' => Yii::app()->session['loginID'],
'created_by' => Yii::app()->session['loginID'],
'created' => date('Y-m-d H:i:s', time()));
Yii::app()->db
->createCommand()
->insert('{{participants}}', $writearray);
Expand Down

0 comments on commit 814468e

Please sign in to comment.