Skip to content

Commit

Permalink
Fixed issue #8967: Unable to map paticipant attributes to "Token attr…
Browse files Browse the repository at this point in the history
…ibutes to create" when adding participants to survey
  • Loading branch information
c-schmitz committed Apr 16, 2014
1 parent b0127e8 commit 9c2aadf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/models/Participant.php
Expand Up @@ -960,7 +960,7 @@ function copyCPBDAttributesToTokens($surveyid, $mapped, $newcreate, $participant
foreach ($newcreate as $key => $value)
{
$newfieldname='attribute_'.$value;
$fields[$newfieldname] = array('type' => 'STRING');
$fields[$newfieldname] = array('type' => 'string');
$attname = Yii::app()->db
->createCommand()
->select('{{participant_attribute_names_lang}}.attribute_name, {{participant_attribute_names_lang}}.lang')
Expand Down Expand Up @@ -1011,6 +1011,8 @@ function copyCPBDAttributesToTokens($surveyid, $mapped, $newcreate, $participant
{
addColumn("{{tokens_$surveyid}}", $key, $value['type']);
}
Yii::app()->db->schema->getTable("{{tokens_$surveyid}}", true); // Refresh schema cache just

}

//Write each participant to the survey token table
Expand Down

0 comments on commit 9c2aadf

Please sign in to comment.