Merge pull request #1 from wiosna-dev/bugfix/UW-2256

Bugfix/uw 2256
This commit is contained in:
Michał Frankiewicz
2020-07-22 08:40:12 +02:00
committed by GitHub
4 changed files with 25 additions and 18 deletions

View File

@@ -39,6 +39,13 @@ abstract class BaseParticipant extends BaseItem
*/
protected $email;
/**
* Token of the participant
*
* @var string
*/
protected $token;
/**
* Returns ID of the participant
*
@@ -78,4 +85,14 @@ abstract class BaseParticipant extends BaseItem
{
return $this->email;
}
/**
* Returns token of the participant
*
* @return string
*/
public function getToken()
{
return $this->token;
}
}

View File

@@ -42,13 +42,6 @@ class Participant extends BaseParticipant
*/
private $emailStatus;
/**
* Token of the participant
*
* @var string
*/
private $token;
/**
* Language of the participant
*
@@ -232,16 +225,6 @@ class Participant extends BaseParticipant
return $this->emailStatus;
}
/**
* Returns token of the participant
*
* @return string
*/
public function getToken()
{
return $this->token;
}
/**
* Returns language of the participant
*

View File

@@ -28,6 +28,10 @@ class ParticipantShort extends BaseParticipant
$this->id = (int)$value;
break;
case 'token':
$this->token = trim($value);
break;
case 'participant_info':
$this->firstName = trim($value['firstname']);
$this->lastName = trim($value['lastname']);
@@ -52,6 +56,7 @@ class ParticipantShort extends BaseParticipant
$data = [
'tid' => $participant->getId(),
'token' => $participant->getToken(),
'participant_info' => $info,
];

View File

@@ -228,7 +228,7 @@ class SurveyService
*
* @throws CannotProcessDataException
*/
public function getSurveyParticipants($surveyId, $onlyCompleted = false)
public function getSurveyParticipants($surveyId, $onlyCompleted = false, array $criteria = [])
{
$hasSurvey = $this
->allParticipants
@@ -244,6 +244,8 @@ class SurveyService
$offset,
$limit,
$includeUnused,
$attributes = false,
$criteria
];
try {